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

Out-of-date camlp4 causes segfault in ocamlopt.opt #7598

Closed
vicuna opened this issue Jul 25, 2017 · 6 comments
Closed

Out-of-date camlp4 causes segfault in ocamlopt.opt #7598

vicuna opened this issue Jul 25, 2017 · 6 comments
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented Jul 25, 2017

Original bug ID: 7598
Reporter: bartjacobs
Assigned to: @damiendoligez
Status: resolved (set by @xavierleroy on 2017-10-19T13:24:18Z)
Resolution: fixed
Priority: normal
Severity: crash
Platform: x64
OS: macos
OS Version: 10.11.6
Version: 4.05.0
Target version: 4.06.0 +dev/beta1/beta2/rc1
Fixed in version: 4.06.0 +dev/beta1/beta2/rc1
Category: lexing and parsing
Related to: #7599
Monitored by: @gasche

Bug description

Suggested fix: add code to detect incompatibility and produce helpful error message.

Steps to reproduce

Install version 4.05 of OCaml and 4.04+1 of camlp4. Create file foo.ml containing the text

type bar = < quux: unit >

Run

ocamlopt.opt -c -pp camlp4o.opt foo.ml

This creates a segfault. See the OS X crash report attached.

File attachments

@vicuna
Copy link
Author

vicuna commented Jul 25, 2017

Comment author: @gasche

(to devs) I would assume that the AST magic number should have been checked before deserialization of the AST. Does this report suggest that we have forgotten to update the AST magic number between 4.04 and 4.05? If so, then we could fix this in the 4.05 branch and in trunk.

@vicuna
Copy link
Author

vicuna commented Sep 21, 2017

Comment author: @xavierleroy

To show the updates to the AST magic numbers:
git log -L87,88:utils/config.mlp

Looks like they were updated in 4.03 and in 4.04 but not in 4.05 indeed.

@vicuna
Copy link
Author

vicuna commented Oct 5, 2017

Comment author: @damiendoligez

See #1402

@vicuna
Copy link
Author

vicuna commented Oct 13, 2017

Comment author: @alainfrisch

Gabriel: you mentioned bumping magic number in 4.05? Do you know if a bug fix release on 4.05 is planned?

@vicuna
Copy link
Author

vicuna commented Oct 13, 2017

Comment author: @gasche

I don't know, but we can discuss this.

Aside: I don't feel confident about magic numbers and I would be happier to let other people take care of it. For now they have been bumped in trunk, but not in the 4.06 release branch, so my impression is that something is still wrong.

@vicuna
Copy link
Author

vicuna commented Oct 19, 2017

Comment author: @xavierleroy

Magic numbers were bumped in 4.06. I'm skeptical about a new release of 4.05. Marking this PR as resolved.

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

No branches or pull requests

2 participants