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

            Bug ID: 122038
           Summary: __builtin_assume_aligned should be instrument for
                    -fsanitize=alignment
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
  Target Milestone: ---

Note this will cause gcc/testsuite/c-c++-common/ubsan/align-5.c to fail .

The only issue here is I am not sure how to handle non-const second and third
agruments if we should at all.

The other side of it, __builtin_assume_aligned does not require its argument to
non-null (at least the documentation does not say anything about non-nullness)
so re-using .UBSAN_NULL here seems wrong.
  • [Bug sanitizer/122038] New: __b... pinskia at gcc dot gnu.org via Gcc-bugs

Reply via email to