From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 7C68380161 for ; Wed, 21 Jun 2017 16:20:50 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=markus.weissmann@in.tum.de; spf=Pass smtp.mailfrom=markus.weissmann@in.tum.de; spf=None smtp.helo=postmaster@mail-out1.informatik.tu-muenchen.de Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of markus.weissmann@in.tum.de) identity=pra; client-ip=131.159.0.8; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="markus.weissmann@in.tum.de"; x-sender="markus.weissmann@in.tum.de"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of markus.weissmann@in.tum.de designates 131.159.0.8 as permitted sender) identity=mailfrom; client-ip=131.159.0.8; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="markus.weissmann@in.tum.de"; x-sender="markus.weissmann@in.tum.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-out1.informatik.tu-muenchen.de) identity=helo; client-ip=131.159.0.8; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="markus.weissmann@in.tum.de"; x-sender="postmaster@mail-out1.informatik.tu-muenchen.de"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AUjbXkRAkLb5CrYZBIAPVUyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSPT/psbcNUDSrc9gkEXOFd2CrakV1KyO6+jJYi8p2d65qncMcZhBBVcuqP?= =?us-ascii?q?49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6?= =?us-ascii?q?JvjvGo7Vks+7y/2+94fdbghMhjexe69+IAmrpgjNq8cahpdvJLwswRXTuHtIfO?= =?us-ascii?q?pWxWJsJV2Nmhv3+9m98p1+/SlOovwt78FPX7n0cKQ+VrxYES8pM3sp683xtBnM?= =?us-ascii?q?VhWA630BWWgLiBVIAgzF7BbnXpfttybxq+Rw1DWGMcDwULs5Qiqp4bt1RxD0iS?= =?us-ascii?q?cHLz85/3/Risxsl6JQvRatqwViz4LIfI2ZMfxzdb7fc9wHX2pMRsleWDBODI2y?= =?us-ascii?q?b4UBEfcPMuRWr4f+qFoBowCzBRWvCePt1jNEmmX70K883u88EQ/GxgsgH9cWvX?= =?us-ascii?q?rTttr1LqQSUf2uzKbQzTrMcfJW3jf46IfSdBAhp+yHULV1ccXL00kvFB7Fjk6K?= =?us-ascii?q?pY3rITyV1/8Ns3Oe7+V6U+KvjXUqqwB3ojS12scsl4zJipgIxV/a7Ch0xps+K9?= =?us-ascii?q?O/SE5+e9GkEZ1QujmGN4trR8MuWXxntzg8x7YbupC7ZDAHxIkpyhLCcfCLboiF?= =?us-ascii?q?7xb5WOqNOzt1h3Roc6+liRmo60iv0Oj8W9G00FlUqipFlcHBtnUX2BzS7siLU/?= =?us-ascii?q?x9/lq92TqSzQzT6+dEIU4zlarBLp4u2KIwlpsQsUjZAi/2hVz6jKqLdko6/Oin?= =?us-ascii?q?9+TnbavgppOGKoB7lBnyMqUomsOhHeQ1KhUCUmaG9eimybHu/Un0TK9WgvEska?= =?us-ascii?q?TVqJXaKt4apq69DQ9VyIEj6xOnAjejytsYh3oHLE9eeB6dgYnmJVDOIOvjDfe6?= =?us-ascii?q?mVusljFryuvHPr3nGJnNMmXDkLL7cblg9UFQ0BAzwsxH55JIFrEBJ+r+VVPru9?= =?us-ascii?q?zdCh81Kgi0w+f8CNVhzY4eQmKOAqqBMKzIq1OI5+QvI/ONZIAPojr9JeIltLbS?= =?us-ascii?q?iiobnkQdNYOkx5cWbn3wSvZhOEWxa3f2jtYHHCEMsxZoH8Lwj1jXdDdJZGupaJ?= =?us-ascii?q?0x54Y+AYSgRdPGT5qunafHwyq6BYZTb2ZAIlGKV2v1csOIVqFfO2qpPsZ9n2lc?= =?us-ascii?q?BvCaQIg72ETr7Veixg=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CQAAAtgEpZhwgAn4NdHAEBBAEBCgEBF?= =?us-ascii?q?wEBBAEBCgEBgmWBKoENg2yLDJBplXiCESiFfAKCdEEWAQEBAQEBAQEBAQESAQE?= =?us-ascii?q?BCgsJCCgvgjMkAYJBAQIDIw8BBUEQBAcYAgImAgJXBhuKJAGqJIImi1UBAQEBB?= =?us-ascii?q?gEBAQEkgQuKZod8gmEFnmJ8kl2CZ4g4hniVESYIgTMwRV2FDRAMgWh0iWoBAQE?= X-IPAS-Result: =?us-ascii?q?A0CQAAAtgEpZhwgAn4NdHAEBBAEBCgEBFwEBBAEBCgEBgmW?= =?us-ascii?q?BKoENg2yLDJBplXiCESiFfAKCdEEWAQEBAQEBAQEBAQESAQEBCgsJCCgvgjMkA?= =?us-ascii?q?YJBAQIDIw8BBUEQBAcYAgImAgJXBhuKJAGqJIImi1UBAQEBBgEBAQEkgQuKZod?= =?us-ascii?q?8gmEFnmJ8kl2CZ4g4hniVESYIgTMwRV2FDRAMgWh0iWoBAQE?= X-IronPort-AV: E=Sophos;i="5.39,369,1493676000"; d="scan'208";a="280019684" Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jun 2017 16:20:49 +0200 Received: from webmail.in.tum.de (localhost [IPv6:::1]) by vmrbg98.informatik.tu-muenchen.de (Postfix) with ESMTP id AE71F415EB; Wed, 21 Jun 2017 16:20:43 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 21 Jun 2017 16:20:43 +0200 From: =?UTF-8?Q?Markus_Wei=C3=9Fmann?= To: Josh Berdine Cc: Julia Lawall , caml-list@inria.fr In-Reply-To: References: <88108a18-8044-bc46-bed3-aef241b4ff48@linux-france.org> Message-ID: <42eb6b3d11e5171103a9ecf22c52c2d6@in.tum.de> X-Sender: markus.weissmann@in.tum.de User-Agent: Roundcube Webmail/1.2.3 Subject: Re: [Caml-list] segmentation fault On 2017-06-19 23:15, Josh Berdine wrote: > On Mon, Jun 19 2017, Julia Lawall wrote: > >> On Mon, 19 Jun 2017, David MENTRÉ wrote: >> >>> Hello Julia, >>> >>> Le 2017-06-18 à 21:41, Julia Lawall a écrit : >>> > Over several >>> > runs on two different laptops, the backtraces have nothing obvious in >>> > common. The bytecode version does not seem to stack overflow. Adding >>> > Gc.print_stat() at a periodic quiescent point in the execution did not >>> > show a memory leak. >>> >>> A similar issue related to random crash in native code version was >>> asked >>> by Alexey Egorov on this list 9 days ago. Daniel Bünzli advised to >>> him >>> to frequently call Gc.full_major () to have a crash closer to the >>> real >>> issue. >> >> OK, I will try this. > > Are you using Windows? I have only experienced segfaults from stack > overflow on Windows. > you can easily get a stack overflow on Linux when you use C bindings: the "stack touch" that checks for sufficient free space on the stack before calling external code may well trigger a SEGFAULT, even though it is not the fault of the C-code but of the OCaml-code that filled the stack. I found my bug by adding [@tailcall] annotations to the recursive function calls I initially assumed would be tail recursive. regards Markus -- Markus Weißmann, M.Sc. Technische Universität München Institut für Informatik Boltzmannstr. 3 D-85748 Garching Germany http://wwwknoll.in.tum.de/