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 0A2BEBC57 for ; Wed, 1 Dec 2010 06:51:45 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoMAABJx9UzRVdg2kGdsb2JhbACDUJ84CBUBAQEBCQkMBxEEHqlsiSg8ghiFBS6IVgEBAwWBHIMzcwSEWoYJ X-IronPort-AV: E=Sophos;i="4.59,282,1288566000"; d="scan'208";a="90455729" Received: from mail-qw0-f54.google.com ([209.85.216.54]) by mail1-smtp-roc.national.inria.fr with ESMTP; 01 Dec 2010 06:51:44 +0100 Received: by qwj9 with SMTP id 9so1176140qwj.27 for ; Tue, 30 Nov 2010 21:51:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=jkaz1FhZ2fwfF3H23bEn3z7fdJGeGR54i+ZOLNy+WXg=; b=ngZ+3y+Jvv8zUPKpNBy9Tv0VrsEMkprsGTIvJEtU0c88I9zfNU3fXDst9yRZuY4+hX HqrTJYBqYCrvrSiKH2wopkrOn9gvv0pz2nZgp47msGqkLtrrTaC7coj0NS+8NdbnUi5F 1NQolgyTKGKBOXkrZP3CpESo+ErfiJP8ypVYk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=tuz/KwqrNeHw0LnjiBESxc5mUch9TcCJKgJVJgRpsMpMYUiPUImpwLORDuOKMZyTdb hR9g0kmDZd7mATmYU7Y3mY93LDrUeJj9tmTb7O9s4PsOBpAnmImlFsJyNOeCauNNiTOp qy97+I57NYOU7339+GvvEDMhZ/GyVj/MCSvDw= MIME-Version: 1.0 Received: by 10.229.189.72 with SMTP id dd8mr7008519qcb.123.1291182703965; Tue, 30 Nov 2010 21:51:43 -0800 (PST) Received: by 10.229.229.140 with HTTP; Tue, 30 Nov 2010 21:51:43 -0800 (PST) In-Reply-To: References: Date: Wed, 1 Dec 2010 11:51:43 +0600 Message-ID: Subject: Re: [Caml-list] Tips to find the cause of a seg fault From: Ilya Seleznev To: Philippe Veber Cc: caml users Content-Type: text/plain; charset=UTF-8 X-Spam: no; 0.00; lablgl:01 ocamlsdl:01 segfaults:01 gentoo:01 bytecode:01 marshaling:01 gdb:01 ubuntu:98 ubuntu:98 wrote:01 stack:01 typing:01 caml-list:01 executables:01 short:01 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. -- With best regards, Ilya Seleznev