branch: externals/caml
commit 6084272b5a1f71a954414c3da3f070599860fa95
Author: Damien Doligez <damien.doligez-inria.fr>
Commit: Damien Doligez <damien.doligez-inria.fr>
PR#5176: caml-types.el: large types trigger stack overflow in regexp matcher
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12119
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
caml-types.el | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/caml-types.el b/caml-types.el
index 70d38bc..bc4c82b 100644
--- a/caml-types.el
+++ b/caml-types.el
@@ -411,8 +411,7 @@ See `caml-types-location-re' for annotation file format.
(unless (caml-types-not-in-file l-file r-file target-file)
(setq annotation ())
(while (next-annotation)
- (cond ((looking-at
- "^\\([a-z]+\\)(\n \\(\\([^\n)]\\|.)\\|\n[^)]\\)*\\)\n)")
+ (cond ((looking-at "^\\([a-z]+\\)(\n \\(\\(.*\n \\)*.*\\)\n)")
(let ((kind (caml-types-hcons (match-string 1) table))
(info (caml-types-hcons (match-string 2) table)))
(setq annotation (cons (cons kind info) annotation))))))