forked from OSchip/llvm-project
[compiler-rt] Fix Mmap on FreeBSD AArch64
On FreeBSD AArch64 safestack needs to use __syscall to handle 64 bit arguments Reviewed by: MaskRay, vitalybuka Differential Revision: https://reviews.llvm.org/D125901
This commit is contained in:
parent
ad3faddaa6
commit
ccae01cbce
|
@ -94,7 +94,7 @@ inline void *Mmap(void *addr, size_t length, int prot, int flags, int fd,
|
|||
off_t offset) {
|
||||
#if SANITIZER_NETBSD
|
||||
return __mmap(addr, length, prot, flags, fd, 0, offset);
|
||||
#elif defined(__x86_64__) && (SANITIZER_FREEBSD)
|
||||
#elif SANITIZER_FREEBSD && (defined(__aarch64__) || defined(__x86_64__))
|
||||
return (void *)__syscall(SYS_mmap, addr, length, prot, flags, fd, offset);
|
||||
#else
|
||||
return (void *)syscall(SYS_mmap, addr, length, prot, flags, fd, offset);
|
||||
|
|
Loading…
Reference in New Issue