Changeset 331eacbe for libcfa/src


Ignore:
Timestamp:
Mar 5, 2020, 2:40:28 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
87f572e
Parents:
5452673 (diff), f9723e8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
libcfa/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/bits/containers.hfa

    r5452673 r331eacbe  
    169169                                get_next( *head ) = 0p;
    170170                                verify(*this.tail == 1p);
     171                                verify( get_next(*head) == 0p );
    171172                                return head;
    172173                        }
  • libcfa/src/concurrency/monitor.cfa

    r5452673 r331eacbe  
    534534        //Find the thread to run
    535535        $thread * signallee = pop_head( this.blocked )->waiting_thread;
    536         /* paranoid */ verify( signallee->next == 0p );
    537536        __set_owner( monitors, count, signallee );
    538537
  • libcfa/src/exception.c

    r5452673 r331eacbe  
    7272// Used in the personality function, way down in termination.
    7373// struct _Unwind_Context * -> _Unwind_Reason_Code(*)(exception_t *)
     74#if defined( __x86_64 )
    7475#define MATCHER_FROM_CONTEXT(ptr_to_context) \
    7576        (*(_Unwind_Reason_Code(**)(exception_t *))(_Unwind_GetCFA(ptr_to_context) + 8))
    76 
     77#elif defined( __i386 )
     78#define MATCHER_FROM_CONTEXT(ptr_to_context) \
     79        (*(_Unwind_Reason_Code(**)(exception_t *))(_Unwind_GetCFA(ptr_to_context) + 24))
     80#endif
    7781
    7882// RESUMPTION ================================================================
  • libcfa/src/interpose.cfa

    r5452673 r331eacbe  
    1010// Created On       : Wed Mar 29 16:10:31 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Feb 17 10:18:53 2020
    13 // Update Count     : 166
     12// Last Modified On : Mon Mar  2 17:37:00 2020
     13// Update Count     : 176
    1414//
    1515
     
    143143void abort( const char fmt[], ... ) __attribute__(( format(printf, 1, 2), __nothrow__, __leaf__, __noreturn__ ));
    144144void abort( bool signalAbort, const char fmt[], ... ) __attribute__(( format(printf, 2, 3), __nothrow__, __leaf__, __noreturn__ ));
     145void __abort( bool signalAbort, const char fmt[], va_list args ) __attribute__(( __nothrow__, __leaf__, __noreturn__ ));
    145146
    146147extern "C" {
     
    152153                va_list argp;
    153154                va_start( argp, fmt );
    154                 abort( false, fmt, argp );
     155                __abort( false, fmt, argp );
    155156                va_end( argp );
    156157        }
     
    218219}
    219220
    220 void abort( bool signalAbort, const char fmt[], ... ) {
     221// Cannot forward va_list.
     222void __abort( bool signalAbort, const char fmt[], va_list args ) {
    221223        void * kernel_data = kernel_abort();                            // must be done here to lock down kernel
    222224        int len;
     
    228230
    229231        assert( fmt );
    230         va_list args;
    231         va_start( args, fmt );
    232 
    233232        len = vsnprintf( abort_text, abort_text_size, fmt, args );
    234         va_end( args );
    235233        __cfaabi_bits_write( STDERR_FILENO, abort_text, len );
    236234
     
    248246        va_list args;
    249247        va_start( args, fmt );
    250         abort( false, fmt, args );
     248        __abort( false, fmt, args );
     249    // CONTROL NEVER REACHES HERE!
    251250        va_end( args );
     251}
     252
     253void abort( bool signalAbort, const char fmt[], ... ) {
     254    va_list args;
     255    va_start( args, fmt );
     256    __abort( signalAbort, fmt, args );
     257    // CONTROL NEVER REACHES HERE!
     258    va_end( args );
    252259}
    253260
Note: See TracChangeset for help on using the changeset viewer.