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
-annot option causes segfault #6149
Comments
Comment author: @bobzhang Since the source file does not make sense, I uploaded a marshalized ast _build> ocamlc.opt -annot -w +a-4-32-30 -c -w -41 -o src/stdFan.cmo marshal_ast.ml |
Comment author: @bobzhang It seems to be the location problem |
Comment author: @alainfrisch Can you elaborate? Issue #5961 gave a proper assert failure, not a segfault. |
Comment author: @bobzhang Can you reproduce this behavior on your machine?
|
Comment author: @bobzhang It seems like Stypes.record is corrupted, but it's not obvious to me |
Comment author: @damiendoligez I have reproduced the behaviour on my machine with this command line: |
Comment author: @damiendoligez Your AST file is not correctly formed. As you can see in the dump I've attached, it contains two Pexp_function constructors (lines 237 and 244), each with one element in its (pattern * expression) list. In both patterns (lines 241 and 248) the ppat_loc field is incorrect: instead of a Location.t, it's a Lexing.position. |
Original bug ID: 6149
Reporter: @bobzhang
Status: closed (set by @damiendoligez on 2015-02-26T15:44:32Z)
Resolution: not a bug
Priority: normal
Severity: minor
Version: 4.01.0+dev
Target version: 4.02.2+dev / +rc1
Category: ~DO NOT USE (was: OCaml general)
Parent of: #5961
Monitored by: @gasche
Bug description
This is hard to produce since it's based on a preprocessor.
What I observed:
_build>ocamlc.opt -w +a-4-32-30 -c -w -41 -pp 'boot/fan -printer p' -I src -I common -o src/stdFan.cmo src/stdFan.ml
File "src/stdFan.ml", line 6, characters 0-11:
Warning 33: unused open Format.
_build> ocamlc.opt -annot -w +a-4-32-30 -c -w -41 -pp 'boot/fan -printer p' -I src -I common -o src/stdFan.cmo src/stdFan.ml
File "src/stdFan.ml", line 6, characters 0-11:
Warning 33: unused open Format.
Segmentation fault: 11
_build>ocamlc.opt -v
The OCaml compiler, version 4.01.0+dev22-2013-08-20
Standard library directory: /Users/bobzhang/.opam/4.01.0dev+trunk/lib/ocaml
File attachments
The text was updated successfully, but these errors were encountered: