[Top][All Lists]
[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 20:58:17 -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,
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.
Stefan
- Re: allocate_string_data memory corruption, (continued)
- Re: allocate_string_data memory corruption, Richard M. Stallman, 2006/01/20
- Re: allocate_string_data memory corruption, Stefan Monnier, 2006/01/20
- Re: allocate_string_data memory corruption, Chong Yidong, 2006/01/21
- Re: allocate_string_data memory corruption, Richard M. Stallman, 2006/01/21
- Re: allocate_string_data memory corruption, Stefan Monnier, 2006/01/22
- Re: allocate_string_data memory corruption, Andreas Schwab, 2006/01/22
- Re: allocate_string_data memory corruption, Richard M. Stallman, 2006/01/22
- Re: allocate_string_data memory corruption, Ken Raeburn, 2006/01/22
- Re: allocate_string_data memory corruption,
Stefan Monnier <=
- Re: allocate_string_data memory corruption, Stefan Monnier, 2006/01/22
- Re: allocate_string_data memory corruption, Richard M. Stallman, 2006/01/24
- Re: allocate_string_data memory corruption, Stefan Monnier, 2006/01/22
- Re: allocate_string_data memory corruption, Richard M. Stallman, 2006/01/24
- Re: allocate_string_data memory corruption, Kim F. Storm, 2006/01/24
- Re: allocate_string_data memory corruption, Chong Yidong, 2006/01/24
- Re: allocate_string_data memory corruption, Richard M. Stallman, 2006/01/25
- Re: allocate_string_data memory corruption, Chong Yidong, 2006/01/25
- Re: allocate_string_data memory corruption, Richard M. Stallman, 2006/01/26
- Re: allocate_string_data memory corruption, Stefan Monnier, 2006/01/26