Browse thread
Sending compiler into an infinite loop or stack overflow.
- Guillaume Yziquel
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2010-04-16 (13:27) |
From: | Guillaume Yziquel <guillaume.yziquel@c...> |
Subject: | Sending compiler into an infinite loop or stack overflow. |
Hello. Here is a compiler infinite loop / stack overflow error. In the toplevelm yuo get the following, but using ocamlc, you get an infinite loop. > yziquel@seldon:~$ ocaml > Objective Caml version 3.11.2 > > # type untyped;; > type untyped > # type -'a typed = private untyped;; > type 'a typed = private untyped > # type -'typing wrapped = private sexp > and +'a t = 'a typed wrapped > and sexp = private untyped wrapped;; > type 'a wrapped = private sexp > and 'a t = 'a typed wrapped > and sexp = private untyped wrapped > # class type ['a] s3 = object > val underlying : 'a t > end;; > class type ['a] s3 = object val underlying : 'a t end > # class ['a] s3object r : ['a] s3 = object > val underlying = r > end;; > Fatal error: exception Stack_overflow I've tracked it down it down on some other but similar code to the Ctype module. > Objective Caml Debugger version 3.11.1 > > (ocd) start > Loading program... done. > `start not meaningful in outermost frame. > (ocd) step 6516537 > Time : 6516537 - pc : 392692 - module Ctype > 134 let name = match path with Path.Pident id -> <|b|>Ident.name id > (ocd) run > Time : 6516782 > Program end. > Uncaught exception: Stack_overflow > (ocd) Unfortunately, I'm getting quite lost in the compiler source code, so I'd appreciate some background information on how to deal with this issue. All the best, Guillaume Yziquel. -- Guillaume Yziquel http://yziquel.homelinux.org/