8f03af00f8
Our dirent structure is "slim": it has a flexible-length array at the end which must be allocated to whatever size the consumer wants. However, we use [1] there and not [0] or [], which meant GCC thought it was not a flexible-length array, and so it optimized various string accesses that it assumed must be always false. Among these was BDirectory's check for "." and "..", and so that resulted in infinite loops. When changing our dirent structure to a proper FLA instead of [1], GCC then throws errors on LongDirEntry as it has data "after" the FLA; which is what we want, but there is no way to tell GCC that. So now we use a union instead, which is the proper way to statically allocate a FLA. This is part of #17389, but the real fix requires changing our dirent structure, which is coming in a separate commit. |
||
---|---|---|
.. | ||
build | ||
compatibility | ||
config | ||
cpp | ||
glibc | ||
libs | ||
os | ||
posix | ||
private | ||
tools |