-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRASH (linux loading private library) #489
Comments
From [email protected] on June 07, 2011 12:04:13 this crash is reproducible with any client not built with this flag: => has no DT_SONAME without it. % objdump -p api/samples/bin/libmemcpp.so | grep -i soname (gdb) p *mod when using cmake the flag is added automatically. this client was custom-built. |
From [email protected] on June 07, 2011 13:03:09 So it seems the problem is because of the mis-compilation not private loader. |
From [email protected] on June 07, 2011 13:34:46 nothing imports from libmemcpp.so. therefore DT_SONAME is optional and not needed. DT_SONAME is not required in a DSO. this library is a client, so DR is told where it is as a runtime parameter. the private loader should at the least not crash mysteriously: else anyone not using cmake will think DR is completely broken b/c the simplest client crashes it. if there's some reason you can't support a client without a DT_SONAME, there should be a usage error. but I don't see any reason why you need DT_SONAME for the client? |
From [email protected] on June 07, 2011 20:12:50 Attached is a simple fix, can you try if it works? Attachment: i489.patch |
From [email protected] on June 08, 2011 02:32:08 still crashes comparing NULL. I think your patch misses the privload_modlist_initialized() is true case. you can test yourself by "make VERBOSE=1", take the two commands to build memtrace (or any other sample, really), remove the -Wl,-soname,* arg, and re-run those commands manually. (gdb) up 1 |
From [email protected] on July 03, 2011 02:02:55 fixed by r855 |
From [email protected] on July 03, 2011 02:03:21 Status: Fixed |
From [email protected] on June 07, 2011 14:45:23
split from issue #480 comment 4:
on Ubuntu 10.04 w/ the private loader we hit a SIGSEGV here:
#0 0x00007f0bc1200b28 in __strcasecmp (s1=0x72000f43 "libstdc++.so.6", s2=0x2fe229a92f <Address 0x2fe229a92f out of bounds>) at strcasecmp.c:65
#1 0x00000000711dd1bf in privload_lookup (name=0x72000f43 "libstdc++.so.6") at /home/username/DR/core/loader_shared.c:273
#2 0x00000000712a15a8 in privload_process_imports (mod=0x4157fb38) at /home/username/DR/core/linux/loader.c:462
#3 0x00000000711ddd2e in privload_load_finalize (privmod=0x4157fb38) at /home/username/DR/core/loader_shared.c:499
#4 0x00000000711dcddc in loader_init () at /home/username/DR/core/loader_shared.c:119
#5 0x00000000710805ab in dynamorio_app_init () at /home/username/DR/core/dynamo.c:496
#6 0x00007f0bc20d0b00 in _init () at /home/username/DR/core/linux/preload.c:186
#7 0x00007f0bc22e5d25 in call_init (main_map=0x7f0bc24f8128, argc=1, argv=0x7fffe229ba78, env=0x7fffe229ba88) at dl-init.c:70
#8 _dl_init (main_map=0x7f0bc24f8128, argc=1, argv=0x7fffe229ba78, env=0x7fffe229ba88) at dl-init.c:134
#9 0x00007f0bc22d7b2a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#10 0x0000000000000001 in ?? ()
basically we've had to revert to pre-private-loader to get this C++ client to work
Original issue: http://code.google.com/p/dynamorio/issues/detail?id=489
The text was updated successfully, but these errors were encountered: