dynamorio icon indicating copy to clipboard operation
dynamorio copied to clipboard

i#6417: restore registers before syscall.

Open ivankyluk opened this issue 2 years ago • 0 comments

Restore the value of the output register for syscall before calling syscall. The output register might be used as an input parameter for the kernel. For example, ECX is used to store the length for syscall mmap2, as well as being used to store the output of the syscall.

The problem can be reproduced by running

bin32/drrun -debug -loglevel 4 -logdir . -stderr_mask 0xC -dumpcore_mask 0 -code_api -t drcachesim -ipc_name suite/tests/drtestpipe_miss_analyzer -simulator_type miss_analyzer -miss_count_threshold 5000 -miss_frac_threshold 0.25 -- suite/tests/bin/stride_benchmark

on AMD 32 bit system.

Add a new test syscall-mmap and use -record_syscall to verify the parameters to mmap/mmap2 are correct.

Issue: #6417

ivankyluk avatar Nov 27 '23 21:11 ivankyluk