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 845897F616 for ; Fri, 24 Feb 2017 14:43:41 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=arlencox@gmail.com; spf=Pass smtp.mailfrom=arlencox@gmail.com; spf=None smtp.helo=postmaster@mail-qt0-f170.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of arlencox@gmail.com) identity=pra; client-ip=209.85.216.170; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="arlencox@gmail.com"; x-sender="arlencox@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of arlencox@gmail.com designates 209.85.216.170 as permitted sender) identity=mailfrom; client-ip=209.85.216.170; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="arlencox@gmail.com"; x-sender="arlencox@gmail.com"; 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-qt0-f170.google.com) identity=helo; client-ip=209.85.216.170; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="arlencox@gmail.com"; x-sender="postmaster@mail-qt0-f170.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AAKXjgB/DeupIEv9uRHKM819IXTAuvvDOBiVQ1KB9?= =?us-ascii?q?0eMcTK2v8tzYMVDF4r011RmSDNidsaoP1rOe8/i5HzdfsdDZ6DFKWacPfiFGoP?= =?us-ascii?q?1epxYnDs+BBB+zB9/RRAt+Iv5/UkR49WqwK0lfFZW2TVTTpnqv8WxaQU2nZkJd?= =?us-ascii?q?b974EY/Kjsmxy/v6u9iKO10J1wyGfKhqIR6qgQLUv8gQycs+e+digifO9zFyeu?= =?us-ascii?q?9WzHlkbW3VulC0xMC28YUpu3BKuvkh38dGV6jqfq1+SqZXWmcIKWcwseTxsRTF?= =?us-ascii?q?BSCI9jNIW38SnxxDBBjt4xTzX5O3uSz/4LkukBKGNNH7GOhnEQ+p6L1mHVq10S?= =?us-ascii?q?o=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DpAQB+N7BYf6rYVdFdGwEBAQMBAQEJA?= =?us-ascii?q?QEBFQEBAQECAQEBAQgBAQEBg0c/gQkHg1SbZ4I6hkCOSCqFeAKCagdDFAEBAQE?= =?us-ascii?q?BAQEBAQEBEgEBCQsLChsxgjMEAR0FghcBBAEjHQEbEgsBAwwGBQsPAgkdAgIiA?= =?us-ascii?q?REBBQEKEgYliUkBAw0IDqBRP4wDggQFARyDCQWDXgoZJwMKVYMqAQEBAQEBBAE?= =?us-ascii?q?BAQEBARoCBhJ5hUGEb4dagl8FhzoMiQiLTIZ0izGCTo5ISJEeFB6BFTaBIiEUC?= =?us-ascii?q?BcVPheEKYIrIjWIWoFPAQEB?= X-IPAS-Result: =?us-ascii?q?A0DpAQB+N7BYf6rYVdFdGwEBAQMBAQEJAQEBFQEBAQECAQE?= =?us-ascii?q?BAQgBAQEBg0c/gQkHg1SbZ4I6hkCOSCqFeAKCagdDFAEBAQEBAQEBAQEBEgEBC?= =?us-ascii?q?QsLChsxgjMEAR0FghcBBAEjHQEbEgsBAwwGBQsPAgkdAgIiAREBBQEKEgYliUk?= =?us-ascii?q?BAw0IDqBRP4wDggQFARyDCQWDXgoZJwMKVYMqAQEBAQEBBAEBAQEBARoCBhJ5h?= =?us-ascii?q?UGEb4dagl8FhzoMiQiLTIZ0izGCTo5ISJEeFB6BFTaBIiEUCBcVPheEKYIrIjW?= =?us-ascii?q?IWoFPAQEB?= X-IronPort-AV: E=Sophos;i="5.35,201,1484002800"; d="scan'208";a="261950596" Received: from mail-qt0-f170.google.com ([209.85.216.170]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 24 Feb 2017 14:43:40 +0100 Received: by mail-qt0-f170.google.com with SMTP id x35so16721884qtc.2 for ; Fri, 24 Feb 2017 05:43:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=VJsfhO7H3Ka9CgFzQBlTrjMeY1YUS+6N56LUBUGwpAE=; b=BeCfbJmpQq4i85hOHzJfuk3nxsCtyrC/62bHdbnp35b3WVA1LSurjS3Ucp6e5oyP9Y sFdbucPxr/SG9dxh2M5YermWhQgdcg50ifURD7arpopyGJyU/MkJldCpSE43Yo3z2uND zP0F1CgxL1XEcSnAJ3qJ+VjFYrBdp1Co+k5TGEeNtos7wE82NmUzn+8jxtonzuiyAS0d iKbbRR51LMkV2QZO5S0KfKEPyUWKHqdGyMGN2GS+HJMc9Ed1H33/di9azN2oV/bFLIfX XJcqKaoOBGoxnH4qlOi36MBiEYiz9f88D8G4tCU9G7A2DvRiSLye/DPJgc6YWIfRtSko kbpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VJsfhO7H3Ka9CgFzQBlTrjMeY1YUS+6N56LUBUGwpAE=; b=k68v574HoIEQMh8tkJYm1NJgDWXMmqfvh24/KdJaUp+6sKQW3GxaesWPPSx3pEU+vk jmJ7BszAlL7F2/rSsjJuDeDSBrenrTa5zXOi0G2IdEEk9lf85jtN+EtS5PIXbLns0DSK MWo02PIuwBUPCENEJQx45Q6nTcfw6WNACL69VH7XhPSHGSB/lrBrWGtL+RZPe6cjsM3k ysab6qgXSQiC7NWa6uyIJ1iCVYMSqyOvQJihu7TDHntlUQ+sPJJONjeOwu19a7cE6WOo 1mC4KiDFpmGkMp7gyXuZypxqNkLdE76d57s2YQCIfl4y4zHqTH/vdub62O7LhCvAhAD0 2jmw== X-Gm-Message-State: AMke39kc7WhjtxpbcfJ3TgisIxmFU1cOFhWFVx1LrwPbW8K7XzX1EVgOhmGIUKNpMlT/b97tDkraNlSgd7mCHg== X-Received: by 10.200.56.210 with SMTP id g18mr759329qtc.63.1487943819467; Fri, 24 Feb 2017 05:43:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.171.195 with HTTP; Fri, 24 Feb 2017 05:43:38 -0800 (PST) In-Reply-To: <20170224103818.GI28111@annexia.org> References: <20170224103818.GI28111@annexia.org> From: Arlen Cox Date: Fri, 24 Feb 2017 08:43:38 -0500 Message-ID: To: "Richard W.M. Jones" Cc: caml-list@inria.fr Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] Initializing CAMLlocalX values to Val_unit > ? Interestingly none of this code has actually crashed in production > as far as I'm aware. I'm fairly certain this is because the OCaml runtime checks pointers to ensure that they're in the OCaml heap before tracing them. I don't know how this holds up historically, but last time I looked (4.03) when tracing, OCaml runs Classify_addr(a) on addresses to determine if they should be traced into. Because of this, NULL pointers will not be followed (and thus not crash) and perhaps more interestingly raw (naked) pointers that don't point to anything in an OCaml-registered page will also not be traced. There is a define related to NAKED_POINTERS that if defined will improve performance by disabling the check for Is_in_heap(a) (macro for Classify_addr). Naked pointer support can be disabled during configure (--no-naked-pointers) and that may make code that does not initialize things correctly crash. Naked pointers are checked in the default configuration. Cheers, Arlen > > Rich. > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs