From: William Lee Irwin III <wli@holomorphy.com>
To: Alessandro Baretta <alex@baretta.com>
Cc: Ocaml <caml-list@inria.fr>
Subject: Re: [Caml-list] Compiler killer code?
Date: Sat, 8 Jun 2002 07:34:02 -0700 [thread overview]
Message-ID: <20020608143402.GQ6777@holomorphy.com> (raw)
In-Reply-To: <3D02156D.7070303@baretta.com>
On Sat, Jun 08, 2002 at 04:32:13PM +0200, Alessandro Baretta wrote:
> Is the type inference algorithm guaranteed to termintate? I
> ask because I have accidentally attempted to evaluate a
> (meaningless) function which almost hanged my Athlon.
> The killer code is the following:
> type t = t -> t
> let f (x:t) :t = f f
> If I type this into the toplevel, it starts to allocate
> memory by the tens of megabytes, until I have to kill it to
> prevent a system crash. I let it reach approximately 128MB
> before killing it. (BTW, that was with ocaml 3.04+13
> 2002-06-05.)
> Is the language really supposed to accept such garbage as
> that which I wrote?
I get this instead:
# type t = t -> t;;
The type abbreviation t is cyclic
Cheers,
Bill
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2002-06-08 14:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-08 14:32 Alessandro Baretta
2002-06-08 14:34 ` William Lee Irwin III [this message]
2002-06-08 18:30 ` William Lovas
2002-06-09 13:29 ` Alessandro Baretta
2002-06-09 13:41 ` Xavier Leroy
2002-06-09 18:08 ` Blair Zajac
2002-06-10 10:57 ` [Caml-list] " Michal Moskal
2002-06-12 8:37 ` Xavier Leroy
2002-06-10 15:25 ` [Caml-list] " Xavier Leroy
2002-06-10 2:42 ` Jacques Garrigue
2002-06-10 7:47 ` Alessandro Baretta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020608143402.GQ6777@holomorphy.com \
--to=wli@holomorphy.com \
--cc=alex@baretta.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox