Make sure that panic's during finalization are handled by the custom panicproc not by the default panicproc, because stderr might not be available. 
When the default panicproc is in use, this doesn't make any difference.
merge trunk