aboutsummaryrefslogtreecommitdiff
path: root/gcc/asan.c
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2013-02-14 04:37:56 +0000
committerDodji Seketeli <dodji@gcc.gnu.org>2013-02-14 05:37:56 +0100
commit8fb067263b60e184b2e0d303e1b8d40166e2bec4 (patch)
treec03eb36fdcf82d669b4a77807ee77c250bdb6195 /gcc/asan.c
parent28d5c77761402501ed6604c581d27410c22bbf4b (diff)
downloadgcc-8fb067263b60e184b2e0d303e1b8d40166e2bec4.zip
gcc-8fb067263b60e184b2e0d303e1b8d40166e2bec4.tar.gz
gcc-8fb067263b60e184b2e0d303e1b8d40166e2bec4.tar.bz2
[asan] Fix a thinko leading to a crash
It appeared that in my previous patch, a stupid thinko can lead to a crash when instrumenting some builtin functionsK. Fixed thus. Bootstrapped and tested against trunk on x86_64-unknown-linux-gnu. gcc/ * asan.c (instrument_builtin_call): Really put the length of the second source argument into src1_len. gcc/testsuite/ * c-c++-common/asan/memcmp-2.c: New test. From-SVN: r196044
Diffstat (limited to 'gcc/asan.c')
-rw-r--r--gcc/asan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/asan.c b/gcc/asan.c
index 9e22c42..a569479 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -1771,7 +1771,7 @@ instrument_builtin_call (gimple_stmt_iterator *iter)
if (get_mem_refs_of_builtin_call (call,
&src0, &src0_len, &src0_is_store,
- &src1, &src0_len, &src1_is_store,
+ &src1, &src1_len, &src1_is_store,
&dest, &dest_len, &dest_is_store,
&dest_is_deref))
{