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

Specialized binary results in a runtime segmentation fault with configuration priming: yices #52

Closed
mudbri opened this issue Jul 4, 2021 · 3 comments
Assignees
Labels
bug Generic bug occamized-binary-exec-crash The specialized binary generated by OCCAM crashes over-specialization

Comments

@mudbri
Copy link

mudbri commented Jul 4, 2021

Specializing yices with configuration priming results in a large reduction of functions. However, when the specialized binary is run, it results in a segmentation fault. The files required to reproduce the problem can be found here. The issue can be reproduced in the following way:

  1. cd yices
  2. make
  3. bash build.sh --enable-config-prime
  4. make test

The test solves for an example file (bool_eqs.ys) using the QF_AUFBV logic and compares the result with result from an unspecialized binary. The test fails when the --enable-config-prime flag is provided. However, the test passes when the flag is not provided (i.e. bash build.sh). To see the segmentation fault, run ./yices_occamized_stripped (after running bash build.sh --enable-config-prime).

@caballa caballa self-assigned this Jul 6, 2021
@caballa caballa added the bug Generic bug label Jul 6, 2021
@caballa
Copy link

caballa commented Jul 6, 2021

I need more time to debug this.

As a general comment, I can see that you don't pass the bitcode of the GMP library. That's OK but it's bad for configuration priming because it cannot currently execute library code. Thus, it will stop with the first creation of a GMP number. If you are interested, you can see here how we compile GMP and provide the bitcode to OCCAM so the configuration priming can be much more effective.

A follow-up question is that if it's also better to add the bitcode of musllvm. From configuration priming perspective, you don't need to because it uses FFI to call system calls.

@caballa caballa added occamized-binary-exec-crash The specialized binary generated by OCCAM crashes limitation Current limitations of OCCAM labels Aug 2, 2021
@caballa
Copy link

caballa commented Aug 2, 2021

The reason for the crash is explained in issue #54

@caballa caballa added over-specialization and removed limitation Current limitations of OCCAM labels Sep 22, 2021
@caballa
Copy link

caballa commented Sep 29, 2021

Fixed in commit a348764

@caballa caballa closed this as completed Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Generic bug occamized-binary-exec-crash The specialized binary generated by OCCAM crashes over-specialization
Projects
None yet
Development

No branches or pull requests

2 participants