delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/11/07:41:46

From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: sigsegv on delete []
Date: 11 Jan 2000 09:46:11 GMT
Organization: Ericsson Erisoft AB, Sweden
Lines: 31
Message-ID: <85eu53$6av$1@antares.lu.erisoft.se>
References: <85ehsn$p0p AT chronicle DOT concentric DOT net>
NNTP-Posting-Host: spica-144.lu.erisoft.se
X-Newsreader: TIN [version 1.2 PL2]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Chad Rabbitt (chad AT rabbitt DOT com) wrote:
: i am wondering if anyone might have any ideas on a sigsegv that occurs on a
: delete []?  after looking around, it seems i either overran the array at
: some point and then when it gets deleted the problem shows up, or i delete
: the same array more than once.  unfortunately, my co-worker and i can not
: find either of these problems in my code.  i also used gdb and saw no data
: being modified before or after the array, except for the 'in-use' bit by the
: memory manager.  other notes, the delete [] statement is located in a class
: destructor with three other delete [] statement before it.  the destructor
: works correctly at least one time, usually more than 3 times, depending on
: the computer i run the program on.  also, if i remove the delete statement
: altogether, the program sigsegv's upon exiting the destructor, but before
: returning to the calling statement.  i don't have the traceback in front of
: me, but it generally goes:

:    0x.....  _free+somenumber
:    0x.....  ___builtin_vec_delete+somenumber, line 0 of new2.cc
:    0x.....  _$_9destructorname+somenumber, line 50 of classfile.cpp
:    etc...

: curious if anyone might have some ideas.  i've also tried taking all the
: code that accesses the array out, and i still get a sigsegv?  thanks,

Sounds like you need a malloc-free tracer-debugger. Search the mail
archives at <www.deloire.com> for YAMD. There are others as well but I
don't remember their names.


Right,

							MartinS

- Raw text -


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