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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 45D7BBCAB for ; Thu, 4 Nov 2010 21:42:14 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoAAHa30kzRVdY0k2dsb2JhbACDJ5Ajji0IFQEBAQEJCQoJEQMfpByJIIJThTaJBwEBAwWBHYMxcwSKVYke X-IronPort-AV: E=Sophos;i="4.58,297,1286143200"; d="scan'208";a="77811671" Received: from mail-bw0-f52.google.com ([209.85.214.52]) by mail2-smtp-roc.national.inria.fr with ESMTP; 04 Nov 2010 21:42:13 +0100 Received: by bwz6 with SMTP id 6so1966600bwz.39 for ; Thu, 04 Nov 2010 13:41:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=h71patfvVQJwnb8+1ftS8NvMWnSN+lVQBqyDyhleVPE=; b=Urhti1zxR/Woqlh7Xq8V0Qde88eaLYwYl+YGREiQYAkuYJa3Yy1OK/GHXL1lp2Sn6b U2jwNxeoqDWC586pPLbKNrYPrbPBtq/GEGES0JjAV9ddEUMkEoVCg983GtqEqBG61DJU 0wTeXTWLA7a08N+sTZ/A3//QztMvJ9y8fYEBY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=gw7cYDUFyl70UaUd3cAyBy3EnAP/MxLK55b6RJ4R0AE6jU8DsXioyH5l7PAhth5k+U KPDlqPQmie5wyK1kEbTOlwFcb981pU5SsSTr2GIgZxrU+Z2qXH2zov3lHjyLMV7hoXGi t799+emnHcWLPJcpTGwzpUP/80iRcuqkmQn3Y= MIME-Version: 1.0 Received: by 10.204.119.136 with SMTP id z8mr1072381bkq.167.1288903294345; Thu, 04 Nov 2010 13:41:34 -0700 (PDT) Sender: till.varoquaux@gmail.com Received: by 10.204.101.199 with HTTP; Thu, 4 Nov 2010 13:41:34 -0700 (PDT) In-Reply-To: References: Date: Thu, 4 Nov 2010 16:41:34 -0400 X-Google-Sender-Auth: mIcDg7LLsED4p_iYCi91ru5l2Q4 Message-ID: Subject: Re: [Caml-list] Causes for segfaults From: Till Varoquaux To: Jamie Brandon Cc: caml-list@yquem.inria.fr Content-Type: text/plain; charset=UTF-8 X-Spam: no; 0.00; segfaults:01 patched:01 gdb:01 backtrace:01 segfault:01 gdb:01 segfaults:01 ocaml:01 ffi:01 -unsafe:01 allocating:01 arrays:01 ocaml:01 netclient:01 compilation:01 I have a personnal marked dislike for xml-light; one of the reason being that it is tied together using duct-tape and generous sprinkling Obj.magic. Probably not the cause of your problem but, and again, who knows. We (Jane street) have a patched version that does not use Obj.magic; the main reason that I haven't pushed for us to upstream these patches is that I'd rather see Xml-light die in favour of something that adheres better to the xml standards (like xmlm). It might be intersting for you to run your app in gdb and sent the backtrace of the segfault. Valgrind could also be very useful here but it is not for the faint of heart. very quick guide to gdb (although I am sure you know): _ 1) Make sure your program is compiled with -g _ 2) gdb ./my_pgm > run .... (boom!) > bt On Thu, Nov 4, 2010 at 4:19 PM, Jamie Brandon wrote: > Is there an authoritative list anywhere of the possible causes for > segfaults in ocaml? I'm not using the FFI or -unsafe and I have ruled > out overflowing the c stack and allocating large strings/arrays. I'm > using ocaml 3.09.3 with extlib, netclient, json-static, xml-light, str > and no compilation options. > > Cheers > > Jamie > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >