drrun overwrites LD_PRELOAD when using -late
Created by: mattgreen
Describe the bug
When using drrun
's -late
mode of injection, LD_PRELOAD
is employed to load the DR support libraries. In the process of doing so, DR overwrites the existing value of LD_PRELOAD
, rather than appending to the existing value.
To Reproduce
$ cd <DR_ROOT>/bin64
$ LD_PRELOAD=libtest.so ./drrun -late -c ../samples/bin64/libbbcount.so -- env
Note that the output does not include libtest.so
.
Expected behavior
LD_PRELOAD
's value should be preserved through invocations of drrun
.
Versions Occurs on 7.1 and 8.0 releases on Linux on both 32/64 bit builds.
Additional context PR coming shortly. Issue migrated from Google Groups discussion.