mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Fix msan buildbot.
This patch should fix sanitizer-x86_64-linux-fast bot. The problem was that the contents of this stream are aligned to 4 byte, and the paddings were created just by incrementing `Offset`, so paddings had undefined values. When the entire stream is written to an output, it triggered msan. llvm-svn: 305541
This commit is contained in:
parent
d7e5c4ef0a
commit
b17b435a35
@ -83,6 +83,7 @@ Error BinaryStreamWriter::padToAlignment(uint32_t Align) {
|
||||
uint32_t NewOffset = alignTo(Offset, Align);
|
||||
if (NewOffset > getLength())
|
||||
return make_error<BinaryStreamError>(stream_error_code::stream_too_short);
|
||||
Offset = NewOffset;
|
||||
while (Offset < NewOffset)
|
||||
writeInteger('\0');
|
||||
return Error::success();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user