-
Notifications
You must be signed in to change notification settings - Fork 591
Description
I was trying to observe the Load and store of a simple cpp program. so get all the loads and store operation and their address where load and store happens and data in it. So came across dynamo rio. While i was trying to use the sample client memtrace_x86.c
which is libmemtrace_x86_text.so. I Received SIGSEGV.
using LINUX x86_64
The command ->. drrun -root /home/athbha01/dr_dynamorio/drio/DynamoRIO-Linux-10.0.19613 -c /home/athbha01/dr_dynamorio/drio/DynamoRIO-Linux-10.0.19613/samples/build_ath_track/bin/libmemtrace_x86_text.so -debug -- ./myprogram_test1
The code in myprogram_test1 is
int main() {
// int curr_var=444;
int *ptr =( int*) malloc(4);
printf("Address of the pointer ptr : %p\n", ptr);
*ptr = 444 ;
printf("Addition Operation");
*ptr = *ptr + 1 ;
printf("Division Operation");
*ptr = *ptr/ 2 ;
// int* m4=&curr_var;
// printf("Address of pointer ptr: %p\n", (int *)m4);
// printf("Address of the pointer ptr : %p\n",ptr);
printf("Value of the pointer ptr : %d\n",*ptr);
return 0;
}
So when i executed the command i got this segmentation error it apprently also gives segmentation fault when i simply have main(){}.
ERROR::
~/dr_dynamorio/working_my_space$ drrun -root /home/athbha01/dr_dynamorio/drio/DynamoRIO-Linux-10.0.19613 -c /home/athbha01/dr_dynamorio/drio/DynamoRIO-Linux-10.0.19613/samples/build_ath_track/bin/libmemtrace_x86_text.so -debug -- ./myprogram_test1
Client memtrace is running
Data file /home/athbha01/dr_dynamorio/drio/DynamoRIO-Linux-10.0.19613/samples/build_ath_track/bin/memtrace.myprogram_test1.1186561.0000.log created
<Application /home/athbha01/dr_dynamorio/working_my_space/myprogram_test1 (1186561). DynamoRIO Sample Client 'memtrace' internal crash at PC 0x00007f906a0681d3. Please report this at http://dynamorio.org/issues[.](http://dynamorio.org/issues.) Program aborted.
Received SIGSEGV at pc 0x00007f906a0681d3 in thread 1186561
Base: 0x00007f906a600000
Registers:eax=0x0000000000000000 ebx=0x00007f8e266e1d20 ecx=0x0000000000000000 edx=0x00000000fbad248c
esi=0x00000000fbad0000 edi=0x00007ffc83095170 esp=0x00007ffc83095168 ebp=0x0000000000000000
r8 =0x00007f906a1ed0c0 r9 =0x00007f902660805e r10=0x00007f906a7de000 r11=0x0000000000000246
r12=0x00007ffc83095170 r13=0x00007f906a1f2a50 r14=0x0000000000000000 r15=0x00007f8e266e1d20
eflags=0x0000000000010246
version 10.0.19613, custom build
-no_dynamic_options -client_lib '/home/athbha01/dr_dynamorio/drio/DynamoRIO-Linux-10.0.19613/samples/build_ath_track/bin/libmemtrace_x86_text.so;0;"-debug"' -client_lib64 '/home/athbha01/dr_dynamorio/drio/DynamoRIO-Linux-10.0.19613/samples/build_ath_track/bin/libmemtrace_x86_text.so;0;"-debug"' -code_api -stack_size 56K
0x00007f8e26692080 0x0000000000000000>
Please also answer these questions:
- What happens when you run without any client?
-> it works , it works for all other clients besides which is related to mem. like memtrace, memval. for rest it works. - What happens when you run with debug build ("-debug" flag to drrun/drconfig/drinject)?
-> same error
Versions - What version of DynamoRIO are you using?
drrun version 10.0.19613 -- build 0
About system:
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Linux. handle pre-thread-init and post-exit signals #26~22.04.1-Ubuntu. x86_64