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: Sun, 22 Jan 2006 21:06:15 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> It may just push the memory corruption from the Lisp object pool to  the
>> malloc pool, since malloc isn't safe for signal handlers either.

> Indeed: if you want to really be signal-safe, use -DSYNC_INPUT.

> With -DSYNC_INPUT, Emacs uses a whole lot of things in signal handlers,
     ^^^
     out

> including malloc and Xlib calls.  So my patch doesn't make it much worse.
> At least on some systems, Emacs uses malloc hooks to wrap malloc operations
> inside (UN)BLOCK_INPUT, so that this part "works" (i.e. there's no
> guarantee it's safe, but in practice on those systems it should be).

>> Is it possible to pre-allocate this storage on a per-display basis, or
>> might we have to deal with multiple error messages from one server
>> without a chance to do processing outside of the signal handler?

> If this were the only place where we do malloc in signal handlers, it might
> be worth the trouble.  But given the current state of affairs, it'd be
> a waste of time, I think.

Sorry,


        Stefan




reply via email to

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