[PATCH] D48250: [sanitizer_common] Use O_TRUNC for WrOnly access mode.

Kamil Rytarowski via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 25 05:18:09 PDT 2018


On 25.06.2018 14:06, Rainer Orth wrote:
> Fāng-ruì Sòng <maskray at google.com> writes:
> 
>>> It took me quite some time building current trunk due to various new
>>> problems...
>>>
>>> The OpenFile signature changed in r232936:
>>>
>>> http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150323/267202.html
>>>
>>> The Solaris Sanitizer port started in the GCC tree quite some time ago,
>>> and obviously I missed adapting the OpenFile implementation in
>>> sanitizer_solaris.cc to the changed signature when forward-porting to
>>> the LLVM tree.  AFAICS the sanitizer_posix.cc implementation is
>>> perfectly fine even for Solaris, so the old one can just go.
>>>
>>> I'll prepare a patch.
>>
>> Nice to learn sanitizer_solaris.cc can be merged into sanitizer_posix.cc
> 
> Not at all: just this single function can go from sanitizer_solaris.cc.
> The rest most certainly has to stay: the syscall interface in Solaris
> isn't stable and can (and does!) change even inside a single OS release:
> it's just an implementation detail; the only stable interface to system
> calls is libc.
> 

For your interest, I will be switching NetBSD away from
syscall(2)/__syscall(2), whenever possible to plain libc calls.

The indirect syscall approach isn't reliable and portable for all of the
supported CPUs, ABIs and system calls.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 850 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180625/b7c0b8d0/attachment.sig>


More information about the llvm-commits mailing list