summaryrefslogtreecommitdiffstats
path: root/gcc/asan.c
diff options
context:
space:
mode:
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2013-02-14 04:37:56 +0000
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2013-02-14 04:37:56 +0000
commit0f2b58aef2147c44b04df027d10a195a1b0ba3be (patch)
treec03eb36fdcf82d669b4a77807ee77c250bdb6195 /gcc/asan.c
parent45323a38e6a47b47719abf886c52d184d0229811 (diff)
downloadppe42-gcc-0f2b58aef2147c44b04df027d10a195a1b0ba3be.tar.gz
ppe42-gcc-0f2b58aef2147c44b04df027d10a195a1b0ba3be.zip
[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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196044 138bc75d-0d04-0410-961f-82ee72b054a4
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 9e22c42743b..a569479059d 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))
{
OpenPOWER on IntegriCloud