diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2018-10-25 22:15:44 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2018-10-25 22:15:44 +0000 |
commit | a2ede79f1502a17eacdf8fba012819fbfc7c8b2d (patch) | |
tree | 8eb431cf984e7a3cf7e160d6bfcf2c7cb0f8484a /lib/asan | |
parent | d48e4d78293ca3a91b28c8abd77464a709263d06 (diff) | |
download | compiler-rt-a2ede79f1502a17eacdf8fba012819fbfc7c8b2d.tar.gz |
[sanitizer] Fix mallopt interceptor.
On error, mallopt is supposed to return 0, not -1.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@345323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan')
-rw-r--r-- | lib/asan/asan_malloc_linux.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/asan/asan_malloc_linux.cc b/lib/asan/asan_malloc_linux.cc index 76bdff999..0a534fe21 100644 --- a/lib/asan/asan_malloc_linux.cc +++ b/lib/asan/asan_malloc_linux.cc @@ -209,7 +209,7 @@ INTERCEPTOR(struct fake_mallinfo, mallinfo, void) { } INTERCEPTOR(int, mallopt, int cmd, int value) { - return -1; + return 0; } #endif // SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO |