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

Wakeup Tree destructor is recursive, causing issues with large programs #111

Open
Redhotsmasher opened this issue May 17, 2021 · 1 comment
Labels

Comments

@Redhotsmasher
Copy link

These MWEs simply call an external function a million times and seem to consistently trigger a segmentation fault inside Nidhugg. I suspect this might be the/a reason some of my longer tests (> 100000 traces) occasionally crash Nidhugg.
mwes.zip

@margnus1
Copy link
Contributor

While I can't reproduce the problem with "extfunctest.c", the other two seem to cause nidhugg to stack overflow in the recursive destructor for the wakeup tree. I believe this is due to the trace of the program being very long. Of course, we should not do recursion over the length of the trace, but unfortunately we'll have to eschew some of the conveniences of C++ to address this.

In the meantime, if you're on Linux, you can adjust the maximum stack size with ulimit -Ss SIZE_IN_KB. This should workaround the issue. Note that beyond the recursion issue, nidhugg will also misbehave if the trace is longer than 2³¹ LLVM IR instructions.

@margnus1 margnus1 added the bug label May 18, 2021
@margnus1 margnus1 changed the title Calling external functions as black boxes occasionally crashes Nidhugg Wakeup Tree destructor is recursive, causing issues with large programs Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants