[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash robustness (Was: Re: Dynamic modules: MODULE_HANDLE_SIGNALS et

From: Daniel Colascione
Subject: Re: Crash robustness (Was: Re: Dynamic modules: MODULE_HANDLE_SIGNALS etc.)
Date: Wed, 23 Dec 2015 09:56:31 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

On 12/23/2015 09:55 AM, Eli Zaretskii wrote:
>> Cc: address@hidden, address@hidden,
>>  address@hidden, address@hidden, address@hidden
>> From: Daniel Colascione <address@hidden>
>> Date: Wed, 23 Dec 2015 09:41:20 -0800
>>> We could try calling shut_down_emacs from the signal handler, but I'm
>>> not sure if the small alternate stack will be enough for write-region.
>>> Something to investigate, I guess.
>> We can make the alternate signal stack as large as we want.
> Not as large as is safe to run arbitrary Lisp.

Then don't run arbitrary lisp after we've segfaulted.

>>>> The next time Emacs starts, we can restore the buffers we've saved
>>>> this way and ask users to save them --- just like autosave, but done
>>>> on-demand, at crash time, in C code, on the alternate signal stack.
>>> Why "like autosave"?  What will be different from actually
>>> auto-saving?  shut_down_emacs does that automatically.
>> Er, yes, I noticed that after I wrote the email that we already do what
>> I propose, more or less. In this case, we don't lose very much by just
>> deleting the stack overflow code and relying on autosave.
> Auto-save will only save buffers that visit files.

A minimal, C-only autosave run in the signal-handling path could save
all buffer content.

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]