Current-Users archive

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

SIGIO, xemacs random crashes on SMP system



Hi,

Following up my explorations regarding PR#39521, and also just for the sake of
curiosity, I was looking at the sendsig_siginfo() and buildcontext() functions
in sys/arch/i386/i386/machdep.c

I have a small question regarding rev 1.615 of this file, that says:
``Clear the direction flag before entering a signal handler''
which corresponds to the following diff in machdep.c, buildcontext():
-       tf->tf_eflags &= ~(PSL_T|PSL_VM|PSL_AC);
+       tf->tf_eflags &= ~(PSL_T|PSL_VM|PSL_AC|PSL_D);

If I understood things correctly, the signal handler directly returns to
the LWP via the signal trampoline without any kernel intervention.

Now, my question is: isn't it possible for an LWP that has set the direction
flag, e.g. during a memmove() call, to be interrupted by a signal and have its
direction flag unset behind its back, thus messing up the end of the memmove()
call?

-- 
Anthony


Home | Main Index | Thread Index | Old Index