On Mon, 18 Sep 2017, Andreas Schwab wrote: > Does that work correctly when the VLA is smaller than the probe size > (word_mode by default)? I see a failure in glibc on armv7 where > ldconfig is using a zero-size VLA, which is invalid in C, but it could > also end up using a VLA of size 1.
FWIW, I'd consider zero-size VLAs (and VLAs with a positive dimension but whose elements are zero-size) to be a valid use of the GNU extension of zero-size objects - but still appropriate for -fsanitize=vla-bound to detect. (But any enabled-by-default checks for VLA sizes, as discussed in bug 68065, ought to allow zero size.) -- Joseph S. Myers jos...@codesourcery.com