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

--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:35ac28b9c26debcc8ec8b247d75d4d271de72189

commit r13-8791-g35ac28b9c26debcc8ec8b247d75d4d271de72189
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed May 22 09:12:28 2024 +0200

    ubsan: Use right address space for MEM_REF created for bool/enum
sanitization [PR115172]

    The following testcase is miscompiled, because -fsanitize=bool,enum
    creates a MEM_REF without propagating there address space qualifiers,
    so what should be normally loaded using say %gs:/%fs: segment prefix
    isn't.  Together with asan it then causes that load to be sanitized.

    2024-05-22  Jakub Jelinek  <ja...@redhat.com>

            PR sanitizer/115172
            * ubsan.cc (instrument_bool_enum_load): If rhs is not in generic
            address space, use qualified version of utype with the right
            address space.  Formatting fix.

            * gcc.dg/asan/pr115172.c: New test.

    (cherry picked from commit d3c506eff54fcbac389a529c2e98da108a410b7f)

Reply via email to