Commit 913f32a1 by Marat Zakirov Committed by Marat Zakirov

asan.c (instrument_derefs): BIT_FIELD_REF added.

gcc/ChangeLog:

2014-09-19  Marat Zakirov  <m.zakirov@samsung.com>

	* asan.c (instrument_derefs): BIT_FIELD_REF added.

gcc/testsuite/ChangeLog:

2014-09-19  Marat Zakirov  <m.zakirov@samsung.com>

	* c-c++-common/asan/bitfield-5.c: New test.

From-SVN: r216144
parent 2f6ca9d3
2014-10-13 Marat Zakirov <m.zakirov@samsung.com>
* asan.c (instrument_derefs): BIT_FIELD_REF added.
2014-10-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/63419
......@@ -1711,6 +1711,7 @@ instrument_derefs (gimple_stmt_iterator *iter, tree t,
case INDIRECT_REF:
case MEM_REF:
case VAR_DECL:
case BIT_FIELD_REF:
break;
/* FALLTHRU */
default:
......
2014-09-19 Marat Zakirov <m.zakirov@samsung.com>
* c-c++-common/asan/bitfield-5.c: New test.
2014-10-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/63419
......
/* Check BIT_FIELD_REF. */
/* { dg-do run } */
/* { dg-shouldfail "asan" } */
struct A
{
int y : 20;
int x : 13;
};
int __attribute__ ((noinline, noclone))
f (void *p) {
return ((struct A *)p)->x != 0;
}
int
main ()
{
int a = 0;
return f (&a);
}
/* { dg-output "ERROR: AddressSanitizer: stack-buffer-overflow" } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment