llvm-6502/unittests
Rafael Espindola f30ac8f5ec Don't allow pwrite to resize a stream.
The current implementations could exhibit some behavior differences:

raw_fd_ostream: Whatever the underlying fd does with seek+write. In a normal
file, the write position would be back to the old offset.

raw_svector_ostream: The write position is always the end of the stream, so
after pwrite the write position would be the new end. This matches what OS_X
(all BSD?) do with a pwrite in a O_APPEND fd.

Given that we don't need that feature and don't use O_APPEND a lot in LLVM,
just disallow it.

I am open to suggestions on renaming pwrite to something else, but this fixes
the issue for now.

Thanks to Yaron Keren for reporting it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235303 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-20 13:04:30 +00:00
..
ADT Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
Analysis Make getModRefInfo with a default location not crash. 2015-04-13 23:05:45 +00:00
Bitcode [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
CodeGen [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
DebugInfo [PDB] Support executables and source/line info. 2015-04-17 22:40:36 +00:00
ExecutionEngine Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
IR DebugInfo: Gut DIDescriptor 2015-04-16 01:53:33 +00:00
LineEditor Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
Linker Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
MC [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
Option Retire llvm::array_endof in favor of non-member std::end. 2014-04-12 16:15:53 +00:00
ProfileData InstrProf: Don't combine expansion regions with code regions 2015-02-18 19:01:06 +00:00
Support Don't allow pwrite to resize a stream. 2015-04-20 13:04:30 +00:00
Transforms DebugInfo: Remove DIDescriptor from the DIBuilder API 2015-04-16 16:36:23 +00:00
CMakeLists.txt InstrProf: Add some unit tests for CoverageMapping 2015-02-04 00:15:12 +00:00
Makefile InstrProf: Add some unit tests for CoverageMapping 2015-02-04 00:15:12 +00:00
Makefile.unittest