plasma-umass / coz

Coz: Causal Profiling
Other
4.04k stars 160 forks source link

Explicit linking crashes program #136

Closed jesperpedersen closed 4 years ago

jesperpedersen commented 4 years ago

If you explicit link against coz using

gcc -O0 -fno-omit-frame-pointer -gdwarf-4 -lpthread -lcoz -Wl,-rpath,/usr/local/lib -o threads threads.c

the program will crash with standard execution

./threads 
[libcoz.cpp:100] bootstrapping coz
[inspect.cpp:327] Debug information was not found for any in-scope executables or libraries
Aborted (core dumped)

Related to #135

threads.txt

jesperpedersen commented 4 years ago
[libcoz.cpp:100] bootstrapping coz
[inspect.cpp:327] Debug information was not found for any in-scope executables or libraries

Program received signal SIGABRT, Aborted.
0x00007ffff7d75e35 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: dnf debuginfo-install libgcc-9.2.1-1.fc30.x86_64 libstdc++-9.2.1-1.fc30.x86_64
(gdb) bt
#0  0x00007ffff7d75e35 in raise () from /lib64/libc.so.6
#1  0x00007ffff7d60895 in abort () from /lib64/libc.so.6
#2  0x00007ffff7f1af1a in ccutil::logger::~logger (this=0x7fffffffcdf0, __in_chrg=<optimized out>) at ccutil/log.h:40
#3  ccutil::logger::~logger (this=0x7fffffffcdf0, __in_chrg=<optimized out>) at ccutil/log.h:37
#4  0x00007ffff7f1ab3e in memory_map::build (this=0x7ffff7f348a0 <memory_map::get_instance()::buf>, binary_scope=std::unordered_set with 0 elements, 
    source_scope=std::unordered_set with 0 elements) at /usr/include/c++/9/bits/char_traits.h:335
#5  0x00007ffff7f22b8b in init_coz () at libcoz.cpp:132
#6  0x00007ffff7f23c33 in wrapped_main (argc=1, argv=0x7fffffffd3f8, env=0x7fffffffd408) at libcoz.cpp:175
#7  0x00007ffff7d61f43 in __libc_start_main () from /lib64/libc.so.6
#8  0x000000000040109e in _start ()
(gdb) 
jesperpedersen commented 4 years ago

Forgot -ldl