8000 Better SEGV handling by NickBarnes · Pull Request #4061 · oxcaml/oxcaml · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Better SEGV handling #4061

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NickBarnes
Copy link
Contributor
@NickBarnes NickBarnes commented May 29, 2025

Fixes two things related to SEGV handling:

  • Our SEGV handler assumes that the domain lock is held (which specifically in some cases means that Caml_state is set), so a SEGV when it's not held causes a SEGV inside our handler, and since we have SA_NODEFER set this re-enters and blows up the stack. With this PR we are more careful.
  • We didn't co-operate with any other SEGV handler, such as one which is installed before ours. Part of making the runtime more library-like is to be more co-operative: here by passing off a SEGV we don't recognise to any such prior handler. We have to hope that any other libraries in our process are similarly co-operative towards us.

@NickBarnes NickBarnes force-pushed the segv-handler-domain-lock branch from c7a9576 to 03d69f5 Compare June 23, 2025 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0