tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common



On Thu, May 24, 2018 at 10:33:11AM +0000, Martin Husemann wrote:
> so there are even more bugs :-/

To sum up: both syscall(2) and __syscall(2) are very hard to use and do not
really provide any value.

Neither of them can be used to invoke mmap(2) correctly and properly
return the value.

We should just remove both.

A better interface may be something like:

int _syscall(int code, uintptr_t *rv32, uint64_t *rv64, ...);

with ... being a variadic number of uint32_t arguments.

You would have to add the hidden pad arguments manually, plus split
64bit args into two 32bit halves with proper endianess.


Martin


Home | Main Index | Thread Index | Old Index