From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA00295; Wed, 8 May 2002 16:58:49 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA00357 for ; Wed, 8 May 2002 16:58:48 +0200 (MET DST) Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.25.148.40]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g48EwkD25254 for ; Wed, 8 May 2002 16:58:46 +0200 (MET DST) Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id g48EwiXt013714 for ; Thu, 9 May 2002 00:58:44 +1000 (EST) Received: from ozemail.com.au (ppp98.dyn146.pacific.net.au [210.23.146.98]) by wisma.pacific.net.au with ESMTP id AAA21850 for ; Thu, 9 May 2002 00:58:42 +1000 (EST) Message-ID: <3CD93D21.6030505@ozemail.com.au> Date: Thu, 09 May 2002 00:58:41 +1000 From: John Max Skaller User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2.1) Gecko/20010901 X-Accept-Language: en-us MIME-Version: 1.0 To: caml-list@inria.fr Subject: [Caml-list] Weird bug References: <20020507154306.B18437@pauillac.inria.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I've just produced some strange behaviour in my program. I get "Not_found" exception.. when I turn on my programs debug tracing, the program works. Some trivial input that previously worked now causes my program to core dump. [Heh .. some test input to the compiler works fine .. but when I add print "Hello world\n"; to the end, my compiler core dumps .. the same statement compiles find in other places, and it compiles fine with debug tracing on] So .. this sounds like memory corruption to me. But the only way a "nice" ocaml program should be able to corrupt memory is by a stack overflow. [My code is "nice" NO arrays, NO magic, NO C routines called .. its a compiler, all list and hashtable stuff -- the only nasty thing is that I have ocamlopt.opt --rectypes] Previously I noticed that this was trapped (an actual infinite recursion gracefully exited with a stack overflow message .. nice!!) I find it hard to believe my program has exceeded any sensible limitations (some of the typing in the parser is really flogging the ocaml compiler .. 20 second compilation .. was 1 second .. but the generated code should be small). Question: any known bugs in ocaml that could cause this? Question: I previously found a serious bug with polymorphic variants in Ocaml 3.02. The code that triggered the bug works fine with 3.01 and with 3.04. Has that bug been identified and fixed (or was I just lucky ..and now unlucky again)? Question: is stack overflow always trapped? It seems unlikely that I have an infinite recursion .. since turning on debug output shouldn't change the flow of control [though it is possible .. since the output is controlled by a flag ..] -- John Max Skaller, mailto:skaller@ozemail.com.au snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia. voice:61-2-9660-0850 ------------------- 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