moralismercatus / crete

Open source concolic testing tool for binaries
1 stars 1 forks source link

Investigate how to avoid preloading valgrind #122

Open moralismercatus opened 9 years ago

moralismercatus commented 9 years ago

I haven't found a way to run valgrind as follows:

valgrind "LD_PRELOAD=libcrete_host_preload.so ./harness"

Instead, I have to run it this way:

LD_PRELOAD=libcrete_host_preload.so valgrind ./harness

In this case, I need to specially check whether we've preloaded main of the target executable, or valgrind, or another program that valgrind calls before executing the target binary.

This isn't a huge concern, and the check is fine as a workaround (there's some overhead). Just if you have some a little time or insight, it may be worthwhile to revisit.

moralismercatus commented 9 years ago

Perhaps the best solution (suggested by Bo) is to simply not use preload. Just separate command line arguments and files and call the executable natively with that data.

Once this is done, preload should be unnecessary.

moralismercatus commented 8 years ago

Previous comment contains an oversight. Arguments still require preload, as not all input is valid command line input. This, in turn, raises the question of whether command line input should be implicitly constrained to valid command line input in which case the former comment is reasonable.