This is the mail archive of the gcc@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] Re: Bootstrap failure due to GC / PCH memory corruption


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


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