Skip to content
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

Incorrect output with specialized binary using configuration priming: objdump, readelf #59

Closed
mudbri opened this issue Oct 12, 2021 · 2 comments
Assignees
Labels
occamized-binary-exec-wrong-output The specialized binary generated by OCCAM produces a wrong output over-specialization

Comments

@mudbri
Copy link

mudbri commented Oct 12, 2021

The specialized binary of readelf and objdump, when specialized with configuration priming, result in an incorrect output. The files required to reproduce the problem can be found here. The issue can be reproduced in the following way:

  1. make
  2. make manifests
  3. For readelf: slash --work-dir=slash_readelf --enable-config-prime readelf.manifest followed by make test_readelf
  4. For objdump: slash --work-dir=slash_objdump --enable-config-prime objdump.manifest followed by make test_objdump

The test compares the output of the specialized binary against the output of the unspecialized binary using the same arguments and input file. The test fails when the --enable-config-prime flag is provided but passes when the flag is not provided (e.g. slash --work-dir=slash_objdump objdump.manifest). It seems like this issue is also caused by overspecialization.

@caballa
Copy link

caballa commented Oct 19, 2021

I added a new option --config-prime-spec-only-globals (commit 8c49830) that when enabled reduces the likelihood of over-specialization. With this option, the specialized binary should produce the correct answer.

@caballa caballa added occamized-binary-exec-wrong-output The specialized binary generated by OCCAM produces a wrong output over-specialization bug Generic bug labels Oct 19, 2021
@caballa caballa self-assigned this Oct 20, 2021
@mudbri
Copy link
Author

mudbri commented Oct 21, 2021

Both of the applications are working correctly with the --config-prime-spec-only-globals option

@caballa caballa removed the bug Generic bug label Oct 21, 2021
@caballa caballa closed this as completed Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
occamized-binary-exec-wrong-output The specialized binary generated by OCCAM produces a wrong output over-specialization
Projects
None yet
Development

No branches or pull requests

2 participants