From 2ef6aebab34b27092c664c9219ddf85246845d6b Mon Sep 17 00:00:00 2001 From: Vladimir Marek Date: Wed, 1 May 2013 23:43:24 +0200 Subject: [PATCH] Re: [PATCH 01/24] lib/message.cc: stale pointer bug --- 22/f40f5242c5fb2a0e51c6a3ca1c75ddfa22899c | 79 +++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 22/f40f5242c5fb2a0e51c6a3ca1c75ddfa22899c diff --git a/22/f40f5242c5fb2a0e51c6a3ca1c75ddfa22899c b/22/f40f5242c5fb2a0e51c6a3ca1c75ddfa22899c new file mode 100644 index 000000000..de03cf846 --- /dev/null +++ b/22/f40f5242c5fb2a0e51c6a3ca1c75ddfa22899c @@ -0,0 +1,79 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id E2CD7431FBF + for ; Wed, 1 May 2013 14:45:30 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.299 +X-Spam-Level: +X-Spam-Status: No, score=-2.299 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3, UNPARSEABLE_RELAY=0.001] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id FammqTNWHFsk for ; + Wed, 1 May 2013 14:45:24 -0700 (PDT) +Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id A3C46431FB6 + for ; Wed, 1 May 2013 14:45:24 -0700 (PDT) +Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) + by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with + ESMTP id r41LjLm2030723 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); + Wed, 1 May 2013 21:45:23 GMT +Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) + by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id + r41LjL1f007021 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); + Wed, 1 May 2013 21:45:22 GMT +Received: from abhmt108.oracle.com (abhmt108.oracle.com [141.146.116.60]) + by userz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id + r41LjKsp018420; Wed, 1 May 2013 21:45:21 GMT +Received: from pub.cz.oracle.com (/10.163.101.122) + by default (Oracle Beehive Gateway v4.0) + with ESMTP ; Wed, 01 May 2013 14:45:20 -0700 +Date: Wed, 1 May 2013 23:43:24 +0200 +From: Vladimir Marek +To: notmuch@notmuchmail.org +Subject: Re: [PATCH 01/24] lib/message.cc: stale pointer bug +Message-ID: <20130501214324.GF19599@pub.cz.oracle.com> +Mail-Followup-To: notmuch@notmuchmail.org, + Vladimir Marek +References: <1367444021-2757-1-git-send-email-Vladimir.Marek@oracle.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Disposition: inline +In-Reply-To: <1367444021-2757-1-git-send-email-Vladimir.Marek@oracle.com> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Source-IP: acsinet21.oracle.com [141.146.126.237] +Cc: Vladimir Marek +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 01 May 2013 21:45:31 -0000 + +Uh, oh, it's patch 01/01 actually. There's 23 other patches waiting but +will be submitted separately. + +> Xapian::TermIterator::operator* returns std::string which is destroyed +> as soon as (*i).c_str() finishes. The remembered pointer 'term' then +> references invalid memory. + +I reworded the comment and I changed the fix slightly. + +Thank you +-- + Vlad -- 2.26.2