delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2022/07/31/18:12:36

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;
s=s110527; h=Date:From:Subject:MIME-Version:Message-ID; bh=OFw6A
qm9QwnKncAw//8cRRYnAweP6D0J5+Zu1Tk3maM=; b=Nz1Aaf66rnleFO+HMo8oz
NQe0UZUPtK+roZJXYdAx1mH4nLQPqa2foI0hMERFBCY+iHFH0CSDKYSeXMpm90Hg
eFKlYo9c7jwEQ6xcGqshg4g4yT8CYvI5WRw1uDulH5uH1MnNMNa9dNja9D8p27H4
TT7xz+KEjHYE/q1JZxGvTY=
X-Originating-IP: [183.17.231.166]
Date: Mon, 1 Aug 2022 06:12:26 +0800 (CST)
From: "lostxwind (lostxwind AT 163 DOT com) [via djgpp-workers AT delorie DOT com]" <djgpp-workers AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
Subject: Re:BUGREPORT: ___dpmi_get_raw_mode_switch_addr() modifies SI
register and doesn't save it
X-Priority: 3
X-Mailer: Coremail Webmail Server Version XT5.0.13 build 20220113(9671e152)
Copyright (c) 2002-2022 www.mailtech.cn 163com
In-Reply-To: <3c11b033.75.182562fe32f.Coremail.lostxwind@163.com>
References: <3c11b033 DOT 75 DOT 182562fe32f DOT Coremail DOT lostxwind AT 163 DOT com>
MIME-Version: 1.0
Message-ID: <414f3e66.a1.182565154ec.Coremail.lostxwind@163.com>
X-Coremail-Locale: zh_CN
X-CM-TRANSID:j8GowAAHYgpN_uZi2TYtAA--.43736W :
X-CM-SenderInfo: horv35hzlqvqqrwthudrp/xtbB0RlPnlzICI0HYgACsv
X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU==
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 26VMCX5X032502
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Sorry something went wrong with my email configuration, here's the original text (which was not availed in the mail list in base64 encoding), hope it works this time.

Hi,

I was trying to issue a bug report on delorie official site (https://www.delorie.com/djgpp/bugs/create.cgi) but failed as the database is closed. So I tried to contact you through email.

BUGREPROT:

BACKGROUND:
___dpmi_get_raw_mode_switch_addr() is needed to switch modes for some reason, instead of the __dpmi_simulate_real_mode_* class.
SYMPTOM:
Random crashes involving switch between real(/v86) mode and protected mode. 
REASON:
I found variables or function parameters corrupted after calling ___dpmi_get_raw_mode_switch_addr().
After reading the source code, I believe that the implementation of ___dpmi_get_raw_mode_switch_addr() has missed a single line that saves the ESI register.
src\libc\dpmi\api\d0306.S, line 2-line 4.

code before fix:
#define USE_EBX
#define USE_EDI
#include "dpmidefs.h"

possible fix:
#define USE_EBX
#define USE_EDI
#define USE_ESI
#include "dpmidefs.h"

Current workaround without bugfix:
Write a alternative implementation;
Or wrap the function call with asm that pushl/popl %esi.

Thanks,
crazii


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019