search for: getopenfileimpl

Displaying 3 results from an estimated 3 matches for "getopenfileimpl".

2016 Nov 17
2
UB in MemoryBufferMMapFile
...ows that the > file is an exact multiple of a page size, it should copy it into a > malloc’d buffer that is one byte larger, and put a zero there. This doesn't seem to be working correctly, unless sys::Process::getPageSize() is returning the wrong thing for me. I'm getting here from getOpenFileImpl() in MemoryBuffer.cpp, which is deciding it's safe to mmap (by calling shouldUseMMap, where the page size check you mention is). The file is 561152 bytes, and the page size reports 16384, so this is not a multiple of page size (0x89000 & 0x3fff == 0x1000). Yet, the memory one byte past the...
2013 Sep 12
1
[LLVMdev] Issues with test framework as seen from OpenBSD buildslave
...-openbsd/llvm/test/Object/Output/test.a ^ <stdin>:2:49: note: possible intended match here assertion "0 && "We got inaccurate FileSize value or fstat reported an " "invalid file size."" failed: file "MemoryBuffer.cpp", line 390, function "getOpenFileImpl" ******************** TEST 'LLVM :: Transforms/GCOVProfiling/version.ll' FAILED ******************** ... Command Output (stderr): -- head: unknown option -- c usage: head [-count | -n count] [file ...] -- This message has been scanned for viruses and dangerous content by MailScann...
2016 Nov 17
3
UB in MemoryBufferMMapFile
In MemoryBuffer::init, we have an assert that reads the memory at `BufEnd`, which is one past the end of some memory region: from lib/Support/MemoryBuffer.cpp:45: > void MemoryBuffer::init(const char *BufStart, const char *BufEnd, > bool RequiresNullTerminator) { > assert((!RequiresNullTerminator || BufEnd[0] == 0) && > "Buffer is not