Date: Mon, 3 May 1999 12:09:33 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: DJ Delorie , djgpp-workers AT delorie DOT com, sandmann AT clio DOT rice DOT edu, Andris Pavenis Subject: Re: __dpmi_int causes trouble in signals In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 3 May 1999, I wrote: > cmpw %cs:___djgpp_ds_alias,32(%ebp) <<<< new line > je stack_ok <<<< new line Sorry, this won't even assemble (blush). Also, leaving the DS alias in SS is a bad idea, since the alias selector is freed by our exit code, so if the signal handler exits, it will bomb right after freeing the alias. Here's a solution that seems to work. It forces the normal DS selector into SS if it finds SS holding the DS alias. Comments? *** src/libc/go32/exceptn.S~ Mon May 3 11:04:26 1999 --- src/libc/go32exceptn.S Mon May 3 11:38:28 1999 *************** *** 127,132 **** --- 127,138 ---- je 1f cmpw %ax,32(%ebp) je stack_ok + .byte 0x2e /* CS: */ + movw ___djgpp_ds_alias,%di + cmpw %di,32(%ebp) + jne 1f + movw %ax,32(%ebp) + jmp stack_ok 1: movl $exception_stack+8000, 28(%ebp) movw %ax, 32(%ebp) stack_ok: