delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/20/16:57:20

From: pjfarley AT banet DOT net (Peter J. Farley III)
Newsgroups: comp.os.msdos.djgpp
Subject: Are there any memory debuggers other than MSS and YAMD?
Date: Wed, 20 Oct 1999 18:46:27 GMT
Message-ID: <380e090b.11437752@news3.banet.net>
X-Newsreader: Forte Free Agent 1.1/32.230
NNTP-Posting-Host: 129.37.113.101
X-Trace: 20 Oct 1999 18:46:53 GMT, 129.37.113.101
Organization: Global Network Services - Remote Access Mail & News Services
Lines: 58
X-Complaints-To: abuse AT prserv DOT net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello all,

I'm getting a SIGSEGV in malloc (symified trace pasted below),
encountered while testing the latest snapshot of Awka.  I think it's
probably a bug somewhere in Awka, but I need help to track it down.

I'm running DJGPP v2.02, gcc 2.8.1 (10-28-98), libc/libg/libm 11-15-98
in a W95 DOS box, LFN=Y.

Since I kind of doubt there really is a bug in malloc, are there any
DJGPP memory debuggers available other than MSS and YAMD?  I haven't
had much luck with YAMD (and will be sending Nate Eldridge a few lines
on my troubles there), and MSS seems to require more source
manipulation than I wanted to do at this point (though I will if
that's my only alternative).

I have run the test program with gdb, and tracing up the stack frames
seems to show that the malloc parameter at the point of failure is
reasonable, so I'm guessing that memory has been overrun somewhere
prior to the failure, wrecking malloc's control structures someway.
Obviously, a memory debugger would help here.

The test program is (of course) one of the more complicated and long
ones, so a "simple" source is not available.  Plus, if the problem is
in Awka itself (as I suspect), there is the whole Awka library source
available as potential culprits.

TIA for any help or info you can provide.

Symified trace:

Exiting due to signal SIGSEGV
General Protection Fault at eip=00024b90
eax=00000018 ebx=002c0061 ecx=001c6030 edx=00000003 esi=00000019
edi=00000019
ebp=001a1f3c esp=001a1f2c program=G:\SRC\AWKA-0~1.3B-\TEST\XX.EXE
cs: sel=00a7  base=831c8000  limit=001d1fff
ds: sel=00af  base=831c8000  limit=001d1fff
es: sel=00af  base=831c8000  limit=001d1fff
fs: sel=0087  base=000081a0  limit=0000ffff
gs: sel=00bf  base=00000000  limit=0010ffff
ss: sel=00af  base=831c8000  limit=001d1fff
App stack: [001a2000..00122000]  Exceptn stack: [0003e394..0003c454]

Call frame traceback EIPs:
  0x00024b90   _malloc+192
  0x0000affd   _awka_malloc+65, line 136 of array.c
  0x0000f7cf   __awka_split_null+823, line 1489 of array.c
  0x000110f8   _awka_arraysplitstr+1008, line 2055 of array.c
  0x00004000   _awka_setNF+136, line 897 of x.c
  0x00002e70   _MAIN+288, line 44 of x.c
  0x00003eb7   _main+1807, line 160 of x.c
  0x000246da   ___crt1_startup+174


----------------------------------------------------
Peter J. Farley III (pjfarley AT nospam DOT dorsai DOT org OR
                     pjfarley AT nospam DOT banet DOT net)

- Raw text -


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