On Mon, Aug 05, 2019 at 09:36:47AM -0700, Andrew Lutomirski wrote:
> On Mon, Aug 5, 2019 at 8:22 AM Andrew Lutomirski <l...@mit.edu> wrote:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91357
> >
> > Depending on the resolution of that bug, I suggest that Fedora
> > consider dropping _GLIBCXX_ASSERTIONS from the default hardened build
> > options.  IMO Fedora's default RPM build options should not cause
> > crashes on valid, if less-than-stylistically-great, code.  I don't
> > think that package maintainers should need to update package source to
> > use C++ in a more polite way.
> 
> And the bug has spoken.  v[v.size()] is undefined behavior.  Don't do it!

Ok, but does that mean the program has to abort? Could gcc do anything
dangerous here? If we were actually trying to catch undefined behavior
(e.g. with -fsanitize=undefined), I suspect Fedora wouldn't even boot
without a crash.

-- 
Miroslav Lichvar
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to