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

Segfault when calling _lf_check_deadline #1123

Closed
housengw opened this issue Apr 28, 2022 · 0 comments · Fixed by #1126
Closed

Segfault when calling _lf_check_deadline #1123

housengw opened this issue Apr 28, 2022 · 0 comments · Fixed by #1126
Labels
bug Something isn't working c Related to C target

Comments

@housengw
Copy link
Contributor

housengw commented Apr 28, 2022

The root cause of the segfault is thatself->executing_reaction is NULL inside _lf_check_deadline, so when the check deadline function tries to dereference self->executing_reaction to get the deadline, it dereferences a NULL pointer.

Minimal Example to reproduce:

target C;

main reactor {
    reaction(startup) {=
        lf_check_deadline(self, true);
    =}
}

Running this code gives a segfault.
This bug has caused the AnytimePrime.lf example in the experimental repo to fail.

@housengw housengw added the c Related to C target label Apr 28, 2022
@housengw housengw changed the title self->executing_reaction is NULL inside _lf_check_deadline Segfault when calling _lf_check_deadline Apr 28, 2022
@petervdonovan petervdonovan added the bug Something isn't working label May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working c Related to C target
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants