ticky
Tim Chevalier
catamorphism at gmail.com
Thu Apr 5 23:25:28 EDT 2007
On 4/5/07, Simon Peyton-Jones <simonpj at microsoft.com> wrote:
> more info...
>
> The seg fault was because I was on a 64-bit machine. StgEntCounter (defined in Rts.h) used some 32-bit fields. The asm code emitted by CgTicky to statically-allocate the record put the 32-bit words end to end, followed the 64-bit words. No padding. (The via-c route generates entirely bogus code for such mixed-size data chunks.) But the C compiler adds padding.
>
> I fixed this by making the 32-bit words into native words. Lesson: I guess packing must be done manually if it's to be portable. Presumably info tables do this.
>
> the other problems are still there.
>
Okay, I'm just trying to reproduce what you did here... in the typedef
for StgEntCounter in Rts.h, I changed the three instances of StgWord32
to StgWord, and correspondingly, in emitTickyCounter in CgTicky.hs, I
changed the three instances of I32 to wordRep. But I still get the
segfault. Is that what you did? Would it be easier to send me a patch
for what you changed so far?
Thanks,
Tim
--
Tim Chevalier * chevalier at alum.wellesley.edu * Often in error, never in doubt
Confused? See http://catamorphism.org/transition.html
More information about the Cvs-ghc
mailing list