delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/01/31/14:43:35

From: Nigel Stephens <nigel AT algor DOT co DOT uk>
Date: Tue, 31 Jan 1995 13:47:20 GMT
To: Charles Sandmann <sandmann AT new-orleans DOT NeoSoft DOT com>
Cc: davis AT amy DOT tch DOT harvard DOT edu, dj AT ctron DOT com, djgpp AT sun DOT soe DOT clarkson DOT edu,
eliz AT is DOT elta DOT co DOT il (Eli Zaretskii), buers AT dg1 DOT chemie DOT uni-konstanz DOT de
References: <199501310321 DOT VAA11897 AT new-orleans DOT NeoSoft DOT com>
<9501301306 DOT AA05854 AT is DOT elta DOT co DOT il>

Charles Sandmann (sandmann AT new-orleans DOT NeoSoft DOT com) writes:
 > The source to access.c is in dj112m3.zip - note that the flags are
 > not being set to zero in the register structure before the call.
 > I think this is the problem.  Both DPMI and VCPI are obviously 
 > protecting you by clearing some bit that should not be set.  Sorry,
 > I am too busy to test this theory, but it looks like that is the
 > cause.

I just discovered this in my mailbox from October last year; looks
like it got lost!

------- Start of message section of RFC 934 digest (1 message) -------
Return-Path: <buers AT DG1 DOT CHEMIE DOT UNI-KONSTANZ DOT DE>
Message-Id: <9410231843 DOT AA09505 AT DG1 DOT CHEMIE DOT UNI-KONSTANZ DOT DE>
From: buers AT dg1 DOT chemie DOT uni-konstanz DOT de (Dieter Buerssner)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Bug in access, with fix
Date: Sun, 23 Oct 94 19:43:54 +0100


access() will fail sometimes.

As a previous discussion showed, the flags in the register structure
must be set, before calling go32_dpmi_simulate_int.
The trivial patch does this. Of course it might be even better to use memset
to clear the whole register structure, but, after only clearing the flags,
the bug never showed again.


Dieter


*** access.oc2	Mon Sep 12 00:26:16 1994
- --- access.c	Sun Oct 16 05:07:32 1994
***************
*** 21,27 ****
  int access(const char *fn, int flags)
  {
    _go32_dpmi_registers r;
!   r.x.ss = r.x.sp = 0;
    r.h.ah = 0x43;
    r.h.al = 0;
    r.x.dx = _go32_info_block.linear_address_of_transfer_buffer & 0xf;
- --- 21,27 ----
  int access(const char *fn, int flags)
  {
    _go32_dpmi_registers r;
!   r.x.flags = r.x.ss = r.x.sp = 0;
    r.h.ah = 0x43;
    r.h.al = 0;
    r.x.dx = _go32_info_block.linear_address_of_transfer_buffer & 0xf;




------- End of message section of RFC 934 digest -------

- Raw text -


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