From 8fb067263b60e184b2e0d303e1b8d40166e2bec4 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Thu, 14 Feb 2013 04:37:56 +0000 Subject: [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 --- gcc/asan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/asan.c') 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)) { -- cgit v1.1