$ gdb --args ./T5435_v_gcc v ./T5435_load_v_gcc.o...(gdb) runStarting program: /mnt/ext/exp/ghc/testsuite/tests/rts/T5435_v_gcc v ./T5435_load_v_gcc.o[Thread debugging using libthread_db enabled]Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".initializer runProgram received signal SIGSEGV, Segmentation fault.__GI__IO_fflush (fp=0xe3403000) at iofflush.c:4040 iofflush.c: No such file or directory.(gdb) bt#0 __GI__IO_fflush (fp=0xe3403000) at iofflush.c:40#1 0xb6ff6150 in ?? ()Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Sometimes it also segfaults inside of,
#1 0xb6e15c3c in _IO_new_file_write (f=0xb6ff7000, data=0xb6ff616c, n=6) at fileops.c:1253
Here's another outcome with a useful backtrace due to compiling with -debug,
(gdb) runStarting program: /mnt/ext/exp/ghc/testsuite/tests/rts/T5435_v_gcc v ./T5435_load_v_gcc.o[Thread debugging using libthread_db enabled]Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".post-initLinkerpost-ifProgram received signal SIGILL, Illegal instruction.0xb6ff7000 in ?? ()(gdb) bt#0 0xb6ff7000 in ?? ()#1 0x002be160 in ocRunInit_ELF (oc=0x0) at rts/Linker.c:5685#2 0x002be160 in ocRunInit_ELF (oc=0x38e9d8) at rts/Linker.c:5685#3 0x002b9ea4 in resolveObjs_ () at rts/Linker.c:2447#4 0x002b9f30 in resolveObjs () at rts/Linker.c:2475#5 0x0000ad3c in r3ze_info$def ()Backtrace stopped: previous frame identical to this frame (corrupt stack?)
relocations for section 6 using symtab 12 and strtab 13Rel entry 0 is raw( (nil) 0xa02)`initializer' resolves to 0xb6ff6138Reloc: P = 0xb6ff6190 S = 0xb6ff6138 A = (nil)Flushed 0xb6ff7000 - 0xb6ff753cFlushed 0xb6ff6008 - 0xb6ff6138init 0xb6ff6190Program received signal SIGILL, Illegal instruction.0xb6ff7000 in ?? ()
Indeed it looks like the location with the initializer (0xb6ff6190) was never flushed.