CVS commit: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: christos Date: Wed Aug 2 10:30:34 UTC 2023 Modified Files: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common: sanitizer_platform_limits_netbsd.h Log Message: Forgot to commit the rest of the renames. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h diff -u src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h:1.3 src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h:1.4 --- src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h:1.3 Sun Feb 19 21:11:40 2023 +++ src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h Wed Aug 2 06:30:34 2023 @@ -579,7 +579,7 @@ extern unsigned struct_blue_interface_sz extern unsigned struct_blue_stats_sz; extern unsigned struct_bpf_dltlist_sz; extern unsigned struct_bpf_program_sz; -extern unsigned struct_bpf_stat_old_sz; +extern unsigned struct_bpf_stat30_sz; extern unsigned struct_bpf_stat_sz; extern unsigned struct_bpf_version_sz; extern unsigned struct_btreq_sz; @@ -883,7 +883,7 @@ extern unsigned struct_spi_ioctl_transfe extern unsigned struct_autofs_daemon_request_sz; extern unsigned struct_autofs_daemon_done_sz; extern unsigned struct_sctp_connectx_addrs_sz; -extern unsigned struct_usb_device_info_old_sz; +extern unsigned struct_usb_device_info30_sz; extern unsigned struct_usb_device_info_sz; extern unsigned struct_usb_device_stats_sz; extern unsigned struct_usb_endpoint_desc_sz; @@ -1434,7 +1434,7 @@ extern unsigned IOCTL_USB_REQUEST; extern unsigned IOCTL_USB_SETDEBUG; extern unsigned IOCTL_USB_DISCOVER; extern unsigned IOCTL_USB_DEVICEINFO; -extern unsigned IOCTL_USB_DEVICEINFO_OLD; +extern unsigned IOCTL_USB_DEVICEINFO_30; extern unsigned IOCTL_USB_DEVICESTATS; extern unsigned IOCTL_USB_GET_REPORT_DESC; extern unsigned IOCTL_USB_SET_IMMED; @@ -1454,7 +1454,7 @@ extern unsigned IOCTL_USB_GET_FULL_DESC; extern unsigned IOCTL_USB_GET_STRING_DESC; extern unsigned IOCTL_USB_DO_REQUEST; extern unsigned IOCTL_USB_GET_DEVICEINFO; -extern unsigned IOCTL_USB_GET_DEVICEINFO_OLD; +extern unsigned IOCTL_USB_GET_DEVICEINFO_30; extern unsigned IOCTL_USB_SET_SHORT_XFER; extern unsigned IOCTL_USB_SET_TIMEOUT; extern unsigned IOCTL_USB_SET_BULK_RA; @@ -1637,7 +1637,7 @@ extern unsigned IOCTL_BIOCGDLT; extern unsigned IOCTL_BIOCGETIF; extern unsigned IOCTL_BIOCSETIF; extern unsigned IOCTL_BIOCGSTATS; -extern unsigned IOCTL_BIOCGSTATSOLD; +extern unsigned IOCTL_BIOCGSTATS_30; extern unsigned IOCTL_BIOCIMMEDIATE; extern unsigned IOCTL_BIOCVERSION; extern unsigned IOCTL_BIOCSTCPF;
CVS commit: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: christos Date: Wed Aug 2 10:30:34 UTC 2023 Modified Files: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common: sanitizer_platform_limits_netbsd.h Log Message: Forgot to commit the rest of the renames. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: hannken Date: Wed Apr 5 07:41:38 UTC 2023 Modified Files: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common: sanitizer_mutex.h Log Message: Fix StaticSpinMutex::CheckLocked() on sparc32. The lock gets set with atomic_exchange() -> __sync_lock_test_and_set() which sets the value to 255 instead of 1. Check for a taken lock with "!= 0" instead of "== 1". This should work on all architectures. Ok: Matthew Green To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: hannken Date: Wed Apr 5 07:41:38 UTC 2023 Modified Files: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common: sanitizer_mutex.h Log Message: Fix StaticSpinMutex::CheckLocked() on sparc32. The lock gets set with atomic_exchange() -> __sync_lock_test_and_set() which sets the value to 255 instead of 1. Check for a taken lock with "!= 0" instead of "== 1". This should work on all architectures. Ok: Matthew Green To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h diff -u src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h:1.8 src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h:1.9 --- src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h:1.8 Fri Apr 9 23:14:55 2021 +++ src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h Wed Apr 5 07:41:38 2023 @@ -39,7 +39,7 @@ class StaticSpinMutex { } void CheckLocked() { -CHECK_EQ(atomic_load(_, memory_order_relaxed), 1); +CHECK_NE(atomic_load(_, memory_order_relaxed), 0); } private:
CVS commit: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: kamil Date: Tue Apr 16 01:44:07 UTC 2019 Modified Files: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common: sanitizer_linux.cc Log Message: Sync gcc.old GetPcSpBp() with GCC9 (and recent LLVM) Unify all NetBSD ports in a single ifdef. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc diff -u src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.7 src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.8 --- src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.7 Sun Nov 11 22:49:44 2018 +++ src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc Tue Apr 16 01:44:07 2019 @@ -1157,51 +1157,39 @@ void internal_join_thread(void *th) {} #endif void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) { -#if defined(__arm__) - ucontext_t *ucontext = (ucontext_t*)context; -# if SANITIZER_NETBSD +#if SANITIZER_NETBSD + // This covers all NetBSD architectures + ucontext_t *ucontext = (ucontext_t *)context; *pc = _UC_MACHINE_PC(ucontext); + *bp = _UC_MACHINE_FP(ucontext); *sp = _UC_MACHINE_SP(ucontext); - *bp = ucontext->uc_mcontext.__gregs[_REG_R11]; -# else +#elif defined(__arm__) + ucontext_t *ucontext = (ucontext_t*)context; *pc = ucontext->uc_mcontext.arm_pc; *bp = ucontext->uc_mcontext.arm_fp; *sp = ucontext->uc_mcontext.arm_sp; -# endif #elif defined(__aarch64__) ucontext_t *ucontext = (ucontext_t*)context; -# if SANITIZER_NETBSD - *pc = _UC_MACHINE_PC(ucontext); - *sp = _UC_MACHINE_SP(ucontext); - *bp = ucontext->uc_mcontext.__gregs[29]; /* XXX */ -# else *pc = ucontext->uc_mcontext.pc; *bp = ucontext->uc_mcontext.regs[29]; *sp = ucontext->uc_mcontext.sp; -# endif #elif defined(__hppa__) ucontext_t *ucontext = (ucontext_t*)context; -# if SANITIZER_NETBSD - *pc = _UC_MACHINE_PC(ucontext); - *sp = _UC_MACHINE_SP(ucontext); - *bp = ucontext->uc_mcontext.__gregs[3]; /* XXX */ -#else *pc = ucontext->uc_mcontext.sc_iaoq[0]; /* GCC uses %r3 whenever a frame pointer is needed. */ *bp = ucontext->uc_mcontext.sc_gr[3]; *sp = ucontext->uc_mcontext.sc_gr[30]; -# endif #elif defined(__x86_64__) # if SANITIZER_FREEBSD ucontext_t *ucontext = (ucontext_t*)context; *pc = ucontext->uc_mcontext.mc_rip; *bp = ucontext->uc_mcontext.mc_rbp; *sp = ucontext->uc_mcontext.mc_rsp; -# elif SANITIZER_NETBSD - ucontext_t *ucontext = (ucontext_t*)context; - *pc = ucontext->uc_mcontext.__gregs[_REG_RIP]; - *bp = ucontext->uc_mcontext.__gregs[_REG_RBP]; - *sp = ucontext->uc_mcontext.__gregs[_REG_RSP]; +#elif SANITIZER_OPENBSD + sigcontext *ucontext = (sigcontext *)context; + *pc = ucontext->sc_rip; + *bp = ucontext->sc_rbp; + *sp = ucontext->sc_rsp; # else ucontext_t *ucontext = (ucontext_t*)context; *pc = ucontext->uc_mcontext.gregs[REG_RIP]; @@ -1214,89 +1202,73 @@ void GetPcSpBp(void *context, uptr *pc, *pc = ucontext->uc_mcontext.mc_eip; *bp = ucontext->uc_mcontext.mc_ebp; *sp = ucontext->uc_mcontext.mc_esp; -# elif SANITIZER_NETBSD - ucontext_t *ucontext = (ucontext_t*)context; - *pc = ucontext->uc_mcontext.__gregs[_REG_EIP]; - *bp = ucontext->uc_mcontext.__gregs[_REG_EBP]; - *sp = ucontext->uc_mcontext.__gregs[_REG_ESP]; -# else - ucontext_t *ucontext = (ucontext_t*)context; +#elif SANITIZER_OPENBSD + sigcontext *ucontext = (sigcontext *)context; + *pc = ucontext->sc_eip; + *bp = ucontext->sc_ebp; + *sp = ucontext->sc_esp; +# else + ucontext_t *ucontext = (ucontext_t*)context; +# if SANITIZER_SOLARIS + /* Use the numeric values: the symbolic ones are undefined by llvm + include/llvm/Support/Solaris.h. */ +# ifndef REG_EIP +# define REG_EIP 14 // REG_PC +# endif +# ifndef REG_EBP +# define REG_EBP 6 // REG_FP +# endif +# ifndef REG_ESP +# define REG_ESP 17 // REG_SP +# endif +# endif *pc = ucontext->uc_mcontext.gregs[REG_EIP]; *bp = ucontext->uc_mcontext.gregs[REG_EBP]; *sp = ucontext->uc_mcontext.gregs[REG_ESP]; # endif #elif defined(__powerpc__) || defined(__powerpc64__) ucontext_t *ucontext = (ucontext_t*)context; -# if SANITIZER_NETBSD - *pc = _UC_MACHINE_PC(ucontext); - *sp = _UC_MACHINE_SP(ucontext); - *bp = ucontext->uc_mcontext.__gregs[_REG_R31]; -# else *pc = ucontext->uc_mcontext.regs->nip; *sp = ucontext->uc_mcontext.regs->gpr[PT_R1]; // The powerpc{,64}-linux ABIs do not specify r31 as the frame // pointer, but GCC always uses r31 when we need a frame pointer. *bp = ucontext->uc_mcontext.regs->gpr[PT_R31]; -# endif #elif defined(__sparc__) +# if defined(__arch64__) ||
CVS commit: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: kamil Date: Tue Apr 16 01:44:07 UTC 2019 Modified Files: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common: sanitizer_linux.cc Log Message: Sync gcc.old GetPcSpBp() with GCC9 (and recent LLVM) Unify all NetBSD ports in a single ifdef. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: kamil Date: Wed May 23 11:16:13 UTC 2018 Modified Files: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common: sanitizer_linux.cc Log Message: Cherry-pick upstream patch for internal_mmap() in GCC(.old) sanitizers Fix internal_mmap() on 32-bit NetBSD platforms There is need to use internal_syscall64() instead of internal_syscall_ptr(). The offset argument of type off_t is always 64-bit. http://llvm.org/viewvc/llvm-project?view=revision=333075 PR kern/53261 by Martin Husemann To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc diff -u src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.4 src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.5 --- src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.4 Mon Nov 13 08:05:22 2017 +++ src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc Wed May 23 11:16:13 2018 @@ -103,7 +103,7 @@ namespace __sanitizer { uptr internal_mmap(void *addr, uptr length, int prot, int flags, int fd, u64 offset) { #if SANITIZER_NETBSD - return internal_syscall_ptr(SYSCALL(mmap), addr, length, prot, flags, fd, + return internal_syscall64(SYSCALL(mmap), addr, length, prot, flags, fd, (long)0, offset); #elif SANITIZER_FREEBSD || SANITIZER_LINUX_USES_64BIT_SYSCALLS return internal_syscall(SYSCALL(mmap), (uptr)addr, length, prot, flags, fd,
CVS commit: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: kamil Date: Wed May 23 11:16:13 UTC 2018 Modified Files: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common: sanitizer_linux.cc Log Message: Cherry-pick upstream patch for internal_mmap() in GCC(.old) sanitizers Fix internal_mmap() on 32-bit NetBSD platforms There is need to use internal_syscall64() instead of internal_syscall_ptr(). The offset argument of type off_t is always 64-bit. http://llvm.org/viewvc/llvm-project?view=revision=333075 PR kern/53261 by Martin Husemann To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.