Testing on a CircleCI Ubuntu 18.04 box, I find that preload test cases crash during glibc finalization.
#0 0x00007faf504bd205 in _IO_flush_all_lockp (do_lock=do_lock@entry=0) at genops.c:754
#1 0x00007faf504bd4d5 in _IO_cleanup () at genops.c:929
#2 0x00007faf50471222 in __run_exit_handlers (status=0, listp=<optimized out>,
run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:130
#3 0x00007faf5047125a in __GI_exit (status=<optimized out>) at exit.c:139
#4 0x00007faf5044fbfe in __libc_start_main (main=0x55a570c0b63a <main>, argc=1, argv=0x7ffc5b527b98,
init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc5b527b88)
at ../csu/libc-start.c:344
#5 0x000055a570c0b55a in _start ()
... where rax is a garbled mess, not a legit function pointer.
This is something to do with 'pointer guard'. Clearly we don't have the right value in %fs:0x30. We can probably put a watchpoint on this (use __runt_tls_block_base()) and see what's happening.
Testing on a CircleCI Ubuntu 18.04 box, I find that preload test cases crash during glibc finalization.
... because _IO_flush_all_lockp is doing this:
... where rax is a garbled mess, not a legit function pointer.
This is something to do with 'pointer guard'. Clearly we don't have the right value in
%fs:0x30
. We can probably put a watchpoint on this (use__runt_tls_block_base()
) and see what's happening.