Changes in / [997324c:1f951abd]
- Files:
-
- 3 edited
-
libcfa/src/interpose.cfa (modified) (4 diffs)
-
libcfa/src/interpose_thread.cfa (modified) (2 diffs)
-
src/InitTweak/FixInitNew.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/interpose.cfa
r997324c r1f951abd 10 10 // Created On : Wed Mar 29 16:10:31 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Feb 24 15:31:03202313 // Update Count : 1 8512 // Last Modified On : Thu Mar 2 13:56:26 2023 13 // Update Count : 191 14 14 // 15 15 … … 53 53 54 54 static generic_fptr_t interpose_symbol( const char symbol[], const char version[] ) { 55 static void * library; 56 static void * pthread_library; 57 55 void * library; 56 #if defined( RTLD_NEXT ) 57 library = RTLD_NEXT; 58 #else 59 library = dlopen( "libc.so.6", RTLD_LAZY ); 58 60 if ( ! library ) { 59 library = dlopen( "libc.so.6", RTLD_LAZY );60 61 const char * error = dlerror(); 61 62 if ( error ) { … … 63 64 } // if 64 65 } // if 65 if ( ! pthread_library ) { 66 pthread_library = dlopen( "libpthread.so", RTLD_LAZY ); 67 const char * error = dlerror(); 68 if ( error ) { 69 abort( "interpose_symbol : failed to open libpthread, %s\n", error ); 70 } // if 71 } // if 66 #endif 72 67 73 68 return do_interpose_symbol(library, symbol, version); … … 108 103 109 104 if(__cfathreadabi_interpose_startup) __cfathreadabi_interpose_startup( do_interpose_symbol ); 105 106 // SKULLDUGGERY: In Ubuntu 22.04, someone augmented signal.h to allow SIGSTKSZ to be "sysconf(_SC_SIGSTKSZ)" in 107 // sigstksz.h, as well as 8192 in sigstack.h. HOWEVER, they forgot to provide a mechanism to tell signal.h to 108 // use sigstack.h rather than sigstksz.h. (I'm not happy.) By undefining _GNU_SOURCE before signal.h and 109 // redefining it afterwards, you can get 8192, but then nothing works correctly inside of signal.h without 110 // _GNU_SOURCE defined. So what is needed is a way to get signal.h to use sigstack.h WITH _GNU_SOURCE defined. 111 // Basically something is wrong with features.h and its use in signal.h. 112 113 #undef SIGSTKSZ 114 #define SIGSTKSZ 8192 110 115 111 116 // As a precaution (and necessity), errors that result in termination are delivered on a separate stack because -
libcfa/src/interpose_thread.cfa
r997324c r1f951abd 39 39 const char version[] 40 40 ) libcfa_public { 41 static void * library; 41 void * library; 42 #if defined( RTLD_NEXT ) 43 library = RTLD_NEXT; 44 #else 45 // missing RTLD_NEXT => must hard-code library name, assuming libstdc++ 46 library = dlopen( "libthread_db.so", RTLD_LAZY ); 42 47 if ( ! library ) { 43 library = dlopen( "libpthread.so", RTLD_LAZY );44 48 const char * error = dlerror(); 45 49 if ( error ) { … … 47 51 } 48 52 } // if 53 #endif // RTLD_NEXT 49 54 50 55 return do_interpose_symbol(library, symbol, version); -
src/InitTweak/FixInitNew.cpp
r997324c r1f951abd 522 522 { 523 523 static UniqueName tempNamer("_tmp_cp"); 524 assert( env );525 524 const CodeLocation loc = impCpCtorExpr->location; 526 525 // CP_CTOR_PRINT( std::cerr << "Type Substitution: " << *env << std::endl; ) … … 534 533 535 534 // xxx - this originally mutates arg->result in place. is it correct? 535 assert( env ); 536 536 result = env->applyFree( result.get() ).node; 537 537 auto mutResult = result.get_and_mutate();
Note:
See TracChangeset
for help on using the changeset viewer.