Nikodemus Siivola <nsiivola@...> writes:
> It seems that when the heap is totally exhausted on x86-64
> and print_generation_stats is called, there is a SIGSEGV during
> save_fpu(), which causes a lisp-side error to be signalled,
> which allocates, which then hangs waiting for free_pages_lock.
> (Or that was my analysis of it, at least.)
> Does someone understand why save_fpu() gets the memory fault,
> and is there a better fix then telling print_generation_stats()
> not to save FPU state when we're already dying?
The x86-64 fpu_save and fpu_restore look completely bogus. They're
still using x86 calling convention (arg on the stack, not arg in
%rdi), are indexing into the middle of a word on the stack, and are
using the x87 fnsave/frstor rather than the sse fxsave/fxrstor.