RE: Weird Activation Records (RTS wizards, please help!)

I can't seem to get the Garbage Collector to work properly on MacOS X. When a program triggers the Garbage Collector, it aborts with the following message: a.out: fatal error: scavenge_stack: weird activation record found on stack: 0
I'd be willing to bet large amounts of money that this is due to the macro LOOKS_LIKE_GHC_INFO() returning the wrong value. Read the comments in ghc/rts/Storage.h, particularly the sections on "Address space layout macros" and "Macros for distinguishing code pointers from data pointers". In the latter section, unregisterised compilation on MacOS X should be using Plan C. (Sigbjorn - did you already solve this one?) Cheers, Simon

"Simon Marlow"
I can't seem to get the Garbage Collector to work properly on MacOS X. When a program triggers the Garbage Collector, it aborts with the following message: a.out: fatal error: scavenge_stack: weird activation record found on stack: 0
I'd be willing to bet large amounts of money that this is due to the macro LOOKS_LIKE_GHC_INFO() returning the wrong value. Read the comments in ghc/rts/Storage.h, particularly the sections on "Address space layout macros" and "Macros for distinguishing code pointers from data pointers". In the latter section, unregisterised compilation on MacOS X should be using Plan C.
(Sigbjorn - did you already solve this one?)
No, I had to hand back the OS X box I was using. Wolfgang seems to be making great progress on getting a full port going though. --sigbjorn

I'd be willing to bet large amounts of money that this is due to the macro LOOKS_LIKE_GHC_INFO() returning the wrong value. [...]
Well, you would have won large amounts of money had I accepted the bet. It turns out to have been entirely due to my own stupidity. I had mistyped the #ifdef darwin_TARGET_OS in Main.c where I put the code that was supposed to figure out the etext and edata adresses (I copied the code from the GHC 5.00.2 port, so I didn't double-check if it was really getting compiled after all...). If got the mangler to produce working code at least in some cases - I still have to chase after a segfault in one larger program that I tried to compile. Due too my lack of Perl knowledge, I didn't yet manage to remove the jumps from the slow to the fast entry points, and a function called __DISCARD__ must be present for linking (it's never called, though). Should the old PowerPC code in the mangler be kept there? It assumes a slightly different assembler dialect and a completely different linker, and as it just asks for $TargetPlatform =~ /^powerpc|rs6000/, it keeps getting in the way... That's it for now, I'm going after that segfault... Cheers, Wolfgang
participants (3)
-
Sigbjorn Finne
-
Simon Marlow
-
Wolfgang Thaller