Unexpected output with specialized binary: grep
muhammad-muzammil opened this issue · 2 comments
The Linux application "grep", after specialization with OCCAM, produces an output that is inconsistent with the output of the original "grep" application. Even though the functionality works correctly, the output has an extra string attached at the start of the output. For example:
original "grep" output for the command: grep -v "hello" files/sum Binary file files/sum matches
specialized "grep" output for the command: ./grep_slash_v files/sum: binary file matches
Where sum is a text file in the files/ directory.
This error can be reproduced by following these steps:
- run ./build.sh
- run the specialized application produced and compare the output with the original application output
The required files can be found here.
I think you are comparing the grep
installed in your system with the specialized binary produced by OCCAM.
But you should compare the specialized binary with the grep
binary that you included in the zip.
./grep -v "hello" /homes/jorge/Repos/OCCAM-10/issue58/sum
./grep: /homes/jorge/Repos/OCCAM-10/issue58/sum: binary file matches
If I try the grep
binary installed in my system I get:
grep -v "hello" /homes/jorge/Repos/OCCAM-10/issue58/sum
Binary file /homes/jorge/Repos/OCCAM-10/issue58/sum matches
Note the difference between calling ./grep
and grep
.
The output with the specialized binary produced by OCCAM is:
./grep_occamized
./grep_occamized: /homes/jorge/Repos/OCCAM-10/issue58/sum: binary file matches
I'll close it for now. Feel free to reopen it if I miss something.