From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10772 invoked by alias); 20 Dec 2014 18:20:15 -0000 Mailing-List: contact overseers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: , Sender: overseers-owner@sourceware.org Received: (qmail 10638 invoked by uid 89); 20 Dec 2014 18:20:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f176.google.com Received: from mail-ig0-f176.google.com (HELO mail-ig0-f176.google.com) (209.85.213.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 20 Dec 2014 18:20:09 +0000 Received: by mail-ig0-f176.google.com with SMTP id l13so2386917iga.3 for ; Sat, 20 Dec 2014 10:20:07 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.43.181.69 with SMTP id ph5mr11573911icc.83.1419099607457; Sat, 20 Dec 2014 10:20:07 -0800 (PST) Received: by 10.50.228.174 with HTTP; Sat, 20 Dec 2014 10:20:07 -0800 (PST) In-Reply-To: References: Date: Sun, 21 Dec 2014 16:30:00 -0000 Message-ID: Subject: Fwd: I found a bug, STL memory alloc From: Li Zhaojia To: overseers@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2014-q4/txt/msg00125.txt.bz2 ---------- Forwarded message ---------- From: Li Zhaojia Date: 2014-12-21 2:17 GMT+08:00 Subject: I found a bug, STL memory alloc To: overseers@gcc.gnu.org #include #include #include using std::cout; using std::endl; int main() { try { std::future f; f.get(); } catch(const std::future_error& ex) { auto what1 = ex.what(); std::string str="123"; str.reserve(20); if(str.data() == what1) cout << "impossible" << endl; } } -------------------------- this program print: impossible but it should print nothing, I have no bugzilla account, this mail is all I can do; and, forgive me poor english