Date: Sun, 27 Aug 2000 21:12:56 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: munin AT munin DOT inka DOT de Message-Id: <9003-Sun27Aug2000211255+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5b CC: djgpp AT delorie DOT com In-reply-to: (message from Bernd Becker on Sun, 27 Aug 2000 18:23:43 +0100) Subject: Re: problems with YAMD (long) References: Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: Bernd Becker > Newsgroups: comp.os.msdos.djgpp > Date: Sun, 27 Aug 2000 18:23:43 +0100 > > a. the gstring class: it crashes with SIGSEGV while strcpy()'ing the > argument of the constructor into the classes char * but the log file > does not contain any entries by YAMD. What entries by YAMD did you expect? The Page Faults you see is all YAMD can do in this case: it causes the program to crash at the point where it tries to write outside the allocated buffer. > Exiting due to signal SIGSEGV > Page fault at eip=00015638, error=0006 Page Fault with error=0006 means the program tried to write to an address which isn't allocated to it. (This is explained in section 12.2 of the DJGPP FAQ list.) > Call frame traceback EIPs: > 0x00015638 _strcpy+24 > 0x00001b10 _create__7gstringPc+96, line 105 of gstring.cxx > 0x00001943 ___7gstringPc+23, line 44 of gstring.cxx Check this call sequence: something here tries to copy more characters than the space in the allocated buffer! You need to find out what buffer(s) are involved in this crash. > b. CFG library's test.c : YAMD finds 3 memory leaks, one in LIBC or so > it seems !! > > WARNING: Memory leak > Address 0x17f000, size 16384 > Allocated by malloc at > BEGIN TRACEBACK > 0x00012e63 __flsbuf+67 This is not a memory leak: the library allocates a 16KB buffer for disk I/O the first time you use buffered stdio functions. This buffer is not deallocated until the program exits. This is normal (16KB is the default size of the transfer buffer used for communications with real-mode DOS/BIOS services). > Shutting down Allegro > Exiting due to signal SIGSEGV > Page fault at eip=00056e10, error=0004 error=0004 means the program tried to read from an address that is outside allocated limits. I'd say, forget the second crash for a while and concentrate on the first one, it looks like a real bug. When you solve the first problem, rerun the program and see if there's more.