[Bug sanitizer/87095] [8/9 Regression] UndefinedBehaviorSanitizer vptr false positive with virtual inheritance only with -fno-sanitize-recover
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 5 07:22:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87095
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Sep 5 07:22:07 2018
New Revision: 264107
URL: https://gcc.gnu.org/viewcvs?rev=264107&root=gcc&view=rev
Log:
Backported from mainline
2018-08-29 Jakub Jelinek <jakub@redhat.com>
PR c++/87095
* decl.c (begin_destructor_body): If current_class_type has
virtual bases and the primary base is nearly empty virtual base,
voidify clearing of vptr and make it conditional on in-charge
argument.
* g++.dg/ubsan/vptr-13.C: New test.
Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/ubsan/vptr-13.C
Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/decl.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list