[MLton] Card/cross map alignment broken?

Wesley W. Terpstra wesley at terpstra.ca
Tue Oct 13 11:17:44 PDT 2009


I've noticed that the alpha port sometimes 'hangs'. The 'hang' is caused by
a sudden burst of unaligned memory accesses which bring the kernel to its
knees. I suppose if I waited long enough it would work, so it isn't really a
hang. Obviously, I already use -align 8.

Due to the nature of the hang I have a strong suspicion that the GC is
responsible. Things run smoothly until suddenly the program 'hangs', but
changing GC parameters will move the location of the 'hang'. Looking through
the GC code I strongly suspect that the crossMap is ending up unaligned.
Placing it after the cardMap (a 1-byte aligned array) seems quite risky, but
I lack the expertise in this area of the code to be certain this is a
problem.

Can someone familiar with this code please check that
  s->generationalMaps.crossMap =
    (GC_crossMap) (s->heap.start + s->heap.size + cardMapSize);
indeed must be >8 bytes aligned?

Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mlton.org/pipermail/mlton/attachments/20091013/8f7bf83f/attachment-0001.html


More information about the MLton mailing list