DynamoRIO / DynamoRIO/dynamorio

SIGSEGV while trying to run memtrace & memval_simple from sample clients

Open
#6,391 8 comments 0 reactions 2 assignees Claimed by @atharvabhanage12 View on GitHub
Status-CannotReproduce Status-NeedInfo
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

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

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. #26~22.04.1-Ubuntu. x86_64

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.