Skip to content

(temporary) fix for 4.03 segfault#46

Merged
mjambon merged 5 commits intomjambon:masterfrom
gasche:fix-4.03-segfault
Jun 18, 2016
Merged

(temporary) fix for 4.03 segfault#46
mjambon merged 5 commits intomjambon:masterfrom
gasche:fix-4.03-segfault

Conversation

@gasche
Copy link
Copy Markdown
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
Copy Markdown
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