[Bug sanitizer/95693] [8/9/10/11 Regression] Incorrect error from undefined behavior sanitizer

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 16 07:24:46 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95693

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The Derived ctor seems to first perform zero initialization of the base for
some reason and only then calls the Base constructor.  Dunno if that is
required or not, but since Alex' change actually also zeroes the reference. 
And this state before calling the Base is caught by the sanitizer.  So, to me
it looks like a C++ FE problem that it zero initializes it first, or if it
needs to, then it needs to either avoid what Alex' patch is doing (do that only
during error-recovery), or arrange somehow that it will not be sanitized.


More information about the Gcc-bugs mailing list