Changes in / [5a73f0f:ffd0ac2]
- Files:
-
- 1 added
- 12 edited
-
Jenkinsfile (modified) (2 diffs)
-
src/benchmark/Makefile.am (modified) (1 diff)
-
src/benchmark/Makefile.in (modified) (1 diff)
-
src/driver/cfa.cc (modified) (1 diff)
-
src/libcfa/bits/locks.h (modified) (4 diffs)
-
src/libcfa/bits/signal.h (added)
-
src/libcfa/concurrency/invoke.h (modified) (1 diff)
-
src/libcfa/concurrency/kernel.c (modified) (7 diffs)
-
src/libcfa/concurrency/kernel_private.h (modified) (1 diff)
-
src/libcfa/concurrency/monitor.c (modified) (10 diffs)
-
src/libcfa/concurrency/preemption.c (modified) (8 diffs)
-
src/libcfa/concurrency/thread.c (modified) (2 diffs)
-
src/libcfa/interpose.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
r5a73f0f rffd0ac2 174 174 175 175 def notify_server(int wait) { 176 sh """curl -- silent --data "wait=${wait}" -X POST http://plg2:8082/jenkins/notify > /dev/null || true"""176 sh """curl --data "wait=${wait}" -X POST http://plg2:8082/jenkins/notify > /dev/null || true""" 177 177 return 178 178 } … … 324 324 325 325 //Then publish the results 326 sh 'curl -H "Content-Type: application/json" --silent--data @bench.json http://plg2:8082/jenkins/publish > /dev/null || true'326 sh 'curl -H \'Content-Type: application/json\' --data @bench.json http://plg2:8082/jenkins/publish > /dev/null || true' 327 327 } 328 328 } -
src/benchmark/Makefile.am
r5a73f0f rffd0ac2 59 59 @echo -e '\t"githash": "'${githash}'",' 60 60 @echo -e '\t"arch": "' ${arch} '",' 61 @echo -e '\t"compile": {' 62 @+make compile TIME_FORMAT='%e,' PRINT_FORMAT='\t\t\"%s\" :' 63 @echo -e '\t\t"dummy" : {}' 64 @echo -e '\t},' 61 65 @echo -e '\t"ctxswitch": {' 62 66 @echo -en '\t\t"coroutine":' -
src/benchmark/Makefile.in
r5a73f0f rffd0ac2 473 473 @echo -e '\t"githash": "'${githash}'",' 474 474 @echo -e '\t"arch": "' ${arch} '",' 475 @echo -e '\t"compile": {' 476 @+make compile TIME_FORMAT='%e,' PRINT_FORMAT='\t\t\"%s\" :' 477 @echo -e '\t\t"dummy" : {}' 478 @echo -e '\t},' 475 479 @echo -e '\t"ctxswitch": {' 476 480 @echo -en '\t\t"coroutine":' -
src/driver/cfa.cc
r5a73f0f rffd0ac2 277 277 args[nargs] = "--undefined=__cfaabi_dbg_bits_write"; 278 278 nargs += 1; 279 args[nargs] = "-Xlinker"; 280 nargs += 1; 281 args[nargs] = "--undefined=__cfaabi_interpose_startup"; 282 nargs += 1; 279 283 280 284 } // if -
src/libcfa/bits/locks.h
r5a73f0f rffd0ac2 58 58 59 59 #ifdef __cforall 60 extern "C" { 61 extern void disable_interrupts(); 62 extern void enable_interrupts_noPoll(); 63 } 64 60 65 extern void yield( unsigned int ); 61 66 extern thread_local struct thread_desc * volatile this_thread; 67 extern thread_local struct processor * volatile this_processor; 62 68 63 69 static inline void ?{}( __spinlock_t & this ) { … … 68 74 static inline _Bool try_lock ( __spinlock_t & this __cfaabi_dbg_ctx_param2 ) { 69 75 _Bool result = __lock_test_and_test_and_set( this.lock ); 70 __cfaabi_dbg_debug_do( 71 if( result ) { 76 if( result ) { 77 disable_interrupts(); 78 __cfaabi_dbg_debug_do( 72 79 this.prev_name = caller; 73 80 this.prev_thrd = this_thread; 74 }75 )81 ) 82 } 76 83 return result; 77 84 } … … 99 106 #endif 100 107 } 108 disable_interrupts(); 101 109 __cfaabi_dbg_debug_do( 102 110 this.prev_name = caller; … … 105 113 } 106 114 107 // Lock the spinlock, spin if already acquired 108 static inline void lock_yield( __spinlock_t & this __cfaabi_dbg_ctx_param2 ) { 109 for ( unsigned int i = 1;; i += 1 ) { 110 if ( __lock_test_and_test_and_set( this.lock ) ) break; 111 yield( i ); 112 } 113 __cfaabi_dbg_debug_do( 114 this.prev_name = caller; 115 this.prev_thrd = this_thread; 116 ) 117 } 115 // // Lock the spinlock, yield if already acquired 116 // static inline void lock_yield( __spinlock_t & this __cfaabi_dbg_ctx_param2 ) { 117 // for ( unsigned int i = 1;; i += 1 ) { 118 // if ( __lock_test_and_test_and_set( this.lock ) ) break; 119 // yield( i ); 120 // } 121 // disable_interrupts(); 122 // __cfaabi_dbg_debug_do( 123 // this.prev_name = caller; 124 // this.prev_thrd = this_thread; 125 // ) 126 // } 118 127 119 128 static inline void unlock( __spinlock_t & this ) { 129 enable_interrupts_noPoll(); 120 130 __lock_release( this.lock ); 121 131 } -
src/libcfa/concurrency/invoke.h
r5a73f0f rffd0ac2 134 134 // instrusive link field for threads 135 135 struct thread_desc * next; 136 137 __cfaabi_dbg_debug_do( 138 // instrusive link field for debugging 139 struct thread_desc * dbg_next; 140 struct thread_desc * dbg_prev; 141 ) 136 142 }; 137 143 -
src/libcfa/concurrency/kernel.c
r5a73f0f rffd0ac2 242 242 void finishRunning(processor * this) { 243 243 if( this->finish.action_code == Release ) { 244 verify( disable_preempt_count > 1 ); 244 245 unlock( *this->finish.lock ); 245 246 } … … 248 249 } 249 250 else if( this->finish.action_code == Release_Schedule ) { 251 verify( disable_preempt_count > 1 ); 250 252 unlock( *this->finish.lock ); 251 253 ScheduleThread( this->finish.thrd ); 252 254 } 253 255 else if( this->finish.action_code == Release_Multi ) { 256 verify( disable_preempt_count > this->finish.lock_count ); 254 257 for(int i = 0; i < this->finish.lock_count; i++) { 255 258 unlock( *this->finish.locks[i] ); … … 257 260 } 258 261 else if( this->finish.action_code == Release_Multi_Schedule ) { 262 verify( disable_preempt_count > this->finish.lock_count ); 259 263 for(int i = 0; i < this->finish.lock_count; i++) { 260 264 unlock( *this->finish.locks[i] ); … … 363 367 this_processor->finish.lock = lock; 364 368 365 verify( disable_preempt_count > 0);369 verify( disable_preempt_count > 1 ); 366 370 suspend(); 367 371 verify( disable_preempt_count > 0 ); … … 391 395 this_processor->finish.thrd = thrd; 392 396 393 verify( disable_preempt_count > 0);397 verify( disable_preempt_count > 1 ); 394 398 suspend(); 395 399 verify( disable_preempt_count > 0 ); … … 516 520 } 517 521 522 //============================================================================================= 523 // Unexpected Terminating logic 524 //============================================================================================= 525 526 518 527 static __spinlock_t kernel_abort_lock; 519 528 static __spinlock_t kernel_debug_lock; … … 611 620 } 612 621 622 //----------------------------------------------------------------------------- 623 // Debug 624 __cfaabi_dbg_debug_do( 625 struct { 626 thread_desc * tail; 627 } __cfaabi_dbg_thread_list = { NULL }; 628 629 void __cfaabi_dbg_thread_register( thread_desc * thrd ) { 630 if( !__cfaabi_dbg_thread_list.tail ) { 631 __cfaabi_dbg_thread_list.tail = thrd; 632 return; 633 } 634 __cfaabi_dbg_thread_list.tail->dbg_next = thrd; 635 thrd->dbg_prev = __cfaabi_dbg_thread_list.tail; 636 __cfaabi_dbg_thread_list.tail = thrd; 637 } 638 639 void __cfaabi_dbg_thread_unregister( thread_desc * thrd ) { 640 thread_desc * prev = thrd->dbg_prev; 641 thread_desc * next = thrd->dbg_next; 642 643 if( next ) { next->dbg_prev = prev; } 644 else { 645 assert( __cfaabi_dbg_thread_list.tail == thrd ); 646 __cfaabi_dbg_thread_list.tail = prev; 647 } 648 649 if( prev ) { prev->dbg_next = next; } 650 651 thrd->dbg_prev = NULL; 652 thrd->dbg_next = NULL; 653 } 654 ) 613 655 // Local Variables: // 614 656 // mode: c // -
src/libcfa/concurrency/kernel_private.h
r5a73f0f rffd0ac2 85 85 extern void ThreadCtxSwitch(coroutine_desc * src, coroutine_desc * dst); 86 86 87 __cfaabi_dbg_debug_do( 88 extern void __cfaabi_dbg_thread_register ( thread_desc * thrd ); 89 extern void __cfaabi_dbg_thread_unregister( thread_desc * thrd ); 90 ) 91 87 92 //----------------------------------------------------------------------------- 88 93 // Utils -
src/libcfa/concurrency/monitor.c
r5a73f0f rffd0ac2 53 53 static inline __lock_size_t aggregate ( monitor_desc * storage [], const __waitfor_mask_t & mask ); 54 54 55 #ifndef __CFA_LOCK_NO_YIELD56 #define DO_LOCK lock_yield57 #else58 #define DO_LOCK lock59 #endif60 61 55 //----------------------------------------------------------------------------- 62 56 // Useful defines … … 90 84 static void __enter_monitor_desc( monitor_desc * this, const __monitor_group_t & group ) { 91 85 // Lock the monitor spinlock 92 DO_LOCK( this->lock __cfaabi_dbg_ctx2 );86 lock( this->lock __cfaabi_dbg_ctx2 ); 93 87 thread_desc * thrd = this_thread; 88 89 verify( disable_preempt_count > 0 ); 94 90 95 91 __cfaabi_dbg_print_safe("Kernel : %10p Entering mon %p (%p)\n", thrd, this, this->owner); … … 121 117 // Some one else has the monitor, wait in line for it 122 118 append( this->entry_queue, thrd ); 119 120 verify( disable_preempt_count > 0 ); 121 123 122 BlockInternal( &this->lock ); 124 123 … … 138 137 static void __enter_monitor_dtor( monitor_desc * this, fptr_t func ) { 139 138 // Lock the monitor spinlock 140 DO_LOCK( this->lock __cfaabi_dbg_ctx2 );139 lock( this->lock __cfaabi_dbg_ctx2 ); 141 140 thread_desc * thrd = this_thread; 142 141 … … 201 200 // Leave single monitor 202 201 void __leave_monitor_desc( monitor_desc * this ) { 203 // Lock the monitor spinlock , DO_LOCK to reduce contention204 DO_LOCK( this->lock __cfaabi_dbg_ctx2 );202 // Lock the monitor spinlock 203 lock( this->lock __cfaabi_dbg_ctx2 ); 205 204 206 205 __cfaabi_dbg_print_safe("Kernel : %10p Leaving mon %p (%p)\n", this_thread, this, this->owner); … … 248 247 249 248 // Lock the monitor now 250 DO_LOCK( this->lock __cfaabi_dbg_ctx2 );249 lock( this->lock __cfaabi_dbg_ctx2 ); 251 250 252 251 disable_interrupts(); … … 397 396 append( this.blocked, &waiter ); 398 397 398 verify( disable_preempt_count == 0 ); 399 399 400 // Lock all monitors (aggregates the locks as well) 400 401 lock_all( monitors, locks, count ); 402 403 // verifyf( disable_preempt_count == count, "Got %d, expected %d\n", disable_preempt_count, count ); 404 if(disable_preempt_count != count) { __cfaabi_dbg_print_buffer_decl("----------Gonna crash\n"); } 401 405 402 406 // Find the next thread(s) to run … … 473 477 monitor_ctx( this.monitors, this.monitor_count ); 474 478 479 verify( disable_preempt_count == 0 ); 480 475 481 // Lock all monitors (aggregates the locks them as well) 476 482 lock_all( monitors, locks, count ); 483 484 // verify( disable_preempt_count == count ); 485 if(disable_preempt_count != count) { __cfaabi_dbg_print_buffer_decl("----------Gonna crash\n"); } 486 477 487 478 488 // Create the node specific to this wait operation … … 737 747 static inline void lock_all( __spinlock_t * locks [], __lock_size_t count ) { 738 748 for( __lock_size_t i = 0; i < count; i++ ) { 739 DO_LOCK( *locks[i] __cfaabi_dbg_ctx2 );749 lock( *locks[i] __cfaabi_dbg_ctx2 ); 740 750 } 741 751 } … … 744 754 for( __lock_size_t i = 0; i < count; i++ ) { 745 755 __spinlock_t * l = &source[i]->lock; 746 DO_LOCK( *l __cfaabi_dbg_ctx2 );756 lock( *l __cfaabi_dbg_ctx2 ); 747 757 if(locks) locks[i] = l; 748 758 } -
src/libcfa/concurrency/preemption.c
r5a73f0f rffd0ac2 19 19 extern "C" { 20 20 #include <errno.h> 21 #include <execinfo.h>22 #define __USE_GNU23 #include <signal.h>24 #undef __USE_GNU25 21 #include <stdio.h> 26 22 #include <string.h> … … 29 25 #undef ftype 30 26 31 #ifdef __USE_STREAM__ 32 #include "fstream" 33 #endif 27 #include "bits/signal.h" 34 28 35 29 //TODO move to defaults … … 40 34 return __CFA_DEFAULT_PREEMPTION__; 41 35 } 42 43 // Short hands for signal context information44 #define __CFA_SIGCXT__ ucontext_t *45 #define __CFA_SIGPARMS__ __attribute__((unused)) int sig, __attribute__((unused)) siginfo_t *sfp, __attribute__((unused)) __CFA_SIGCXT__ cxt46 36 47 37 // FwdDeclarations : timeout handlers … … 53 43 void sigHandler_segv ( __CFA_SIGPARMS__ ); 54 44 void sigHandler_abort ( __CFA_SIGPARMS__ ); 55 56 // FwdDeclarations : sigaction wrapper57 static void __kernel_sigaction( int sig, void (*handler)(__CFA_SIGPARMS__), int flags );58 45 59 46 // FwdDeclarations : alarm thread main … … 182 169 void enable_interrupts_noPoll() { 183 170 __attribute__((unused)) unsigned short prev = __atomic_fetch_add_2( &disable_preempt_count, -1, __ATOMIC_SEQ_CST ); 184 verify ( prev != 0u); // If this triggers someone is enabled already enabled interrupts171 verifyf( prev != 0u, "Incremented from %u\n", prev ); // If this triggers someone is enabled already enabled interrupts 185 172 } 186 173 } … … 246 233 // Setup proper signal handlers 247 234 __kernel_sigaction( SIGUSR1, sigHandler_ctxSwitch, SA_SIGINFO | SA_RESTART ); // CtxSwitch handler 248 // __kernel_sigaction( SIGSEGV, sigHandler_segv , SA_SIGINFO ); // Failure handler249 // __kernel_sigaction( SIGBUS , sigHandler_segv , SA_SIGINFO ); // Failure handler250 235 251 236 signal_block( SIGALRM ); … … 308 293 if( !preemption_ready() ) { return; } 309 294 310 //__cfaabi_dbg_print_buffer_decl(" KERNEL: preempting core %p (%p).\n", this_processor, this_thread);295 __cfaabi_dbg_print_buffer_decl(" KERNEL: preempting core %p (%p).\n", this_processor, this_thread); 311 296 312 297 preemption_in_progress = true; // Sync flag : prevent recursive calls to the signal handler … … 380 365 } 381 366 382 // Sigaction wrapper : register an signal handler383 static void __kernel_sigaction( int sig, void (*handler)(__CFA_SIGPARMS__), int flags ) {384 struct sigaction act;385 386 act.sa_sigaction = (void (*)(int, siginfo_t *, void *))handler;387 act.sa_flags = flags;388 389 if ( sigaction( sig, &act, NULL ) == -1 ) {390 __cfaabi_dbg_print_buffer_decl(391 " __kernel_sigaction( sig:%d, handler:%p, flags:%d ), problem installing signal handler, error(%d) %s.\n",392 sig, handler, flags, errno, strerror( errno )393 );394 _exit( EXIT_FAILURE );395 }396 }397 398 // Sigaction wrapper : restore default handler399 static void __kernel_sigdefault( int sig ) {400 struct sigaction act;401 402 act.sa_handler = SIG_DFL;403 act.sa_flags = 0;404 sigemptyset( &act.sa_mask );405 406 if ( sigaction( sig, &act, NULL ) == -1 ) {407 __cfaabi_dbg_print_buffer_decl(408 " __kernel_sigdefault( sig:%d ), problem reseting signal handler, error(%d) %s.\n",409 sig, errno, strerror( errno )410 );411 _exit( EXIT_FAILURE );412 }413 }414 415 //=============================================================================================416 // Terminating Signals logic417 //=============================================================================================418 419 __cfaabi_dbg_debug_do(420 static void __kernel_backtrace( int start ) {421 // skip first N stack frames422 423 enum { Frames = 50 };424 void * array[Frames];425 int size = backtrace( array, Frames );426 char ** messages = backtrace_symbols( array, size );427 428 // find executable name429 *index( messages[0], '(' ) = '\0';430 #ifdef __USE_STREAM__431 serr | "Stack back trace for:" | messages[0] | endl;432 #else433 fprintf( stderr, "Stack back trace for: %s\n", messages[0]);434 #endif435 436 // skip last 2 stack frames after main437 for ( int i = start; i < size && messages != NULL; i += 1 ) {438 char * name = NULL;439 char * offset_begin = NULL;440 char * offset_end = NULL;441 442 for ( char *p = messages[i]; *p; ++p ) {443 // find parantheses and +offset444 if ( *p == '(' ) {445 name = p;446 }447 else if ( *p == '+' ) {448 offset_begin = p;449 }450 else if ( *p == ')' ) {451 offset_end = p;452 break;453 }454 }455 456 // if line contains symbol print it457 int frameNo = i - start;458 if ( name && offset_begin && offset_end && name < offset_begin ) {459 // delimit strings460 *name++ = '\0';461 *offset_begin++ = '\0';462 *offset_end++ = '\0';463 464 #ifdef __USE_STREAM__465 serr | "(" | frameNo | ")" | messages[i] | ":"466 | name | "+" | offset_begin | offset_end | endl;467 #else468 fprintf( stderr, "(%i) %s : %s + %s %s\n", frameNo, messages[i], name, offset_begin, offset_end);469 #endif470 }471 // otherwise, print the whole line472 else {473 #ifdef __USE_STREAM__474 serr | "(" | frameNo | ")" | messages[i] | endl;475 #else476 fprintf( stderr, "(%i) %s\n", frameNo, messages[i] );477 #endif478 }479 }480 481 free( messages );482 }483 )484 485 // void sigHandler_segv( __CFA_SIGPARMS__ ) {486 // __cfaabi_dbg_debug_do(487 // #ifdef __USE_STREAM__488 // serr | "*CFA runtime error* program cfa-cpp terminated with"489 // | (sig == SIGSEGV ? "segment fault." : "bus error.")490 // | endl;491 // #else492 // fprintf( stderr, "*CFA runtime error* program cfa-cpp terminated with %s\n", sig == SIGSEGV ? "segment fault." : "bus error." );493 // #endif494 495 // // skip first 2 stack frames496 // __kernel_backtrace( 1 );497 // )498 // exit( EXIT_FAILURE );499 // }500 501 // void sigHandler_abort( __CFA_SIGPARMS__ ) {502 // // skip first 6 stack frames503 // __cfaabi_dbg_debug_do( __kernel_backtrace( 6 ); )504 505 // // reset default signal handler506 // __kernel_sigdefault( SIGABRT );507 508 // raise( SIGABRT );509 // }510 511 367 // Local Variables: // 512 368 // mode: c // -
src/libcfa/concurrency/thread.c
r5a73f0f rffd0ac2 33 33 void ?{}(thread_desc& this) { 34 34 (this.self_cor){}; 35 this.self_cor.name = "Anonymous Coroutine";35 this.self_cor.name = "Anonymous Thread"; 36 36 this.self_mon.owner = &this; 37 37 this.self_mon.recursion = 1; 38 38 this.self_mon_p = &this.self_mon; 39 39 this.next = NULL; 40 __cfaabi_dbg_debug_do( 41 this.dbg_next = NULL; 42 this.dbg_prev = NULL; 43 __cfaabi_dbg_thread_register(&this); 44 ) 40 45 41 46 (this.monitors){ &this.self_mon_p, 1, (fptr_t)0 }; … … 43 48 44 49 void ^?{}(thread_desc& this) { 50 __cfaabi_dbg_debug_do( 51 __cfaabi_dbg_thread_unregister(&this); 52 ) 45 53 ^(this.self_cor){}; 46 54 } -
src/libcfa/interpose.c
r5a73f0f rffd0ac2 22 22 #include <dlfcn.h> 23 23 #include <unistd.h> 24 #define __USE_GNU 25 #include <signal.h> 26 #undef __USE_GNU 27 #include <execinfo.h> 24 28 } 25 29 26 30 #include "bits/debug.h" 27 31 #include "bits/defs.h" 32 #include "bits/signal.h" 28 33 #include "startup.h" 29 34 30 void interpose_startup(void) __attribute__(( constructor( STARTUP_PRIORITY_CORE ) ));35 void __cfaabi_interpose_startup(void) __attribute__(( constructor( STARTUP_PRIORITY_CORE ) )); 31 36 32 37 typedef void (*generic_fptr_t)(void); … … 84 89 #define INIT_REALRTN( x, ver ) assign_ptr( (void**)&libc_##x, #x, ver) 85 90 86 void interpose_startup() { 91 void sigHandler_segv ( __CFA_SIGPARMS__ ); 92 void sigHandler_abort( __CFA_SIGPARMS__ ); 93 94 void __cfaabi_interpose_startup() { 87 95 const char *version = NULL; 88 96 89 97 INIT_REALRTN( abort, version ); 90 98 INIT_REALRTN( exit, version ); 91 } 99 100 __kernel_sigaction( SIGSEGV, sigHandler_segv , SA_SIGINFO ); // Failure handler 101 __kernel_sigaction( SIGBUS , sigHandler_segv , SA_SIGINFO ); // Failure handler 102 __kernel_sigaction( SIGABRT, sigHandler_abort, SA_SIGINFO ); // Failure handler 103 } 104 105 //============================================================================================= 106 // Terminating Signals logic 107 //============================================================================================= 92 108 93 109 extern "C" { … … 137 153 libc_abort(); 138 154 } 155 } 156 157 // skip first 6 stack frames by default 158 static void __kernel_backtrace() { 159 // skip first N stack frames 160 int start = 6; 161 162 enum { Frames = 50 }; 163 void * array[Frames]; 164 int size = backtrace( array, Frames ); 165 char ** messages = backtrace_symbols( array, size ); 166 167 // find executable name 168 *index( messages[0], '(' ) = '\0'; 169 __cfaabi_dbg_bits_print_nolock( "Stack back trace for: %s\n", messages[0]); 170 171 // skip last 2 stack frames after main 172 for ( int i = start; i < size && messages != NULL; i += 1 ) { 173 char * name = NULL; 174 char * offset_begin = NULL; 175 char * offset_end = NULL; 176 177 for ( char *p = messages[i]; *p; ++p ) { 178 // find parantheses and +offset 179 if ( *p == '(' ) { 180 name = p; 181 } 182 else if ( *p == '+' ) { 183 offset_begin = p; 184 } 185 else if ( *p == ')' ) { 186 offset_end = p; 187 break; 188 } 189 } 190 191 // if line contains symbol print it 192 int frameNo = i - start; 193 if ( name && offset_begin && offset_end && name < offset_begin ) { 194 // delimit strings 195 *name++ = '\0'; 196 *offset_begin++ = '\0'; 197 *offset_end++ = '\0'; 198 199 __cfaabi_dbg_bits_print_nolock( "(%i) %s : %s + %s %s\n", frameNo, messages[i], name, offset_begin, offset_end); 200 } 201 // otherwise, print the whole line 202 else { 203 __cfaabi_dbg_bits_print_nolock( "(%i) %s\n", frameNo, messages[i] ); 204 } 205 } 206 207 free( messages ); 208 } 209 210 void sigHandler_segv( __CFA_SIGPARMS__ ) { 211 // skip first only 1 stack frames in case of segfault. 212 abortf( "*CFA runtime error* program cfa-cpp terminated with %s\n", sig == SIGSEGV ? "segment fault." : "bus error." ); 213 } 214 215 void sigHandler_abort( __CFA_SIGPARMS__ ) { 216 __kernel_backtrace(); 217 218 // reset default signal handler 219 __kernel_sigdefault( SIGABRT ); 220 221 raise( SIGABRT ); 139 222 } 140 223
Note:
See TracChangeset
for help on using the changeset viewer.