PCH and exec-shield...

Zack Weinberg zack@codesourcery.com
Sun Mar 21 19:29:00 GMT 2004


Hans-Peter Nilsson <hp@bitrange.com> writes:
> On Tue, 16 Mar 2004, Zack Weinberg wrote:
>> To ask a tangential question, if (as presently implemented) PCH has
>> to reload data structures at the original address, why is there a
>> problem with hashing pointers?
>
> Maybe I'm answering that question out of its context, but it seems
> you abandoned context by the "tangential" qualifier: Because it's
> too easy to get unrepeatable behavior, from one machine to another
> or from one run to another, including seemingly harmlessly different
> code and different bug behavior.

I think you're conflating two phenomena.  The variation across
machines is an effect of iterating over pointer hashtables and using
the order to influence code generation (for instance, changing which
hard register is assigned to which pseudo).  That's independent of PCH
and everyone agrees this shouldn't be done

PCH goes farther, and (for reasons which I still don't fully
understand) forces one not to use pointer hashing at all, even if the
table is never iterated over.  This is what I don't like.  In
particular, the current places where DECL_UID and TYPE_UID are used
(ignoring tree-ssa) could all be replaced by pointer hashing without
iteration if not for PCH.

zw



More information about the Gcc mailing list