Re: Bug in GC's ordering of ForeignPtr finalization?
authorAntoine Latter <aslatter@gmail.com>
Mon, 29 Aug 2011 04:03:52 +0000 (23:03 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:39:19 +0000 (09:39 -0800)
98/918084c3ca6eb3cceab5d9efcd90e042b6c600 [new file with mode: 0644]

diff --git a/98/918084c3ca6eb3cceab5d9efcd90e042b6c600 b/98/918084c3ca6eb3cceab5d9efcd90e042b6c600
new file mode 100644 (file)
index 0000000..4a02112
--- /dev/null
@@ -0,0 +1,81 @@
+Return-Path: <aslatter@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 1A74D429E25\r
+       for <notmuch@notmuchmail.org>; Sun, 28 Aug 2011 21:04:14 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id xxwxwXrmxxXZ for <notmuch@notmuchmail.org>;\r
+       Sun, 28 Aug 2011 21:04:12 -0700 (PDT)\r
+Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com\r
+       [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id AEFEB431FB6\r
+       for <notmuch@notmuchmail.org>; Sun, 28 Aug 2011 21:04:12 -0700 (PDT)\r
+Received: by qyk34 with SMTP id 34so3867042qyk.5\r
+       for <notmuch@notmuchmail.org>; Sun, 28 Aug 2011 21:04:12 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=mime-version:in-reply-to:references:from:date:message-id:subject:to\r
+       :cc:content-type;\r
+       bh=MDp8oNnuCrSD8+yYwEVY/K0fKZwx50jgr+xBgjj5wrE=;\r
+       b=fMxQij//sf1ugjO1XnIB3q5Y2E6FBaSSacaovAh6DJ7aI+7Mpxp7gLo2Lf8qmSI9gv\r
+       y+agagFjYRUaI76bWkgvSf6sYYSlVPjzE4Kl9CuF0CBpA4zYr8XEbVbiockZRd0MNjOj\r
+       NaOwJgDVWQnQMj2mDfCe9qA22Mc3E/8wveYeo=\r
+Received: by 10.229.40.137 with SMTP id k9mr5172752qce.100.1314590652094; Sun,\r
+       28 Aug 2011 21:04:12 -0700 (PDT)\r
+MIME-Version: 1.0\r
+Received: by 10.229.45.195 with HTTP; Sun, 28 Aug 2011 21:03:52 -0700 (PDT)\r
+In-Reply-To: <87ty907ub0.fsf@gmail.com>\r
+References: <8739h1pbaq.fsf@gmail.com> <87pqjprzu2.fsf@gmail.com>\r
+       <CAKjSnQGPRu7nWbLiuLX4niUyRNNbziNwBsX1s3+WyYx+9aTpcw@mail.gmail.com>\r
+       <87ty907ub0.fsf@gmail.com>\r
+From: Antoine Latter <aslatter@gmail.com>\r
+Date: Sun, 28 Aug 2011 23:03:52 -0500\r
+Message-ID:\r
+ <CAKjSnQEMxdCD+2jXefoMPS=iyqd8wHFY6GovRQ_rOJXwtSW4dg@mail.gmail.com>\r
+Subject: Re: Bug in GC's ordering of ForeignPtr finalization?\r
+To: Ben Gamari <bgamari.foss@gmail.com>\r
+Content-Type: text/plain; charset=UTF-8\r
+X-Mailman-Approved-At: Thu, 08 Sep 2011 14:21:55 -0700\r
+Cc: Bart Massey <bart@cs.pdx.edu>, glasgow-haskell-users@haskell.org,\r
+       notmuch@notmuchmail.org, haskell-cafe@haskell.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 29 Aug 2011 04:04:14 -0000\r
+\r
+On Sun, Aug 28, 2011 at 10:47 PM, Ben Gamari <bgamari.foss@gmail.com> wrote:\r
+> On Sun, 28 Aug 2011 22:26:05 -0500, Antoine Latter <aslatter@gmail.com> wrote:\r
+>> One problem you might be running in to is that the optimization passes\r
+>> can notice that a function isn't using all of its arguments, and then\r
+>> it won't pass them. These even applies if the arguments are bound\r
+>> together in a record type.\r
+>>\r
+> In this case I wouldn't be able to reproduce the problem with\r
+> optimization disabled, no? Unfortunately, this is not the case; the\r
+> problem persists even with -O0.\r
+>\r
+\r
+Perhaps? I don't know the details about how the GC decides when\r
+something is reachable. The scenario I described (which sounds similar\r
+to yours?) is only safe in Haskell when using functions like\r
+touchForeignPtr.\r
+\r
+Antoine\r