DynamoRIO / dynamorio

Dynamic Instrumentation Tool Platform
Other
2.57k stars 552 forks source link

Incorrect function return address for tailcall when -record_replace_retaddr flag is used on ARM. #6668

Closed ivankyluk closed 4 months ago

ivankyluk commented 4 months ago

When drcachesim is used with -offline, -record_replace_retaddr, -record_function, it leaves sentinels in the trace when a tailcall to a function which is being recorded is encountered.

The issue can be reproduced with common.getretaddr under build_suite as follows:

./build/bin64/drrun -t drcachesim -offline -record_replace_retaddr -record_function 'tailcall_with_retaddr|1&foo|1' -- ../build_suite/build_debug-internal-64/suite/tests/bin/common.getretaddr

on an ARM machine.

This issue is the same as #6394. PR6395 only fixed the issue for x86, so a change is needed to cover ARM.