============= Source Code ============= testit.cpp #include #include #include void strlenInStatic() { printf( "Calling: strlenInStatic()\n"); fflush(stdout); static int int1 = strlen( "Blah1" ); } int main( int argc, char *argv[] ) { system( "pidin -p testit mem" ); // To show area of crash strlenInStatic(); printf( "main: to exit.\n"); return 0; } ============= Compile line ============= qcc -V4.2.4,gcc_ntoppc -EB -DQNX -DQNX_ppc -Y_ecpp -o testit testit.cpp TRIED ALSO (with same result): qcc -V4.2.4,gcc_ntoppc -EB -DQNX -DQNX_ppc -DVARIANT_be -Y_acpp -o testit testit.cpp ============= Run "testit" on Freescale 8572ds ============= # ./testit pid tid name prio STATE code data stack 3321871 1 ./testit 10r REPLY 4096 80K 8192(516K)* libc.so.3 @fe300000 488K 12K libecpp.so.4 @fe380000 140K 24K Calling: strlenInStatic() Process 3321871 (testit) terminated SIGILL code=1 fltno=1 ip=fe38b854(libecpp.so.4@__cxa_guard_release+0x24) mapaddr=0000b854. ref=00000000 Illegal instruction (core dumped) ============= Core file analysis on GDB, on Windows ============= C:\myprogs>ntoppc-gdb testit testit.core GNU gdb 6.7 qnx-nto (rev. 233) ... This GDB was configured as "--host=i386-mingw32msvc --target=powerpc-unknown-nto-qnx6.4.0". ... Reading symbols from C:\myprogs/libecpp.so.4...done. Loaded symbols for libecpp.so.4 Reading symbols from C:\myprogs/libc.so.3...done. Loaded symbols for libc.so.3 Symbol file not found for fpemu.so.2 Program terminated with signal 4, Illegal instruction. #0 __cxa_guard_release (g=0x48041d90) at ../../../../../libstdc++-v3/libsupc++/guard.cc:80 80 ../../../../../libstdc++-v3/libsupc++/guard.cc: No such file or directory. in ../../../../../libstdc++-v3/libsupc++/guard.cc ... (gdb) bt #0 __cxa_guard_release (g=0x48041d90) at ../../../../../libstdc++-v3/libsupc++/guard.cc:80 #1 0x4804093c in strlenInStatic () #2 0x48040980 in main () (gdb) ============= ntoppc-objdump --disassemble-all libecpp.so.4 ====== ... 0000b850 <__cxa_guard_release>: b850: 7c 08 02 a6 mflr r0 b854: 94 21 ff f0 stwu r1,-16(r1) b858: 48 01 8d 7d bl 245d4 b85c: 93 c1 00 08 stw r30,8(r1) b860: 7f c8 02 a6 mflr r30 b864: 90 01 00 14 stw r0,20(r1) b868: 89 23 00 01 lbz r9,1(r3) b86c: 39 29 ff ff addi r9,r9,-1 b870: 99 23 00 01 stb r9,1(r3) b874: 7c 20 04 ac lwsync <<<<<<<<<< ILLEGAL instruction