This is the mail archive of the
mailing list for the GCC project.
Re: Looking for some help with GCC 6 and bad code generation
- From: Zan Lynx <zlynx at acm dot org>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 20 Apr 2016 19:37:13 -0600
- Subject: Re: Looking for some help with GCC 6 and bad code generation
- Authentication-results: sourceware.org; auth=none
- References: <571828AB dot 6060108 at acm dot org> <CA+=Sn1=2QHyOXr2viQMGwtBWePed5WDKC2h0xxt+_ED4j+BEaQ at mail dot gmail dot com>
On 4/20/2016 7:18 PM, Andrew Pinski wrote:
On Thu, Apr 21, 2016 at 9:11 AM, Zan Lynx <email@example.com> wrote:
I would like someone to look at this and tell me this is an already
fixed bug. Or that recent GCC patches may have fixed it. :-)
Or it would also be great to get some advice on building a reproducer
without needing to include many megabytes of proprietary code plus Boost.
I've been using Fedora 24 Alpha and of course I've somehow managed to
write some C++ code even more confusing for GCC than Firefox. Heh.
The problem is a crash when std::string tries to free memory from a
temporary std::string that was bound to a const reference.
And it only crashes when I pass -O2 or -O3 and the -fprofile-generate flags.
What is the return type of URLDatabaseReader_1::identifier() ?
Also does -fsanitize=undefined say anything about your code?
const std::string& URLDatabaseReader_1::identifier()
static const std::string id("esct");
And I'll give sanitize a try.
Knowledge is Power -- Power Corrupts
Study Hard -- Be Evil