This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug sanitizer/69276] Address sanitizer does not handle heap overflow


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69276

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Comment on attachment 37341
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37341
suggested patch

+  else if (is_gimple_call (stmt) && gimple_store_p (stmt)
+          && gimple_clobber_p (stmt))
+    {
+      asan_mem_ref r;
+      asan_mem_ref_init (&r, NULL, 1);
+
+      r.start = gimple_call_lhs (stmt);
+      r.access_size = int_size_in_bytes (TREE_TYPE (r.start));
+      return has_mem_ref_been_instrumented (&r);
+    }
+

This condition is never true, did you mean !gimple_clobber_p instead?
But obviously calls are never clobbers, so there is no need to test that.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]