Mail Archives: djgpp-workers/2002/06/10/13:49:01
> > The following patch to crt0.S seems to have fixed the problem:
>
> Could you please tell what problem is that? I understand it's related to
> Emacs session being shut down by NTVDM, but IIRC we found and discussed
> several specific issues related to that. I'd like to understand which
> aspects should be solved by this patch.
The problem sequence:
1) Enable unixy sbrk; enable any hardware interrupt to 32-bit code
2) call sbrk() ; it moves the DPMI memory block to a different address.
3) before we can change CS selector to point to new memory block, a
hardware interrupt happens. The CS for the interrupt points to
invalid memory; NTVDM exits.
The other problems (with ds_alias) still exist but they are minor. ds_alias
is only used by exceptions (or if the user presses CTRL-C, etc). This is
very infrequent (so hitting a few hundred instruction window is even more
rare - I couldn't even make it happen).
However, any hardware interrupt (like a key upstroke break interrupt) are
very common. Normally we look at it, and ignore it, but it requires the
Protected mode CS to be there. We disable interrupts (or try) so this
won't happen til we are finished moving. However Win2K was ignoring the
disable request and sending the interrupt in the middle of the move
(sigh).
- Raw text -