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

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 16 06:57:43 GMT 2020


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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |mpolacek at gcc dot gnu.org,
                   |                            |nathan at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-06-16

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Thank you for the report!
The error is newly printed with r8-7149-g2e1a7ecb2d8f1ee3.

Backtrace is here:
g++ pr95693.C -fsanitize=undefined -g && ./a.out 
pr95693.C:17:22: runtime error: reference binding to null pointer of type 'int'
    #0 0x4011fb in Derived::Derived()
/home/marxin/Programming/testcases/pr95693.C:17
    #1 0x401135 in main /home/marxin/Programming/testcases/pr95693.C:24
    #2 0x7ffff7147cc9 in __libc_start_main ../csu/libc-start.c:308
    #3 0x401079 in _start (/home/marxin/Programming/testcases/a.out+0x401079)

I'm not a C++ expert, but it seems to me an invalid code.


More information about the Gcc-bugs mailing list