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: Andrew Pinski <pinskia at gmail dot com>
- To: Zan Lynx <zlynx at acm dot org>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Thu, 21 Apr 2016 09:18:18 +0800
- 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>
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?
> $ gcc -v
> Using built-in specs.
> Target: x86_64-redhat-linux
> Configured with: ../configure --enable-bootstrap
> --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr
> --mandir=/usr/share/man --infodir=/usr/share/info
> --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
> --enable-threads=posix --enable-checking=release --enable-multilib
> --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
> --enable-gnu-unique-object --enable-linker-build-id
> --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array
> --disable-libgcj --with-isl --enable-libmpx
> --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686
> Thread model: posix
> gcc version 6.0.0 20160406 (Red Hat 6.0.0-0.20) (GCC)
> I collected my findings so far into the attachment.
> Thanks for reading!
> Knowledge is Power -- Power Corrupts
> Study Hard -- Be Evil