[Top][All Lists]

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

Re: editfns.c (Fformat): fix for segfault

From: Richard Stallman
Subject: Re: editfns.c (Fformat): fix for segfault
Date: Mon, 28 Apr 2003 19:38:40 -0400

The only way that the value of format should be so different
from format_start, and yet with the same text, is if
there was a GC and it moved the string.

I don't see what could possibly have caused a GC there.
It would have to be something that calls eval.

If it was really due to a GC, I have doubts that this change is
enough, because the old location of the string could get overwritten
with some other string.  Perhaps it will happen just a minority of the
time, but it can happen.

I added a facility to make Emacs abort if it GCs in the middle
of that code.  That way we will really get to the bottom of this.

    This is my analysis.  In the first scan, Fchar_to_string or
    Fprint1_to_string are called, and they will relocate a data
    of a Lisp string (in the current case, args[0]).

How can either of these functions cause a GC?

reply via email to

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