search for: getlegalmapoffset

Displaying 2 results from an estimated 2 matches for "getlegalmapoffset".

2016 Nov 17
3
UB in MemoryBufferMMapFile
...n`: from lib/Support/MemoryBuffer.cpp:210: > MemoryBufferMMapFile(bool RequiresNullTerminator, int FD, uint64_t Len, > uint64_t Offset, std::error_code &EC) > : MFR(FD, sys::fs::mapped_file_region::readonly, > getLegalMapSize(Len, Offset), getLegalMapOffset(Offset), EC) { > if (!EC) { > const char *Start = getStart(Len, Offset); > init(Start, Start + Len, RequiresNullTerminator); > } > } This is UB, since we're reading one past an allocated region, and I have an internal test case where I'm seeing it crash...
2016 Nov 17
2
UB in MemoryBufferMMapFile
...Buffer.cpp:210: >>> MemoryBufferMMapFile(bool RequiresNullTerminator, int FD, uint64_t Len, >>> uint64_t Offset, std::error_code &EC) >>> : MFR(FD, sys::fs::mapped_file_region::readonly, >>> getLegalMapSize(Len, Offset), getLegalMapOffset(Offset), EC) { >>> if (!EC) { >>> const char *Start = getStart(Len, Offset); >>> init(Start, Start + Len, RequiresNullTerminator); >>> } >>> } >> >> This is UB, since we're reading one past an allocated region, and I hav...