https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92247
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Yes SANITIZER_USES_CANONICAL_LINUX_SYSCALLS should be defined as 1 by default. The comment in front of the define there is incorrect for newer kernels which force the legacy system calls not be to defined (though they are still implemented). From the upstream source base: // The AArch64 and RISC-V linux ports use the canonical syscall set as // mandated by the upstream linux community for all new ports. Other ports // may still use legacy syscalls. That is why I said upstream is also broken and incorrect.