|
From: | Ken Raeburn |
Subject: | Re: allocate_string_data memory corruption |
Date: | Sun, 22 Jan 2006 19:35:03 -0500 |
On Jan 22, 2006, at 11:45, Stefan Monnier wrote:
if you look at x_catch_errors, you'll see that it allocates one lisp_cons cell, one lisp_string and one lisp_misc. Whether it's the cause of the bugs we see, I don't know, but since it's run from the signal handler, itcan be executed at potentially any time.The patch below should remove this particular problem.
@@ -7495,16 +7500,23 @@ Display *dpy; { int count = SPECPDL_INDEX (); + struct x_error_message_stack *data = malloc (sizeof (*data));
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. 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?
Ken
[Prev in Thread] | Current Thread | [Next in Thread] |