DynamoRIO / dynamorio

Dynamic Instrumentation Tool Platform
Other
2.62k stars 556 forks source link

client output goes to application output file #2507

Open algrant-arm opened 7 years ago

algrant-arm commented 7 years ago

Try running this Python program:

import os
os.system('/bin/sh -c "echo hello" >temp.out')

with -c libopcodes.so. Overall this results in 3 outputs from dropcodes... but one of them goes in temp.out:

$ cat temp.out
hello
Top 15 opcode execution counts in 64-bit AMD64 mode:
          3079 : jnbe
      ...

This is cut down from a much larger build script which was failing when run with the opcodes client - one build step was writing a file read by another step, and the file was being polluted by opcodes output. Reproduced on x86_64 and AArch64.

derekbruening commented 7 years ago

DR goes to some effort to isolate the file descriptors used by clients from those used by the app. Something in that code must be going wrong here.