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 0861C7F616 for ; Fri, 24 Feb 2017 14:51:07 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=info@gerd-stolpmann.de; spf=None smtp.mailfrom=info@gerd-stolpmann.de; spf=None smtp.helo=postmaster@mout.kundenserver.de Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=pra; client-ip=217.72.192.73; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=mailfrom; client-ip=217.72.192.73; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.kundenserver.de) identity=helo; client-ip=217.72.192.73; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="postmaster@mout.kundenserver.de"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3Ak76RpRdD+Qmg6MIJuzHLUc4flGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxc65bR7h7PlgxGXEQZ/co6odzbGH7ua6ASddvd7B6ClEK8McEUddyI?= =?us-ascii?q?0/pE8JPo2sMQXDNvnkbig3ToxpdWRO2DWFC3VTA9v0fFbIo3e/vnY4ExT7Mhdp?= =?us-ascii?q?dKyuQtaBx+z+7e25+oXSbgNUn3L9JOoqdFTl5TnW44MsgIBiI7w9giSPhz0AWe?= =?us-ascii?q?NQyHgibQaJnh38zs62+pNz8i0WvOguoYoIWqz/e+E8TKdEJDUgKWE8osPx5jfZ?= =?us-ascii?q?Sg7ayXYGXi0tjh1MGw3M6heyCpb3vCzSuedn1GyBIcryVbU9XzLk46o9G0ygsz?= =?us-ascii?q?sOKzNsqDKfscd3lq8O5Uv5/xE=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DbAAD2OLBYh0nASNldGwEBAQMBAQEJA?= =?us-ascii?q?QEBFQEBAQECAQEBAQgBAQEBhAaBCbR3gg0mhXwCgnFBFgEBAQEBAQEBAQEBEgE?= =?us-ascii?q?BAQgNCQodL4IzBAEdAQSCFwZVNAtGVwYBEgmJbwEJrzqLQgEBAQEGAQEBARUPh?= =?us-ascii?q?VqFYYRggkAMgw0FiRSTBoFXApsQhlJIkmUlAYEyNSAUPoRggW50AYhZgU8BAQE?= X-IPAS-Result: =?us-ascii?q?A0DbAAD2OLBYh0nASNldGwEBAQMBAQEJAQEBFQEBAQECAQE?= =?us-ascii?q?BAQgBAQEBhAaBCbR3gg0mhXwCgnFBFgEBAQEBAQEBAQEBEgEBAQgNCQodL4IzB?= =?us-ascii?q?AEdAQSCFwZVNAtGVwYBEgmJbwEJrzqLQgEBAQEGAQEBARUPhVqFYYRggkAMgw0?= =?us-ascii?q?FiRSTBoFXApsQhlJIkmUlAYEyNSAUPoRggW50AYhZgU8BAQE?= X-IronPort-AV: E=Sophos;i="5.35,201,1484002800"; d="asc'?scan'208";a="261951846" Received: from mout.kundenserver.de ([217.72.192.73]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-GCM-SHA256; 24 Feb 2017 14:51:06 +0100 Received: from office1.lan.sumadev.de ([85.183.69.161]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0M8iRY-1cbiuD1y5E-00C8tg; Fri, 24 Feb 2017 14:51:05 +0100 Received: from e130 (unknown [192.168.65.10]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id 9AB14DC05D; Fri, 24 Feb 2017 14:51:04 +0100 (CET) Message-ID: <1487944254.6296.63.camel@gerd-stolpmann.de> From: Gerd Stolpmann To: "Richard W.M. Jones" , caml-list@inria.fr Date: Fri, 24 Feb 2017 14:50:54 +0100 In-Reply-To: <20170224103818.GI28111@annexia.org> References: <20170224103818.GI28111@annexia.org> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-CW6524YbZaz7Dimp1UFm" X-Mailer: Evolution 3.18.5.2-0ubuntu3.1 Mime-Version: 1.0 X-Provags-ID: V03:K0:OMZU1DEadlfZCMZotYayrtn8aMM4/4+TtSp9Ju5QjjAqWhFfyxo fM7WzMiUP2FPZ8ALHwsiMDLSHc86d3oC8woCbndWoUcFkiRatS2dF73I1GlOYbwCqXuiOgR AB6y4w15aMWb2cIOWsWU8p0n69cst/Sc0E5nFgM4ho1sD3jxuRRNSsYnN5iOTGmj9hBOZYl qnwsIRwTSXG1l2uDaq+uw== X-UI-Out-Filterresults: notjunk:1;V01:K0:CJ6BM5k/fmc=:uaNWbeEvNgNRI41lgT/Hva B15tVdhR7RJ/rX9fyEI1grGICW8U41ICWBrM8kwuglYtvxsgRTL7Zpp/ySJel/BUjkUvp/lxb k40J53iqJlmDP4qrlhHlHBsB4IC7tDVq8ATeNAxHM6FpQfDS9FDeSbGqdLxPeU/kU7XY1O20J GOowRzsRFK/9qzA+xvhRdnC0WhYhBMgEajXQpGn3cvA29dtCXEEVPbjNGSF4n5FSRwYH1bU8Z dF0FKphO++v36b21wMoGl+HR9jLuRvcLpERPQcPKEpsJOlSZBItxAxT30rAzUrgoJxwCdRjMR wIPbtl8w3W0aeKTesUJW+OCmpWmn9tYT0422WMauBOxP0Bf7//EcD8IW5WVRWemLa8JeqmCZG 2lbYakMVDzG7KL9mxcWxpd3gz+bKUTH0ZIan5/OVq6Z5ZfLpaFM8OmkYV6ZEabPfWsSgQyfsx njdBCFw53956zYyId21Tf5GWJWQUEG/TwiQey6voKxqd/SDRhO3KU1wKy1bdFN2CN3vkXa1Sk kQIaPpTLNmpjnhPS8eUB8ur9u9iS6bDJfCJ3drrfx8kga05xMpsKeJmbX5f/whbtB4LUrpXNy brLBKIVHA+ekGR14GiLg/d9d3DZG/TJulUWRRA+6NBUuH/aea0HcSpvMOMJEF5cNqect1wgFu NuxjCtxtyT5JPldldoasmFXYGlm5qFcm/zwNV9Da4zKL+1HzovDgsWkZERtrDNHcZO10= Subject: Re: [Caml-list] Initializing CAMLlocalX values to Val_unit --=-CW6524YbZaz7Dimp1UFm Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Am Freitag, den 24.02.2017, 10:38 +0000 schrieb Richard W.M. Jones: > (2) We have lots of existing code which does: >=20 > =A0 CAMLlocal1 (v); > =A0 // some code here which might allocate and call the GC > =A0 v =3D ... >=20 > It's my understanding that such code might crash with the older > versions of OCaml, because when it calls the GC it will find a local > root which is initialized to 0.=A0=A0We want to continue to support the > older versions (back to 3.12 in fact), so should we change it all to: >=20 > =A0 CAMLlocal1 (v); v =3D Val_unit; > =A0 // some code here which might allocate and call the GC > =A0 v =3D ... >=20 > ?=A0=A0Interestingly none of this code has actually crashed in production > as far as I'm aware. Because it is correct for older OCaml versions - which do not follow pointers that are not allocated by OCaml. Note that this is still the default, but you can now change it with the -no-naked-pointers configure switch, in which case such pointers lead to a crash when they are run into by the GC (well, I'm not sure about a null pointers, though). The -no-naked-pointers switch accelerates in particular assignments (caml_darken called via caml_modify). Gerd --=20 ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------ --=-CW6524YbZaz7Dimp1UFm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJYsDo+AAoJEAaM4b9ZLB5Tc+QIAIBLRo8o0u10Sb7Gutj8alzO KzROwCenDih5YuZJ+OlYtEnZwi5VMzNN9McuvAkKPzXEdTmbHA7vM6+YHb4Asszm y8aRjZUgdOu6qClr/KOPnpS+ZpYwzVhNppsh1L17P2gR8NkFE1gJ3lj+R8qNdnFY isN5CsAij4gLL0/XSnDuymCKGlRCD9a1QibaqKPbrchd4OCa6QSPptcFEvZcFlxl afVG90sWttp0KjY5pzYpiG25P8Y41vLY7d0eXlfqiNjIr3jtSMh62dzJUebxvXqy Ua3WUgVu/4/ot50f1ZmGWf7W1VGdPQHLS4RuHJZ5gFXQI2k7aPZyvXaflTMQano= =uHrl -----END PGP SIGNATURE----- --=-CW6524YbZaz7Dimp1UFm--