namesz and name
The first namesz bytes in name contain a null-terminated character representation of the entry's owner or originator. There is no formal mechanism for avoiding name conflicts. By convention, vendors use their own name, such as XYZ Computer Company, as the identifier. If no name is present, namesz contains 0. Padding is present, if necessary, to ensure 8 or 4-byte alignment for the descriptor (depending on whether the file is a 64-bit or 32-bit object). Such padding is not included in namesz.
It looks like we get this right for the "NetBSD" tag, where we include a single nul-terminator character within the name (as measured by namesz), but then include an extra padding zero-byte for alignment.
However, for the "Go" tag, we include an extra nul-terminator within the name itself. The second nul-terminator should actually be padding.
Hey Ian, in the CL we changed our confidence of the proposed fix. Would you advise moving this issue to the next milestone or shall we work on it through Go1.15? Thank you.
Hey @odeke-em. From my side, I tried to debug the issue, but locally the toolchain is built correctly and all tests pass; I have no clue how to debug the Try-Bots, so I don't know how easy/hard the fix would be.
Both ./all.bash and GOOS=darwin GOARCH=amd64 ./bootstrap.bash seem to work. I'll rebase and send the commit again just in case.
https://www.sco.com/developers/gabi/latest/ch5.pheader.html#note_section says [emphasis added]:
It looks like we get this right for the "NetBSD" tag, where we include a single nul-terminator character within the name (as measured by namesz), but then include an extra padding zero-byte for alignment.
However, for the "Go" tag, we include an extra nul-terminator within the name itself. The second nul-terminator should actually be padding.
Pointed out by Mark Kettenis from OpenBSD.
/cc @4a6f656c
The text was updated successfully, but these errors were encountered: