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

Coverage Pin Tool Gives Incorrect Output For 32-bit Traces #25

Closed
0xAlexei opened this Issue Dec 2, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@0xAlexei

0xAlexei commented Dec 2, 2017

The coverage Pin tool outputs address incorrectly for 32 bit traces.

I think this can be fixed by explicitly casting ADDRINTs image.low_ and image.high_ at https://github.com/gaasedelen/lighthouse/blob/master/coverage/pin/CodeCoverage.cpp#L208 to to uint64_t, as the format string calls for that, and if we're on a 32 bit trace, the format string will pull too much off the stack - and will also break outputting the module name. Doing so appeared to fix the issue on my system, but I haven't tested enough to issue a PR knowing it won't break anything...

@gaasedelen

This comment has been minimized.

Show comment
Hide comment
@gaasedelen
Owner

gaasedelen commented Dec 2, 2017

@agustingianni

This comment has been minimized.

Show comment
Hide comment
@agustingianni

agustingianni Dec 2, 2017

Contributor

Interesting, thanks for the report @bulaza I will try to fix this.

Contributor

agustingianni commented Dec 2, 2017

Interesting, thanks for the report @bulaza I will try to fix this.

@gaasedelen gaasedelen added the bug label Dec 2, 2017

@gaasedelen gaasedelen added this to the v0.7.0 milestone Dec 2, 2017

@0xAlexei

This comment has been minimized.

Show comment
Hide comment
@0xAlexei

0xAlexei Dec 5, 2017

Also note that the OnImageLoad callback printing out address works fine, as it uses the "lx" format specifier, but the one during output uses "llx"

0xAlexei commented Dec 5, 2017

Also note that the OnImageLoad callback printing out address works fine, as it uses the "lx" format specifier, but the one during output uses "llx"

@gaasedelen

This comment has been minimized.

Show comment
Hide comment
@gaasedelen

gaasedelen Dec 5, 2017

Owner

This should now be fixed. I cleaned up a few other types that the compiler was throwing warnings for.

I'll build new binaries for the v0.7 release.

Owner

gaasedelen commented Dec 5, 2017

This should now be fixed. I cleaned up a few other types that the compiler was throwing warnings for.

I'll build new binaries for the v0.7 release.

@gaasedelen gaasedelen closed this Dec 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment