delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/19/07:55:10

Xref: news2.mv.net comp.os.msdos.djgpp:4002
From: snarfy AT goodnet DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: bugs in cwsdpmi?
Date: 18 May 1996 22:53:59 GMT
Organization: GoodNet
Lines: 72
Message-ID: <4nlke7$aka@news1.goodnet.com>
NNTP-Posting-Host: goodnet.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Here is an interesting 'bug' that I have found in cwsdpmi.  When I compile
the attached file and run it under dos, it blows up giving me a SIGSEGV, but
it works correctly under a windows dos box and in linux dosemu.  Here
is the program:

#include <stdio.h>

typedef struct {
int x;
int y;
} foo;

foo *bar;
void main()
{
     bar->x = 3;
     bar->y = 4;
     printf("x = %d\n", bar->x);
}


As you can see, there isn't much to this program, and I have compiled
programs that are a lot more complex than this with the exact same
system setup with no problems.

My device drivers are himem.sys, smartdrv, doskey, and a mouse
driver (pretty clean, IMHO).  

Here is what mem /c gives me:



Modules using memory below 1 MB:


  Name           Total       =   Conventional   +   Upper Memory
  --------  ----------------   ----------------   ----------------
  MSDOS       29,485   (29K)     29,485   (29K)          0    (0K)
  HIMEM        1,120    (1K)      1,120    (1K)          0    (0K)
  COMMAND      3,744    (4K)      3,744    (4K)          0    (0K)
  SMARTDRV    27,488   (27K)     27,488   (27K)          0    (0K)
  MOUSE       24,352   (24K)     24,352   (24K)          0    (0K)
  DOSKEY       4,144    (4K)      4,144    (4K)          0    (0K)
  Free       563,648  (550K)    563,648  (550K)          0    (0K)

Memory Summary:

  Type of Memory       Total   =    Used    +    Free
  ----------------  ----------   ----------   ----------
  Conventional         654,336       90,688      563,648
  Upper                      0            0            0
  Reserved                   0            0            0
  Extended (XMS)    11,534,336    1,114,112   10,420,224
  ----------------  ----------   ----------   ----------
  Total memory      12,188,672    1,204,800   10,983,872

  Total under 1 MB     654,336       90,688      563,648

  Largest executable program size        563,440   (550K)
  Largest free upper memory block              0     (0K)
  MS-DOS is resident in the high memory area.


I've also noticed that if I run cwsdpmi from the command line, it loads
itself into memory, but if  run it again, it loads itself into memory again!
I'm using cwsdpmi.exe version 0.90.



Josh
snarfy AT goodnet DOT com

- Raw text -


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