Alex Yukhimets <[EMAIL PROTECTED]> 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.: % ./xosview zsh: segmentation fault ./xosview % MALLOC_CHECK_=0 ./xosview % MALLOC_CHECK_=1 ./xosview malloc: using debugging hooks free(): invalid pointer 805af60! free(): invalid pointer 805af70! free(): invalid pointer 805af80! free(): invalid pointer 805af90! free(): invalid pointer 805b098! free(): invalid pointer 805b0b0! free(): invalid pointer 805b0c8! free(): invalid pointer 805b0e0! free(): invalid pointer 805b1e8! free(): invalid pointer 805b200! free(): invalid pointer 805b218! free(): invalid pointer 805b230! free(): invalid pointer 805b328! free(): invalid pointer 805b338! free(): invalid pointer 805b348! free(): invalid pointer 805b358! free(): invalid pointer 805b460! free(): invalid pointer 805b478! free(): invalid pointer 805b490! free(): invalid pointer 805b4a8! % MALLOC_CHECK_=2 ./xosview zsh: abort MALLOC_CHECK_=2 ./xosview -- Carey Evans <*> http://home.clear.net.nz/pages/c.evans/ kernel: Warning: possible SYN flooding. Sending cookies. kernel: validated probe(100007f, 100007f, 11557, 5010, -1645409555) -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .