-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty coverage file on 32-bit Windows #13
Comments
Interesting. I think there might be two separate issues here. For notepad example, can you run it with For ExampleTarget.exe, could you give the full command line you used? |
And could you also give me the exact windows version you're using? |
Update: I tried a few experiments with this on Windows 10 32-bit (version 2004) and everything appeared to be running normally. But perhaps there is some difference in behavior in earlier Windows. |
Currently running a Windows 7 32-bit and building with Visual Studio 2017. I'm going to try rebuilding everything from scratch as well as testing on a Windows 10 machine, though it sounds like that should work fine. |
It almost looks like, on your configuration, the original module code isn't getting marked as non-executable properly, so the original code continues to execute instead of the instrumented one. |
Building an x86 bin on Windows 10 gives me a working binary that I can capture coverage from. If I take this binary and drop it into a Windows 7 x86 environment, I get an empty coverage file. So the issue appears to be with older versions of Windows. |
Interesting. I actually created a clean Windows 7 32-bit VM to test it, updated it, built TinyInst and, as far as I can tell, everything is working normally. Running Perhaps there's something specific about your system that is causing problems. I suspect an antivirus/antimalware or similar product messing with memory permissions TinyInst sets (either causing it to fail even though it returns success, or changing permissions at a later point). If you want to take a look at TinyInst code, this is where the target memory permissions for the module get set Line 541 in cc678d7
|
While debugging a separate issue, I discovered that the basic example you give for running
litecov
doesn't appear to work on a 32-bit Windows machine, compiled with Visual Studio 2017. The following produces an empty coverage file:I'm using the latest
TinyInst
code and version 11.0.1 of xed on a 32-bit Windows machine.In trying to capture
target_function
coverage information from another binary (ExampleTarget.exe
), I got the following output:Even though the target function is called repeatedly,
litecov
only seems to hit it once. I additionally have-trace_basic_blocks
set (along with-trace_debug_events
), but don't seem to see any of that output. Note in the above that I did add some output toDebugger::HandleTargetEnded
to check what the breakpoint was and what it was translated to on reset.Thanks!
The text was updated successfully, but these errors were encountered: