emacs-devel
[Top][All Lists]
Advanced

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

Re: Mysterious redisplay problem and a trap in xdisp.c


From: Gerd Moellmann
Subject: Re: Mysterious redisplay problem and a trap in xdisp.c
Date: 09 Feb 2002 23:42:15 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50

address@hidden (Kim F. Storm) writes:


[...]

> I have now tracked the problem down to the following change:
> 
> 2001-12-11  Andrew Innes  <address@hidden>
> 
>       * insdel.c (make_gap) [DOUG_LEA_MALLOC]: Call make_gap_smaller if
>       arg is negative.
> 
> If I comment out the call to make_gap_smaller in make_gap, the problem
> goes away!

Hm, my theory, which might well be completely wrong, would be that a GC
during redisplay, via make_gap_smaller, changes the address of the
characters to be displayed, and that some code in redisplay doesn't
protect itself against that address change.

>From the top of my head, I'm not aware of code in redisplay using
pointers into buffers instead of buffer char/byte positions, i.e., int
offsets from the buffer start.  So, I guess the only way to find out
if that is the problem, and if so where it is, is to look at the stack
backtraces when stopping in the debugger in make_gap_smaller during
redisplay and to check all the relevant functions from the backtrace
if they somehow keep a pointer into a buffer around the call to
something that can GC.

(A quick fix would be to disable the shrinking of the gap for GCs
during redisplay, which could be done by checking the value of the
variable redisplaying_p.)



reply via email to

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