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

Chandler Carruth chandlerc at google.com
Mon Apr 27 12:46:30 PDT 2015


You seem to be referencing the O_APPEND bug. That's not what we're talking
about here. We're just talking about keeping the streaming position
up-to-date.

On Fri, Apr 17, 2015 at 9:23 AM Yaron Keren <yaron.keren at gmail.com> wrote:

> 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/20150427/80eb1188/attachment.html>


More information about the llvm-commits mailing list