Hi Liam,
Thanks James. Indeed, *formatting-test-grid* is just a throwaway to test the formatting of grids. While a patch is OK, I would rather just not load it.
Works for me; either solution will stop the corruption issue that I ran into. :)
However, I've long been uneasy with saved images and foreign memory; I have no confidence that what's saved will come back.
I feel exactly the same way. It has become an article of faith with me that foreign pointers that get saved to a core will come back essentially uninitialized.
Indeed, if you are seeing rng variable problems, then there is a deeper problem that can't be fixed with turning a defparameter into a function.
Actually, my workaround (to saved rngs coming back uninitialized) kind of does boil down to converting the defparameter to a function. Fortunately it's possible to access the state of a GSL rng, so I've been checkpointing that and then restoring it into a freshly-constructed rng every time my program starts.
I would like to get ideas from SBCL experts. I think the solution is likely to be implementation dependent, but that's the place to start.
I'll be interested to hear if there's any realistic solution; I've mostly been assuming that it's up to me to make sure that I don't have any "live" foreign pointers when I dump core.
Can you generate a small example of your rng problem?
Certainly; I've attached a small script along with its output on my machine.
James