Library for systematic machine state comparisons around any instrumentation sequence
Today, many of our tests of instrumentation simply run it on a small application. Yet if the instrumentation corrupts part of the application's machine state, the application may not notice it at all. What we'd like is to perform systematic, exhaustive machine state comparisons across the instrumentation sequence. We do have some tests like this: e.g., the api.detach_state
test. The idea here is to make some kind of library that makes it easy to add such tests everywhere. Perhaps instead of the application itself checking its own state, it would be easier to apply (since different features require different applications for whatever they're targeting) if the checks are in client code that acquires the application mcontext. That won't work for detach where there is no client on the other side, and it won't catch bugs in dr_get_mcontext() itself (like #4508 (closed)), but it would catch many types of bugs.