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

semgrep-core segfault on stack overflow on linux: upgrade ocaml as soon as practical #3904

Closed
mjambon opened this issue Sep 19, 2021 · 2 comments
Labels
bug Something isn't working devops Building issues, distribution issues, CI issues priority:medium

Comments

@mjambon
Copy link
Member

mjambon commented Sep 19, 2021

A bug that was causing segmentation faults instead of a clean Stack_overflow exception was just fixed in ocaml/ocaml#10633. This bug affects semgrep on linux (x86_64).

Impact: This makes stack overflows a possible source of segfaults on linux. On darwin, it is know that we still get segfaults on stack overflows.

The solution for us is to upgrade ocaml to a version that includes the fix. Semgrep-core for linux is built in docker on an alpine image updated weekly by https://github.com/returntocorp/ocaml-layer, so this is the project to modify to get the fix in.

@mjambon mjambon added bug Something isn't working priority:medium devops Building issues, distribution issues, CI issues labels Sep 19, 2021
@mjambon
Copy link
Member Author

mjambon commented Sep 19, 2021

A crash was obtained outside of semgrep-core on a very simple test program that just uses alcotest and a test that exhausts stack space. The full report is here: ocaml/ocaml#10645

@nbrahms
Copy link
Contributor

nbrahms commented Nov 8, 2021

Should be fixed in Semgrep 0.70.0

@nbrahms nbrahms closed this as completed Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working devops Building issues, distribution issues, CI issues priority:medium
Development

No branches or pull requests

2 participants