[Bug c++/78651] Incorrect exception handling when catch clause uses local class and PIC and sanitizer are active
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 2 12:32:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78651
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-03-02
Ever confirmed|0 |1
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Confirmed:
struct A { };
namespace {
void thisThrows() {
throw A();
}
struct SomeRandomType {};
}
int main() {
try {
thisThrows();
}
catch(SomeRandomType) {
throw;
}
catch(A) {
}
}
$ g++ throws.cc && ./a.out
$ g++ throws.cc -fPIC && ./a.out
$ g++ throws.cc -fsanitize=address && ./a.out
$ g++ throws.cc -fsanitize=address -fPIC && ./a.out
terminate called after throwing an instance of 'A'
Aborted (core dumped)
More information about the Gcc-bugs
mailing list