[Bug c++/59083] -fisolate-erroneous-paths produces illegal instruction with enabled -fprofile-generate
law at redhat dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 13 16:32:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59083
--- Comment #16 from Jeffrey A. Law <law at redhat dot com> ---
Richi,
No doubt about *0 = 1 and the like. While it's clearly undefined, I think
we've got to continue to support catching the SIGSEGV/SIGBUS from a QOI
standpoint. That's why I installed the changes to preserve the actual null
dereferences yesterday.
The cases where a NULL is passed as an argument to a function which declares
the argument must be non-NULL isn't as clear cut. Similarly for a NULL which
reaches a return statement in a function declared as returning non-NULL. I
feel we're doing the right thing for those by just trapping. There's no
guarantee the caller/callee will dereference those values -- all we know is a
NULL pointer is disallowed in those cases by way of the attributes.
And FWIW, we're going to have the same bundle of questions when we want to
start isolating and trapping out of bounds array accesses.
All cases look more and more like something we should be warning about.
WRT non-call-exceptions on SJLJ targets, we should still have the EH edges
around, so fixing the abnormal edge handing should be all we need to do (of
course, SJLJ targets are less and less important, but presumably they're still
around?)
More information about the Gcc-bugs
mailing list