summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-06-13 23:19:21 +0000
committerPeter Wu <peter@lekensteyn.nl>2018-06-13 23:19:21 +0000
commit2ec43130eb3686367c5110d7b818874f51f92f70 (patch)
treed8f31be396230468b4446f960e180825e83b2cac /lib/sanitizer_common
parent435b5a252e1e559c971e311924b9d837eb1f4e8b (diff)
[ASAN] Fix fputs interception for 32-bit macOS
On 32-bit macOS, "_fputs$UNIX2003" is called instead of "fputs" and the "fgets_fputs" test fails. Apparently previous versions still passed the test due to the internal implementation calling "strlen", but that does not seem to be the case with macOS 10.13.3. Fixes r334450. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@334670 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common')
-rw-r--r--lib/sanitizer_common/sanitizer_common_interceptors.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_common_interceptors.inc b/lib/sanitizer_common/sanitizer_common_interceptors.inc
index 474365ec2..ff18bc801 100644
--- a/lib/sanitizer_common/sanitizer_common_interceptors.inc
+++ b/lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -1208,7 +1208,7 @@ INTERCEPTOR(char *, fgets, char *s, SIZE_T size, void *file) {
#endif
#if SANITIZER_INTERCEPT_FPUTS
-INTERCEPTOR(int, fputs, char *s, void *file) {
+INTERCEPTOR_WITH_SUFFIX(int, fputs, char *s, void *file) {
// libc file streams can call user-supplied functions, see fopencookie.
void *ctx;
COMMON_INTERCEPTOR_ENTER(ctx, fputs, s, file);