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

[analyzer] Fix processing of llvm-objdump-14's output in ikos-scan (#203) #240

Merged

Conversation

ivanperez-keera
Copy link
Collaborator

The output format of llvm-objdump has changed since version 9 (the one supported by IKOS 3.0) and version 14 (the one supported by IKOS 3.1). Specifically, the output produces one fewer empty line prior to the actual content of the section being extracted from a binary file.

This difference is breaking ikos-scan, which parses the output of llvm-objdump looking for the section.

The way that such output is produced by llvm-objdump is hard-coded. There are no settings that would allow us to obtain only the hex the section we are looking for without the preceding preamble, address or the posterior ASCII.

This commit updates the code that processes the output to skip only three lines, conforming to the output produced by llvm-objdump-14. The code is also documented to help understand the nature of that magic number, as well as other aspects of that "parser".

…ASA-SW-VnV#203).

The output format of llvm-objdump has changed since version 9 (the one
supported by IKOS 3.0) and version 14 (the one supported by IKOS 3.1).
Specifically, the output produces one fewer empty line prior to the
actual content of the section being extracted from a binary file.

This difference is breaking ikos-scan, which parses the output of
llvm-objdump looking for the section.

The way that such output is produced by llvm-objdump is hard-coded.
There are no settings that would allow us to obtain only the hex the
section we are looking for without the preceding preamble, address or
the posterior ASCII.

This commit updates the code that processes the output to skip only
three lines, conforming to the output produced by llvm-objdump-14. The
code is also documented to help understand the nature of that magic
number, as well as other aspects of that "parser".
@ivanperez-keera ivanperez-keera marked this pull request as ready for review December 5, 2023 09:35
@ivanperez-keera ivanperez-keera merged commit 03293b7 into NASA-SW-VnV:master Dec 5, 2023
2 checks passed
@ivanperez-keera ivanperez-keera deleted the dev-objdump-output branch December 5, 2023 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant