You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include "dr_api.h"
DR_EXPORT void dr_init(client_id_t id) {
int three = atoi("3");
dr_printf("%d\n", three);
}
Rebuild (need to run 'cmake .' to pick up the new .c file) and run it on ls, and I get a segfault with this stack trace:
#0 0x0000000048855cc1 in ____strtoll_l_internal () #1 0x0000000048853240 in atoi () #2 0x000000007200067b in dr_init (id=0) at /afs/csail.mit.edu/u/r/rnk/dynamorio/git-clone/api/samples/atoi.c:6 #3 0x0000000071272237 in instrument_init ()
at /afs/csail.mit.edu/u/r/rnk/dynamorio/git-clone/core/x86/instrument.c:527 #4 0x0000000071079f1b in dynamorio_app_init ()
at /afs/csail.mit.edu/u/r/rnk/dynamorio/git-clone/core/dynamo.c:620 #5 0x00007f741ec95a56 in _init () at /afs/csail.mit.edu/u/r/rnk/dynamorio/git-clone/core/linux/preload.c:186 #6 0x00007f741eea8718 in call_init () from /lib64/ld-linux-x86-64.so.2 #7 0x00007f741eea8847 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2 #8 0x00007f741ee9ba9a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2 #9 0x0000000000000001 in ?? () #10 0x00007fffb63dab8c in ?? () #11 0x0000000000000000 in ?? ()
I don't have enough debug info for libc to tell what it's trying to do, but I'm guessing this is a complication of having two versions of libc in the address space. -no_private_loader fixes the problem. -mangle_app_tls didn't solve this problem, so I'm not sure what the issue is.
I'll leave this assigned to me; I may look at it later. It's possible this is the same issue as issue #480 .
From [email protected] on June 09, 2011 17:37:03
To reproduce:
Place the following client in api/samples/atoi.c:
#include "dr_api.h"
DR_EXPORT void dr_init(client_id_t id) {
int three = atoi("3");
dr_printf("%d\n", three);
}
Rebuild (need to run 'cmake .' to pick up the new .c file) and run it on ls, and I get a segfault with this stack trace:
#0 0x0000000048855cc1 in ____strtoll_l_internal ()
#1 0x0000000048853240 in atoi ()
#2 0x000000007200067b in dr_init (id=0) at /afs/csail.mit.edu/u/r/rnk/dynamorio/git-clone/api/samples/atoi.c:6
#3 0x0000000071272237 in instrument_init ()
at /afs/csail.mit.edu/u/r/rnk/dynamorio/git-clone/core/x86/instrument.c:527
#4 0x0000000071079f1b in dynamorio_app_init ()
at /afs/csail.mit.edu/u/r/rnk/dynamorio/git-clone/core/dynamo.c:620
#5 0x00007f741ec95a56 in _init () at /afs/csail.mit.edu/u/r/rnk/dynamorio/git-clone/core/linux/preload.c:186
#6 0x00007f741eea8718 in call_init () from /lib64/ld-linux-x86-64.so.2
#7 0x00007f741eea8847 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#8 0x00007f741ee9ba9a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#9 0x0000000000000001 in ?? ()
#10 0x00007fffb63dab8c in ?? ()
#11 0x0000000000000000 in ?? ()
I don't have enough debug info for libc to tell what it's trying to do, but I'm guessing this is a complication of having two versions of libc in the address space. -no_private_loader fixes the problem. -mangle_app_tls didn't solve this problem, so I'm not sure what the issue is.
I'll leave this assigned to me; I may look at it later. It's possible this is the same issue as issue #480 .
Original issue: http://code.google.com/p/dynamorio/issues/detail?id=494
The text was updated successfully, but these errors were encountered: