On Thu, Oct 18, 2012 at 08:40:32PM -0700, Xinliang David Li wrote: > The following is small bug fix caught during testing. The shadow value > for redzone can be negative, so the shadow type must be signed for the > check to succeed. > > Ok for the branch?
Yes (with a proper ChangeLog.asan entry ;) > --- asan.c (revision 192567) > +++ asan.c (working copy) > @@ -825,10 +825,10 @@ static void > asan_init_shadow_ptr_types (void) > { > asan_shadow_set = new_alias_set (); > - shadow_ptr_types[0] = build_distinct_type_copy (unsigned_char_type_node); > + shadow_ptr_types[0] = build_distinct_type_copy (signed_char_type_node); > TYPE_ALIAS_SET (shadow_ptr_types[0]) = asan_shadow_set; > shadow_ptr_types[0] = build_pointer_type (shadow_ptr_types[0]); > - shadow_ptr_types[1] = build_distinct_type_copy (short_unsigned_type_node); > + shadow_ptr_types[1] = build_distinct_type_copy (short_integer_type_node); > TYPE_ALIAS_SET (shadow_ptr_types[1]) = asan_shadow_set; > shadow_ptr_types[1] = build_pointer_type (shadow_ptr_types[1]); > } Jakub