diff options
author | Wu, Yingcong <yingcong.wu@intel.com> | 2023-07-23 20:12:39 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2023-07-23 20:12:39 -0700 |
commit | fd0aa70528e425fe192d3eb0c5c1e32b4b1ccbf5 (patch) | |
tree | e51f1ef43e525ad5c4a21f75b2de48610369849d /compiler-rt | |
parent | f375ee36c4e1c87b8ed47ef44d3613bd5756f57a (diff) | |
download | llvm-fd0aa70528e425fe192d3eb0c5c1e32b4b1ccbf5.zip llvm-fd0aa70528e425fe192d3eb0c5c1e32b4b1ccbf5.tar.gz llvm-fd0aa70528e425fe192d3eb0c5c1e32b4b1ccbf5.tar.bz2 |
[sanitizer] use the right type for sizeof for interceptor hook
`PRE_READ` is called with a pointer and the size of the object
the pointer points to. But there is one line of code not calling
`PRE_READ` correctly(likely missing a dereference).
This patch fixes the problem.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D154676
Diffstat (limited to 'compiler-rt')
-rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc index 3900bcf..c10943b 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc @@ -2135,7 +2135,7 @@ PRE_SYSCALL(epoll_pwait2) const sanitizer_kernel_timespec *timeout, const kernel_sigset_t *sigmask, long sigsetsize) { if (timeout) - PRE_READ(timeout, sizeof(timeout)); + PRE_READ(timeout, sizeof(*timeout)); if (sigmask) PRE_READ(sigmask, sigsetsize); } |