[patch][pr23266] Fix some raw_svector_ostream::pwrite problems

Yaron Keren yaron.keren at gmail.com
Fri Apr 17 09:22:55 PDT 2015


With pwrite it's a documented bug of Linux vs POSIX, probably  not fixed
probably to avoid breaking existing software.

  http://linux.die.net/man/2/pwrite

We  don't have a compatibility requirement as it's new functionality so I'm
for disallowing the resize.



2015-04-17 17:51 GMT+03:00 Rafael EspĂ­ndola <rafael.espindola at gmail.com>:

> The fix-buffer patch is a simple bug fix for when pwrite changes the
> size of the underlying stream.
>
> The issue that remains is that pwrite changing the current position is
> somewhat surprising.
>
> That also happens on OS X when using O_APPEND. The attached test
> creates a file with "defghi\n" in it, so there is some precedent. (on
> linux one gets "abcdefghi").
>
> In any case, if that is too confusing, we can also just disallow it,
> which is what the other patch does. If disallowing it, should we
> rename it?
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150417/f7665d15/attachment.html>


More information about the llvm-commits mailing list