[asan] Fix a thinko leading to a crash
authorDodji Seketeli <dodji@redhat.com>
Thu, 14 Feb 2013 04:37:56 +0000 (04:37 +0000)
committerDodji Seketeli <dodji@gcc.gnu.org>
Thu, 14 Feb 2013 04:37:56 +0000 (05:37 +0100)
commit8fb067263b60e184b2e0d303e1b8d40166e2bec4
treec03eb36fdcf82d669b4a77807ee77c250bdb6195
parent28d5c77761402501ed6604c581d27410c22bbf4b
[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/ChangeLog
gcc/asan.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/asan/memcmp-2.c [new file with mode: 0644]