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

Caml-mode: Stack overflow in regexp matcher #5176

Closed
vicuna opened this issue Nov 7, 2010 · 4 comments
Closed

Caml-mode: Stack overflow in regexp matcher #5176

vicuna opened this issue Nov 7, 2010 · 4 comments
Assignees

Comments

@vicuna
Copy link

vicuna commented Nov 7, 2010

Original bug ID: 5176
Reporter: @Chris00
Assigned to: @damiendoligez
Status: closed (set by @damiendoligez on 2012-02-03T20:39:19Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.13.0+dev
Fixed in version: 3.13.0+dev
Category: ~DO NOT USE (was: OCaml general)
Tags: caml-mode
Monitored by: @Chris00

Bug description

Compiling

class gen =
object(self)
inherit Odoc_html.html

end

let () =
Odoc_args.set_doc_generator (Some(new gen :> Odoc_args.doc_generator))

with -annot and asking for a type in Emacs with caml-mode reports the error “Stack overflow in regexp matcher”.

File attachments

@vicuna
Copy link
Author

vicuna commented Nov 12, 2010

Comment author: @Chris00

The simple attached patch fixes the problem (but there may be a better fix).

@vicuna
Copy link
Author

vicuna commented May 20, 2011

Comment author: @damiendoligez

I can't reproduce the problem with 3.12.0, and your code doesn't compile with 3.13.* because of changes in ocamldoc. I really would like to see what kind of .annot file triggers the problem.

@vicuna
Copy link
Author

vicuna commented May 21, 2011

Comment author: @Chris00

I uploaded a file a.ml and the corresponding a.annot (produced with 3.12). Put the cursor on "self" and press C-c C-t to trigger the bug.

@vicuna
Copy link
Author

vicuna commented Feb 3, 2012

Comment author: @damiendoligez

I've simplified the regexp further, and it now works on a 4000-line type (20 times your example), but fails on 8000 lines. Emacs regexp optimization is a bit mysterious.

(Pretty much) fixed in trunk [3.13.0] (commit 12119).

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