Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006371OCamlCamlp4public2014-04-16 06:432014-04-16 08:21
Reporterwhitequark 
Assigned Togarrigue 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionfixed 
Platform64-bit LinuxOSDebianOS Version7.0
Product Version 
Target VersionFixed in Version4.02.0+dev 
Summary0006371: Unable to compile camlp4 39af3807183e on 4.02.0+dev4-2014-04-03
DescriptionIf I try to compile camlp4 trunk on ocaml trunk, it exhibits unbounded recursion while executing:

$HOME/.opam/4.02.0dev+trunk/bin/ocamlc.opt -c -g -warn-error A -w a -I camlp4/import -I camlp4/config -I camlp4/boot -o camlp4/boot/Camlp4.cmo camlp4/boot/Camlp4.ml

Attaching gdb to the process reveals that the loop consists of calls to:
0x00000000004f1150 in camlBtype__iter_type_expr_1466 ()
0x00000000004f189f in camlBtype__it_type_expr_1518 ()

(The cycle is larger than just these two calls.)

This issue is very problematic, because I have to use trunk to get -ppx, and such commonly used packages as lwt or oasis have a hard dependency on camlp4.

Later, I will try to bisect the OCaml tree between the separation of camlp4 and trunk.
Steps To Reproduce$ git clone git://github.com/ocaml/camlp4 [^]
$ cd camlp4
$ ./configure
$ make all
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0011287)
whitequark (developer)
2014-04-16 08:07

Bisecting points to this: https://github.com/ocaml/ocaml/commit/fb74ef5e51a247f212208372b6ab293f71afb8b7 [^]

I'm a bit at a loss of how to fix it.
(0011289)
garrigue (manager)
2014-04-16 08:19

Fixed in trunk, revision 14608.
The implementation of Btype.type_iterators ignored cycles in types.

Note that camlp4 is not in sync with trunk, so that you just get a type error at this point.
(0011290)
whitequark (developer)
2014-04-16 08:21

This was impressively quick. Thanks!

I'm planning to get camlp4 with trunk myself and send a pull request.

- Issue History
Date Modified Username Field Change
2014-04-16 06:43 whitequark New Issue
2014-04-16 08:07 whitequark Note Added: 0011287
2014-04-16 08:19 garrigue Note Added: 0011289
2014-04-16 08:19 garrigue Status new => resolved
2014-04-16 08:19 garrigue Fixed in Version => 4.02.0+dev
2014-04-16 08:19 garrigue Resolution open => fixed
2014-04-16 08:19 garrigue Assigned To => garrigue
2014-04-16 08:21 whitequark Note Added: 0011290


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker