This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Re: Bootstrap failure due to GC / PCH memory corruption
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Fri, 27 Jun 2003 09:29:47 -0700
- Subject: Re: [PATCH] Re: Bootstrap failure due to GC / PCH memory corruption
- References: <200306262325.BAA00169@faui11.informatik.uni-erlangen.de>
Ulrich Weigand <weigand@i1.informatik.uni-erlangen.de> writes:
> While I didn't manage to change the PCH behaviour, I was able to
> fix the compute_inverse logic to work with arbitrary sizes.
> This problem was quite trivial: 'unsigned int' simply isn't big
> enough to hold the sizes on 64-bit platforms. Using size_t
> instead fixes the problem.
>
> Note that we should probably really use size_t anyway, as the
> OFFSET_TO_BIT macro performs a multiplication in the type of
> its OFFSET argument, which is always a pointer difference.
> This means that computing the inverse modulo the size of
> unsigned int could give wrong results anyway ...
>
> In any case, the patch below fixes the bootstrap failures on
> s390x, and doesn't appear to introduce any real overhead,
> so I propose to apply it now; the matter of just how PCH ptes
> are generated can be addressed independently.
>
> Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux.
> OK?
Yes, please do check this in.
zw