On Wed, Oct 19, 2011 at 12:02 PM,  <konstantin.s.serebry...@gmail.com> wrote:
> Minimized the crash to this:
>
> struct Foo {
>  unsigned bf1:1;
>  unsigned bf2:1;
>  unsigned bf3:1;
> };
>
> void foo (struct Foo *ob) {
>  ob->bf2 = 1;
> }
>
>
>
> D.2731_4 = &ob_1(D)->bf2;
> __asan_base_addr.2 = (long unsigned int) D.2731_4;
> D.2732_5 = __asan_base_addr.2 >> 3;
> D.2733_6 = 1 << 44;
> D.2734_7 = D.2732_5 + D.2733_6;
> D.2735_8 = VIEW_CONVERT_EXPR<char *>(D.2734_7);
> # VUSE <.MEM>
> __asan_shadow.3 = *D.2735_8;
> D.2737_9 = __asan_shadow.3 != 0;
> D.2738_10 = __asan_base_addr.2 & 7;
> D.2739_11 = (char) D.2738_10;
> D.2740_12 = D.2739_11 + 0;
> D.2741_13 = D.2740_12 >= __asan_shadow.3;
> __asan_crash_cond.4 = D.2737_9 & D.2741_13;
> if (__asan_crash_cond.4 != 0)
> ./expand_expr_addr_expr_1_err.c: In function ‘foo’:
> ./expand_expr_addr_expr_1_err.c:8:11: internal compiler error: in
> expand_expr_addr_expr_1, at expr.c:7381
>
>
>
> How do I avoid instrumenting bitfields?

Use get_inner_reference to compute the bitpos, and check if it is
multiple of bits_per_unit.

David

>
> http://codereview.appspot.com/5272048/
>

Reply via email to