[Bug sanitizer/95279] UBSan doesn't seem to detect pointer overflow in certain cases

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat May 23 05:09:23 GMT 2020


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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you show the code inside systemd (and the patch to fix it)?  Because 

        const void *p = (uint8_t*)0x406310;
        size_t s = -1;

        r = (uint8_t*)p + s;
That is well defined.


More information about the Gcc-bugs mailing list