This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/69276] Address sanitizer does not handle heap overflow
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 14 Jan 2016 16:24:01 +0000
- Subject: [Bug sanitizer/69276] Address sanitizer does not handle heap overflow
- Auto-submitted: auto-generated
- References: <bug-69276-4 at http dot gcc dot gnu dot org/bugzilla/>
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.