[asan] Fix a thinko leading to a crash
commit0f2b58aef2147c44b04df027d10a195a1b0ba3be
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Feb 2013 04:37:56 +0000 (14 04:37 +0000)
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Feb 2013 04:37:56 +0000 (14 04:37 +0000)
treec03eb36fdcf82d669b4a77807ee77c250bdb6195
parent45323a38e6a47b47719abf886c52d184d0229811
[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
gcc/ChangeLog
gcc/asan.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/asan/memcmp-2.c [new file with mode: 0644]