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

            Bug ID: 113151
           Summary: Need for a TBAA / strict aliasing sanitizer (TySan)
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames 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,
                    marxin at gcc dot gnu.org, xry111 at gcc dot gnu.org
  Target Milestone: ---

It's well-known that -Wstrict-aliasing in GCC has false negatives and is also
easy to confuse/bypass. Aliasing is a common footgun and it's hard because this
is one of the few things that compilers optimise on which UBsan and friends are
no help for.

Ultimately, that's not really the fault of the warning, the fact is some of
this stuff can only really be done at runtime.

LLVM has had stalled and stop-start attempts at this a bunch of times, although
I noticed earlier today that some new PRs got opened for it. They plan on
calling it Type Sanitizer (TySan) with -fsanitize=type. See linked PRs.

(I feel like we must have a bug for this somewhere but I couldn't find it.)

Reply via email to