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 KAA26782; Thu, 16 Aug 2001 10:08:33 +0200 (MET DST) 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 KAA26823 for ; Thu, 16 Aug 2001 10:08:32 +0200 (MET DST) Received: from pochi.inria.fr (pochi.inria.fr [128.93.8.128]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f7G88VP13583 for ; Thu, 16 Aug 2001 10:08:31 +0200 (MET DST) Received: (from mentre@localhost) by pochi.inria.fr (8.11.1/8.10.0) id f7G88VZ00576; Thu, 16 Aug 2001 10:08:31 +0200 X-Authentication-Warning: pochi.inria.fr: mentre set sender to David.Mentre@inria.fr using -f To: caml-list@inria.fr Subject: [Caml-list] Segfault in a native code multi-threaded program From: David Mentre Date: 16 Aug 2001 10:08:30 +0200 Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello dear Camlers, My multi-threaded program works well with the byte code compiler but (sometimes) produces a segfault with the native code compiler. How can I have more info to find the specific line of code that produces this segfault? I've tried to run gdb but even when the program works until its end, gdb is blocked. My environment: x86 Linux. Quoting the FAQ[1], they are several possible issues: > * when accessing out of range in a vector or string, when the compilers > does not generate bound checking (due to explicit user's request), No. Standard compilation with all checks. > * when attempting to perform an illegal floating point operation > (division by 0), on some processors running under some OSes (e.g. alpha > processor under True64 Unix), No. No floating point operations. > * when the program is looping and consumes the whole memory for the > execution stack, when the overflow check cannot detect this situation > (for instance, in case of a native code program running under > Unix), I think no. My program is running well in byte code. > * when using ``magic coercion'' from the Obj module, No. I don't use this feature. > * in case of erroneous usage (i.e. ill-typed usage) of marshalling > primitives output_value, input_value, etc, > Err, maybe. However, how to find where? And my program is working in byte code! > * when calling user's defined external functions (for instance written in > C) and when the interface is wrong (since effective types of primitives > are not the types declared to the Caml compiler). > No. No external functions. >Very often, you should use the Caml debugger to precisely find where in your >code the error is occurring, and then correct the program. I can't use the debugger as it does not work with multi-threaded programs. Best regards, david [1] http://caml.inria.fr/FAQ/FAQ_EXPERT-eng.html#bus_error -- David.Mentre@inria.fr Opinions expressed here are only mine. ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr