emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Asynchronous bug


From: Richard Stallman
Subject: Re: Asynchronous bug
Date: Sat, 03 May 2003 11:03:29 -0400

    That's what I've been using for a while and it seems to help in practice,
    even though in theory it still has the same problem: specpdl_ptr
    and specpdl_ptr->symbol are not aliased (and neither are they marked
    as volatile) so the compiler can reorder accesses to those things and
    generate the same code as it would have generated for something like:

            specpdl_ptr--;
            this_binding = *(specpdl_ptr+1);

This sort of rearrangement for memory references is only an academic
possibility.  GCC will never do that, and I doubt other compilers will.
But if we want to make sure, would declaring specpdl_ptr volatile
solve the problem?  That ought to prevent the decrement of specpdl_ptr
from being moved very much.

    I'm right now experimenting with the simple attached change
    that moves all the signal handling code outside of the
    signal handler (which now just sets a variable and returns).

If there is a loop that can run for a substantial time and cannot quit,
this change would have the effect that the screen won't refresh
and the cursor won't blink during that loop.

It also seems to have a more superficial bug: it does not handle
immediate_quit properly.  When immediate_quit is set, I think this
code won't even handle C-g right away, not until the loop exits
and some other code runs which does not use immediate_quit and
does QUIT.




reply via email to

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