www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/04/11/14:47:32

From: Bob <bob AT xnet DOT com>
Subject: Seg Faults on compile
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Mon, 10 Apr 1995 16:01:53 -0500 (CDT)

i've been trying to port a C++ program that used to compile under BCC to into
DJGPP and everything was going fine.  i had all modules compiling and so i did
a final make and suddenly one module that had been working now seg-faults
everytime i try to compile it.  i had commented out about 6 lines because the
linking didn't find a couple of routines [i don't know why the compiler didn't
complain about prototyping, i don't see "clrscr" anywhere defined].  it would
no longer compile the code after i commented these lines.  i uncommented them
and it continued to give the same error.  i tried under windows and just dos.

i am on a 486 w/ 32 megs and a 2 gig drive.  i've got smartdrv configured w/ 8
megs.  emm386.exe is my memory manager.  i'm running dos 6.22 w/ 4dos 5.50 as
my shell.

this is the output: (gcc -c txt2zbf.cpp)
Segmentation violation in pointer 0x00000008 at d8:6727f
eax=00000000 ebx=00000000 ecx=0032be2c edx=0037d15c esi=00383310 edi=00000000
ebp=7ffff604 esp=7ffff5e4 cs=d8 ds=48 es=48 fs=48 gs=38 ss=48 cr2=00000008
Call frame traceback EIPs:
  0x0006727f
  0x00067fe3
  0x00068349
  0x00008c15
  0x00012907
  0x0004a0ff
  0x00071ddb
  0x000768f2

and this is what go32 has to say:
go32 version 1.12.maint3 Copyright (C) 1994 DJ Delorie
Lowest version I can run is 1.08
go32.exe usage: go32 [-d {debugger}] [{program} [{options} . . . ]]
go32.exe build time was Sun Dec 18 16:36:42 1994
VCPI (Expanded) memory available: 22992 Kb
Swap space available: 131040 Kb

every other module compiles fine. this isn't even the biggest or most complex
program.  it wouldn't surprise me if this module would segfault when run cause
i got some questionable pointers [although im pretty sure they're correct] but
that doesn't explain the compile fault.

i did notice some seg violations in other modules when i did have errors in
compiling, but once i resolved thoses issues, they all compile fine.

oh, and how do you use "topline" when it seg violates, the topline goes off the
screen and i can't see a thing.

also is there a set of system call documentation?  similar to the man pages
under unix?  i found some *.doc files that help a little, but there doesn't
seem to be any kind of system call list w/ descriptions and arglists etc.

any help would be GREATLY appreciated.  i am about to tear apart the code and
see if any particular line is causing, but that will not be an easy task and i
fear will leave me empty handed even so.  

thanx,
Robert Hollinger
-- 
Robert Hollinger        <------------------------------------->
4B Chaucer Ln.          > \  www- http://www.xnet.com/~bob  / <  Disclaimer:
Streamwood, IL  60107   >   \/\/     bob AT xnet DOT com      \/\/   <
708-483-9391            <------------------------------------->I don't know her!
"I've grown to hate them."

- Raw text -


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