On Fri, Feb 27, 2015 at 11:53:14AM -0800, Martin Uecker wrote:
I tested Marek's proposed change and it works correctly,
i.e. arrays which are not part of a struct are now
instrumented when accessed through a pointer. This also
means that the following case is diagnosed (correctly)
as
Marek Polacek pola...@redhat.com:
On Fri, Feb 27, 2015 at 11:53:14AM -0800, Martin Uecker wrote:
I tested Marek's proposed change and it works correctly,
i.e. arrays which are not part of a struct are now
instrumented when accessed through a pointer. This also
means that the following
Bootstrap and regression tested on x86_64.
A ubsan-bootstrap for C and C++ works too (although there
are other unrelated runtime errors).
I tried a bootstrap with -fsanitize=bounds-strict and
there are indeed many additional runtime errors due the
struct hack with last array element of size 1
I tested Marek's proposed change and it works correctly,
i.e. arrays which are not part of a struct are now
instrumented when accessed through a pointer. This also
means that the following case is diagnosed (correctly)
as undefined behaviour as pointed out by Richard:
int
main (void)
{
int *t