On 4/5/07, Simon Peyton-Jones <[EMAIL PROTECTED]> 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 * [EMAIL PROTECTED] * Often in error, never in doubt
Confused? See http://catamorphism.org/transition.html

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to