DROPTION_FLAG_ACCUMULATE is not reset on detach
drcachesim has an accumulation option -record_function and you can see in the burst_malloc test, which does several re-attaches, that the option is never reset on detach:
$ ctest -V -R burst_malloc
pre-DR init
Warning: duplicated function name malloc in -record_function or -record_heap_value malloc|1&free|1&tc_malloc|1&tc_free|1&__libc_malloc|1&__libc_free|1&calloc|2&malloc|1&return_big_value|1
pre-DR start
pre-DR detach
DynamoRIO statistics:
<...>
all done
pre-DR init
Warning: duplicated function name malloc in -record_function or -record_heap_value malloc|1&free|1&tc_malloc|1&tc_free|1&__libc_malloc|1&__libc_free|1&calloc|2&malloc|1&return_big_value|1&malloc|1&return_big_value|1
Warning: duplicated function name malloc in -record_function or -record_heap_value malloc|1&free|1&tc_malloc|1&tc_free|1&__libc_malloc|1&__libc_free|1&calloc|2&malloc|1&return_big_value|1&malloc|1&return_big_value|1
Warning: duplicated function name return_big_value in -record_function or -record_heap_value malloc|1&free|1&tc_malloc|1&tc_free|1&__libc_malloc|1&__libc_free|1&calloc|2&malloc|1&return_big_value|1&malloc|1&return_big_value|1
pre-DR start
pre-DR detach
DynamoRIO statistics:
<...>
all done
pre-DR init
Warning: duplicated function name malloc in -record_function or -record_heap_value malloc|1&free|1&tc_malloc|1&tc_free|1&__libc_malloc|1&__libc_free|1&calloc|2&malloc|1&return_big_value|1&malloc|1&return_big_value|1&malloc|1&return_big_value|1
Warning: duplicated function name malloc in -record_function or -record_heap_value malloc|1&free|1&tc_malloc|1&tc_free|1&__libc_malloc|1&__libc_free|1&calloc|2&malloc|1&return_big_value|1&malloc|1&return_big_value|1&malloc|1&return_big_value|1
Warning: duplicated function name return_big_value in -record_function or -record_heap_value malloc|1&free|1&tc_malloc|1&tc_free|1&__libc_malloc|1&__libc_free|1&calloc|2&malloc|1&return_big_value|1&malloc|1&return_big_value|1&malloc|1&return_big_value|1
Warning: duplicated function name malloc in -record_function or -record_heap_value malloc|1&free|1&tc_malloc|1&tc_free|1&__libc_malloc|1&__libc_free|1&calloc|2&malloc|1&return_big_value|1&malloc|1&return_big_value|1&malloc|1&return_big_value|1
Warning: duplicated function name return_big_value in -record_function or -record_heap_value malloc|1&free|1&tc_malloc|1&tc_free|1&__libc_malloc|1&__libc_free|1&calloc|2&malloc|1&return_big_value|1&malloc|1&return_big_value|1&malloc|1&return_big_value|1
pre-DR start
pre-DR detach
DynamoRIO statistics:
<...>
all done
droption today has no control point on exit or detach. Maybe it could provide a droption_reset_values() function and clients could call it in their exit events?