Re: Segfault in free(), electric-fence for C++ ?
> Alex Yukhimets <aqy6633@acf5.nyu.edu> writes:
>
> > I have some strange problem with my C++ code: I get a segmentation fault
> > in destructor's delete[] operator. GDB says it happend in free().
> > What could be the cause of that? The only place I touch the pointer
> > I pass to delete[] is in the constructor while allocating memory with new.
>
> I got this while trying to get xosview to compile and run cleanly. It
> was calling the destructor for particular objects twice.
>
> Try running it with different values of the environment variable
> MALLOC_CHECK_, i.e.:
>
Thanks a lot for everybody.
After linking with electric-fence, I finaly nailed the place I write off
the array boundary. After fixing that, I have no more segfaults in
destructor.
Thanks again. You literally saved my day.
Alex Y.
--
_
_( )_
( (o___ +-------------------------------------------+
| _ 7 | Alexander Yukhimets |
\ (") | http://pages.nyu.edu/~aqy6633/ |
/ \ \ +-------------------------------------------+
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: