Bug to fix: drmgr counters being nonzero when exit, leading to corrupted drmemtrace traces in subsequent execution
Created by: Louis-Ye
It looks like drwrap doesn't clean up all the resources when calling drwrap_exit() in client. In might cause potential problems in clients when DR is actively invoked and stopped by the same user application several times in one run. Here is how I reproduce the problem in drcachesim client test case:
- Call
drwrap_init()
insideclients/drcachesim/tracer/tracer.cpp:drmemtrace_client_main
- Call
drwrap_exit()
insideclients/drcachesim/tracer/tracer.pp:event_exit
-
include "drwrap.h"
inclients/drcachesim/tracer/tracer.pp
, adduse_DynamoRIO_extension(${name} drwrap${ext_sfx})
underclients/drcachesim/CMakeLists.txt:configure_DynamoRIO_client
- Build with test cases
-
ctest -R .*burst_static
will fail 2 out of 3 times (test case: tool.drcacheoff.burst_static).