sebpop wrote: > I would be carful exploiting this kind of information, possibly protect is > with a compiler switch in the tradition of -fstrict-aliasing.
[702d9dd](https://github.com/llvm/llvm-project/pull/159046/commits/702d9dd71e4a646077e5d3347f36a43807dcec4a) adds a flag -fassume-array-bounds disabled by default for now. > How does your change interact with sanitizers? [702d9dd](https://github.com/llvm/llvm-project/pull/159046/commits/702d9dd71e4a646077e5d3347f36a43807dcec4a) disables assume generation when sanitizer array-bounds is on. > I wouldn't be surprised if some code out there does purposeful access to > memory past the array, even though it's UB. [702d9dd](https://github.com/llvm/llvm-project/pull/159046/commits/702d9dd71e4a646077e5d3347f36a43807dcec4a) detects struct with last field a flexible size array. https://github.com/llvm/llvm-project/pull/159046 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
