From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4781 invoked by alias); 11 Feb 2015 11:06:36 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 4717 invoked by uid 48); 11 Feb 2015 11:06:32 -0000 From: "fragabr at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/64590] Firefox 34 triggers GCC AVX bug (segfault: XPCCallContext::GetJSContext (this=0xfffc7fffe3e23980)) Date: Wed, 11 Feb 2015 11:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fragabr at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg01149.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64590 --- Comment #13 from D=C3=A2niel Fraga --- (In reply to David Baron from comment #12) > The correct changeset that fixed the problem is: > https://hg.mozilla.org/integration/mozilla-inbound/rev/3023f9390942 Yes, thanks! :) >>From gcc-bugs-return-476817-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Feb 11 11:12:52 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 31300 invoked by alias); 11 Feb 2015 11:12:52 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 31143 invoked by uid 48); 11 Feb 2015 11:12:46 -0000 From: "marc at kdab dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/60621] std::vector::emplace_back generates massively more code than push_back Date: Wed, 11 Feb 2015 11:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.7.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marc at kdab dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg01150.txt.bz2 Content-length: 1524 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60621 --- Comment #3 from marc at kdab dot com --- Now, what is _really_ weird is that push_back(T&&) _calls_ emplace_back(). I also tried the magic incantation g++ --param large-unit-insns=100000000 \ --param inline-unit-growth=100000000 \ --param max-inline-insns-single=100000000 \ --param large-function-growth=100000000 \ --param large-function-insns=100000000 -O2 to no avail. I can get the two version to within 80 bytes of text of each other by adding -fno-exceptions, so it's probably related to that. The (implicit) move ctor of S cannot throw, but the std::string(const char*) ctor can. Ie. in the rvalue-push_back case, emplace_back only dabbles in noexcept operations, and in the 3xconst char* case, it needs to deal with three throwing ctors. I can reduce the text size to within a few hundreds of bytes by marking both emplace_back and _M_emplace_back_aux as __attribute__((always_inline)), so something prevents gcc from inlining even when turning the inlining paramters all the way up. I can also reduce the text size by passing std::strings instead of conat char*s: text data bss dec hex filename 5628 672 40 6340 18c4 emplace-vs-push_back.eb 4991 672 40 5703 1647 emplace-vs-push_back.nt 4516 648 40 5204 1454 emplace-vs-push_back.pb (where .nt is EMPLACE_BACK_NOTHROW). Still a large gap... Have we accepted another auto_ptr into the standard? :)