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

            Bug ID: 121931
           Summary: no_sanitize attribute should also apply to global
                    variables
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Clang[1] allows the attribute on global variable decls to turn off the
sanitizer initializations for that varible.

An example is:
```
int variablenosan  __attribute__((no_sanitize("address")));
```

With `-fsanitize=address`, clang does not emit the code to initialize asan for
`variablenosan`.


[1] https://clang.llvm.org/docs/AttributeReference.html#no-sanitize

Reply via email to