This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Robustify get_ref_base_and_extent and friend


On Wed, May 30, 2012 at 7:14 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> we're having issues with get_ref_base_and_extent overflowing the offset and
> thus returning bogus big negative values on 32-bit hosts. ?The attached patch
> converts it to double ints like get_inner_reference. ?It also contains a small
> fix for build_user_friendly_ref_for_offset that can stop if a field has again
> too big an offset.
>
> Tested on x86_64-suse-linux and i586-suse-linux, OK for mainline?

Heh, I think I have a similar patch for the get_ref_base_and_extent issue
in my dev tree for almost three years ...

Ok!

Thanks,
Richard.

>
> 2012-05-30 ?Eric Botcazou ?<ebotcazou@adacore.com>
>
> ? ? ? ?* tree-dfa.c (get_ref_base_and_extent): Compute the offset using
> ? ? ? ?double ints throughout.
> ? ? ? ?* tree-sra.c (build_user_friendly_ref_for_offset) <RECORD_TYPE>:
> ? ? ? ?Check that the position of the field is representable as an integer.
>
>
> --
> Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]