Open arichardson opened 6 months ago
I suspect we should leave syscall alone (it can't be used for mmap except by accident), but likely __syscall should be int64ptr_t.
Using it for mmap has two problems:
There's also shmat which suffers from 2 but not 1.
This is used e.g. by the sanitizer runtimes, but since unistd.h declares syscall/__syscall with an integer return value it's not possible to actually call mmap() successfully:
https://github.com/CTSRD-CHERI/cheribsd/blob/698d1636dd1fe2322e5bc7029e415928c80b76b1/include/unistd.h#L582-L583
Should these be changed to intptr_t for purecap?