From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 6C976BC5A for ; Wed, 1 Dec 2010 16:22:09 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqsAAKv29UzRVda2imdsb2JhbACjCwgVAQEBCgkMBw8GHqoEi3wBBY4MAQSFR4pqhgI X-IronPort-AV: E=Sophos;i="4.59,283,1288566000"; d="scan'208";a="90509068" Received: from mail-iw0-f182.google.com ([209.85.214.182]) by mail1-smtp-roc.national.inria.fr with ESMTP; 01 Dec 2010 16:22:08 +0100 Received: by iwn39 with SMTP id 39so8968286iwn.27 for ; Wed, 01 Dec 2010 07:22:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=Bbfr10tB6kD3O9NdHzQGxk1PKFJSgsZ0ctZqirF255o=; b=YXNA8tuPckYHRHEUALoY9nZ31sQFrVwXV0hDxxa2x3pKXKYs1XP+iHyquJU/TnkmZH s/t7Pi1yzLWCbMX3idW9GPNeSjIAZNvDgR1H7WIqjvbtJbv6nzL9mbRYKREft1aFEwC6 1uXkySOJM1cTnt41o/mN3LfA1cmpCeyNnPAG4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=xjPSynez4HuSfAvFHuxE7tkcxQXA3nWaHnSAgbG/mQS2As3vyqv7KKscA+DJzrV0wt pfqu96a6ZK7h9g9Bi+F1T4JPviiZSXqIIP2rC70ebQ10b7YbFA7i3x2e3v2MoM6f0gyG n5Sxv6oBdg8Y5pKgrPo3W1x2iDqhSYhxNeljc= Received: by 10.231.17.11 with SMTP id q11mr9043055iba.102.1291216890838; Wed, 01 Dec 2010 07:21:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.176.134 with HTTP; Wed, 1 Dec 2010 07:21:10 -0800 (PST) In-Reply-To: References: From: Philippe Veber Date: Wed, 1 Dec 2010 16:21:10 +0100 Message-ID: Subject: Re: [Caml-list] Tips to find the cause of a seg fault To: Ilya Seleznev Cc: caml users Content-Type: multipart/alternative; boundary=00032557497e1b7d0604965adc3b X-Spam: no; 0.00; lablgl:01 ocamlsdl:01 segfaults:01 gentoo:01 bytecode:01 marshaling:01 gdb:01 lablgl:01 ocamlsdl:01 segfaults:01 gentoo:01 bytecode:01 marshaling:01 gdb:01 ubuntu:98 --00032557497e1b7d0604965adc3b Content-Type: text/plain; charset=ISO-8859-1 2010/12/1 Ilya Seleznev > On Wed, Dec 1, 2010 at 5:08 AM, Philippe Veber > wrote: > > Short story (details below): I'm currently writing a program relying on > > react, lablgl and ocamlsdl. This program segfaults on my laptop under two > > linux distributions (ubuntu and gentoo) but doesn't on a PC under ubuntu. > > The seg fault occurs with both bytecode and native executables. I don't > do > > any marshaling nor use any typing magic; stack overflow is not likely. I > > humbly ask this list about means to improve valgrind or gdb outputs, > which > > don't report informative function names, or more generally, any tip that > > could help me to locate the origin of the problem. > > I would log mouse events, that went into 'picking_handler' to ensure > that no unexpected input sent by SDL. > > Thanks for your answer. Unfortunately from the event type there is not much to learn that could help here. Or at least I don't see what ... Or maybe you're refering to a low level logging, that is, log values at the C binding level ? ph. --00032557497e1b7d0604965adc3b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2010/12/1 Ilya Seleznev <itsuart@gmail.com>=
On Wed, Dec 1, 2010 at 5:08 AM, Philippe Veber
<philippe.veber@googlem= ail.com> wrote:
> Short story (details below): I'm currently writing a program relyi= ng on
> react, lablgl and ocamlsdl. This program segfaults on my laptop under = two
> linux distributions (ubuntu and gentoo) but doesn't on a PC under = ubuntu.
> The seg fault occurs with both bytecode and native executables. I don&= #39;t do
> any marshaling nor use any typing magic; stack overflow is not likely.= I
> humbly ask this list about means to improve valgrind or gdb outputs, w= hich
> don't report informative function names, or more generally, any ti= p that
> could help me to locate the origin of the problem.

I would log mouse events, that went into 'picking_handler' to= ensure
that no unexpected input sent by SDL.

=A0Thanks fo= r your answer. Unfortunately from the event type there is not much to learn= that could help here. Or at least I don't see what ... Or maybe you= 9;re refering to a low level logging, that is, log values at the C binding = level ?
ph.
--00032557497e1b7d0604965adc3b--