SRI-CSL / OCCAM

OCCAM: Object Culling and Concretization for Assurance Maximization
BSD 3-Clause "New" or "Revised" License
26 stars 10 forks source link

Specialization fails to complete with configuration priming: gprof #47

Closed mudbri closed 2 years ago

mudbri commented 3 years ago

I encounter an error when I run slash with configuration priming on gprof. The make file to get bitcode, test input file, and manifest file is included in the zip: gprof_config_issue.zip

The issue can be reproduced in the following way:

  1. make
  2. In static_args option in gprof.manifest, correct the path for the input file. The input file ("name") has been included in the zip
  3. slash --work-dir=slash_gprof --enable-config-prime --disable-inlining --inter-spec-policy=none --intra-spec-policy=onlyonce --use-pointer-analysis gprof.manifest

Note: The specialization is successful if we don't use the --enable-config-prime flag with slash. Error:

Traceback (most recent call last): File "/home/vagrant/.local/bin/slash", line 33, in sys.exit(load_entry_point('razor==1.1.2', 'console_scripts', 'slash')()) File "/home/vagrant/.local/lib/python3.6/site-packages/razor/slash.py", line 103, in entrypoint return Slash(sys.argv).run() if utils.checkOccamLib() else 1 File "/home/vagrant/.local/lib/python3.6/site-packages/razor/slash.py", line 368, in run passes.config_prime(pre, post, list(), dynamic_args) File "/home/vagrant/.local/lib/python3.6/site-packages/razor/passes.py", line 434, in config_prime driver.previrt(input_file, output_file, args) File "/home/vagrant/.local/lib/python3.6/site-packages/razor/driver.py", line 75, in previrt return run(config.get_llvm_tool('opt'), args, **opts) File "/home/vagrant/.local/lib/python3.6/site-packages/razor/driver.py", line 173, in run raise ex razor.driver.ReturnCode: /usr/lib/llvm-10/bin/opt -load=/home/vagrant/occam/lib/libSeaDsa.so -load=/home/vagrant/occam/lib/libprevirt.so /home/vagrant/issue_examples/readelf/gprof_objdump/slash_gprof/gprof.a.bc -o=/home/vagrant/issue_examples/readelf/gprof_objdump/slash_gprof/gprof.a.cp.bc -O1 -Pconfig-prime -Pconfig-prime-unknown-args=0 returned -11

mudbri commented 3 years ago

I get the same error in objdump. I am attaching the make file, build file, along with the log here

The issue can be reproduced in the following way:

  1. make
  2. bash build.sh --enable-config-prime --use-pointer-analysis --disable-inlining
caballa commented 2 years ago

This problem should be fixed in commit 068140023ca11af3ee00bdb0fbc4e050382ed220