Current-Users archive

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

Re: SIGIO, xemacs random crashes on SMP system

On Wed, Sep 17, 2008 at 08:58:59PM +0200, Anthony Mallet wrote:
> On Wednesday, at 12:07, Eric Haszlakiewicz wrote:
> | The program looks about right to me.  It crashes on my machine too, which is
> | running -current as of August 30th.
> | 
> | I tried it on Linux (redhat ES 4), and it seems to work fine there.
> Thanks for the test. I have more info, using gdb. I could manage to set a
> breakpoint in the signal handler, just when it is called while the process is
> doing a memmove in the descending direction (memmove.S:114).
> Clearly, the direction flag is not set while the cpu is doing the 'rep movsl',
> just after the 'std'. Then, of course, the program fails to pass the test and
> asserts(). 
> There's something wrong somewhere, isn't it?

I remember something quite recently about the saving and restoring of the
direction flag and signal handlers.  Can't quite remember what it was though.

It is tempting to modify memmove to always use forward copies.
It should be changed to use a simple forwards copy whenever the copy
doesn't actually overlap, copying backwards is a lot slower.


David Laight:

Home | Main Index | Thread Index | Old Index