History log of /haiku/src/build/libbe/storage/Node.cpp
Revision Date Author Comments
# 2532a287 23-Nov-2021 Augustin Cavalier <waddlesplash@gmail.com>

Avoid using unions for LongDirEntry.

GCC still assumes that the dirent has no data past the end for some
scenarios here and still mis-optimizes things. Therefore, drop the
usages of unions altogether, and instead use a casted character array.

Additionally, use B_FILE_NAME_LENGTH for the array, not B_PATH_NAME_LENGTH,
and make sure to add 1 for the NULL terminator.


# 8f03af00 18-Nov-2021 Augustin Cavalier <waddlesplash@gmail.com>

Storage: Rework LongDirEntry to be a union.

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.


# 9cc17182 18-Nov-2021 Augustin Cavalier <waddlesplash@gmail.com>

libbe_build: Fix build on non-Haiku platforms.

Probably should have tested that before pushing.


# 28c8a16a 18-Nov-2021 Augustin Cavalier <waddlesplash@gmail.com>

libbe_build: Synchronize Node.cpp with the main one.

Mostly formatting changes with a few minor bugfixes it appears.


# 8df44a6c 12-Sep-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Copy change r22224: WriteAttrString() should write the terminating null.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22226 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 338b8dc3 29-Oct-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged changes from branch build_system_redesign at revision 14573.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8df44a6cdaf00ec642319340005c9f79dbb78f43 12-Sep-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Copy change r22224: WriteAttrString() should write the terminating null.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22226 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 338b8dc301721b1f472e8297a898d4eaa2f2ee3a 29-Oct-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged changes from branch build_system_redesign at revision 14573.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96