[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. llvm-svn: 334670
This commit is contained in:
parent
282ad770ce
commit
0569660af3
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue