[all-commits] [llvm/llvm-project] 572b08: [clang] Add back -fsanitize=array-bounds workaroun...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Fri Jun 24 22:15:59 PDT 2022
Author: Fangrui Song <i at maskray.me>
Date: 2022-06-24 (Fri, 24 Jun 2022)
[clang] Add back -fsanitize=array-bounds workaround for size-1 array after -fstrict-flex-arrays change
Before C99 introduced flexible array member, common practice uses size-1 array
to emulate FAM, e.g. https://github.com/python/cpython/issues/94250
As a result, -fsanitize=array-bounds instrumentation skipped such structures
as a workaround (from 539e4a77bbabbc19f22b2bd24e04af2e432e599d).
D126864 accidentally dropped the workaround. Add it back with tests.
More information about the All-commits