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

(temporary) fix for 4.03 segfault #46

Merged
merged 5 commits into from
Jun 18, 2016
Merged

Conversation

gasche
Copy link
Contributor

@gasche gasche commented Jun 11, 2016

The following series of commits implements the work-around discussing in #45, using Obj.magic (Sys.opaque_identity 0.0) instead of Obj.magic 0.0. I believe that the code is still wrong, but it segfaults strictly less¹. The long-term solution would be to use option references for field, but it is a more invasive change that I'd rather let @mjambon do, if he has the time before the next time it breaks.

¹: without this patchset, atdgen's testsuite segfaults under 4.03 (with or without flambda), with the patchset it works. See the long comment in the "compiler internal" part of the testsuite for an attempt at an explanation.

@mjambon
Copy link
Owner

mjambon commented Jun 18, 2016

Thanks for the detailed explanations and sorry for the delays. I'm going to release this.

The next step for me is to get rid of Obj.magic and generate pure OCaml code for reading record fields. I'm not sure about the impact on performance, but it will be less maintenance. For my current purposes it will be just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants