On Fri, 3 Jun 2005, Leopold Toetsch wrote: > Nick Glencross wrote: > > > I fear that there may be some pointer alignment problems in hash because I'm > > getting hangs which seem to be linked to finding strings in hash tables. > > (That's pure conjecture) > > I'm not aware of any problems with alignment in hash.c. *But* we will have > troubles on that platform with doubles. Parrot PMCs are allocate off a big > piece of mem. A PMC currently happens to be 24 bytes (on 32-bit) but only with > the debug-ish version field compiled in. With an --optimze compiled parrot > every second PMC would have unaligned doubles.
That's likely to cause a problem. We've been recently hunting down odd alignment-related oddities on p5p. As a first approximation, doubles need to be aligned at least on the boundaries given by Perl5's Config{'alignbytes'}. However, when those doubles are part of a structure, it apparently can get more confusing. I don't think we sorted out all the possibilities, but Nick C. was the last one fiddling with it. In the end, there may be no recourse other than using unions. -- Andy Dougherty [EMAIL PROTECTED]