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
+2013-02-14 Dodji Seketeli <dodji@redhat.com>
+
+ Fix an asan crash
+ * asan.c (instrument_builtin_call): Really put the length of the
+ second source argument into src1_len.
+
2013-02-13 Jakub Jelinek <jakub@redhat.com>
* asan.c (create_cond_insert_point): Add create_then_fallthru_edge
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))
{
+2013-02-14 Dodji Seketeli <dodji@redhat.com>
+
+ Fix an asan crash
+ * c-c++-common/asan/memcmp-2.c: New test.
+
2013-02-13 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/55582
--- /dev/null
+/* { dg-do compile } */
+
+int
+foo ()
+{
+ char s0[5] = {0};
+ char s1[5] = {1};
+
+ return __builtin_memcmp (s0, s1, 2);
+}