emacs-devel
[Top][All Lists]
Advanced

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

Re: allocate_string_data memory corruption


From: Stefan Monnier
Subject: Re: allocate_string_data memory corruption
Date: Thu, 19 Jan 2006 22:56:09 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

> I just noticed that allocate_string does nothing to prevent
> signals from being handled.  Neither does Fcons.  The result

Indeed, both those functions assume that signal handlers do not allocate
cons cells or strings.

In the Emacs-21-pretest days, Gerd tracked down a bug where this assumption
was broken (the keybuf data filled by the signal handler was using a cons
cell) and fixed it by changing the keybuf data so that the cons cell wasn't
needed any more.

> So it seems that these functions need BLOCK_INPUT.

I think instead they should be disallowed in signal handlers.
And AFAIK they are disallowed.  But it's quite possible that some signal
handler does it, even though it's disallowed.

Maybe eassert(!handling_signal) should be added to allocate_string
(and maybe it will catch the current bug).


        Stefan




reply via email to

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