I'd like to add two extra fields of type StgWord32
to the thread state object (TSO). Based on the information I found on the GHC-Wiki and from looking at the source code, I have extended the struct in /includes/rts/storage/TSO.h
and changed the program that creates different offsets (creating DerivedConstants.h
). The compiler, the rts, and a simple application re-compile, but at the end of the execution (in hs_exit_
) the garbage collector complains:
internal error: scavenge_stack: weird activation record found on stack: 45
I guess it has to to with cmm
and/or the STG implementation details (the offsets are generated since the structs are not visible at cmm
level, correct me if I'm wrong). Is the order of fields significant? Have I missed a file that should be changed?
I use a debug build of the compiler and RTS and a rather dated ghc 6.12.3 on a 64bit architecture. Any hints to relevant documentation and comments on the difference between ghc 6 and 7 regarding TSO handling are welcome, too.