KS wrote:
I have taken up C++ after about 4 years with Java and I am facing a
problem with the code that I have written. The problem is that the
execution unexpectedly terminates without any error or dump. Are there
any commonly known bugs that can cause this problem?
There are many ways to write buggy code. There's no way to tell which
bug you have implemented.
I would really appreciate it if you would take a look at the source. I
have uploaded the complete source file at:
http://www.grex.org/~kpp/gamultiknapsack.cpp
(You will need the orlib1.txt in the same directory to execute this
file).
ICK. I didn't really look at the code to close, but this is (some of)
what goes to STDERR when I run the executable built from your source.
a.out(3939) malloc: *** Deallocation of a pointer not malloced:
0x500520; This could be a double free(), or free() called with the
middle of an allocated block; Try setting environment variable
MallocHelp to see tools to help debug
a.out(3939) malloc: *** error for object 0x500570: double free
a.out(3939) malloc: *** set a breakpoint in szone_error to debug
a.out(3939) malloc: *** Deallocation of a pointer not malloced:
0x500520; This could be a double free(), or free() called with the
middle of an allocated block; Try setting environment variable
MallocHelp to see tools to help debug
a.out(3939) malloc: *** error for object 0x500570: double free
a.out(3939) malloc: *** set a breakpoint in szone_error to debug
a.out(3939) malloc: *** Deallocation of a pointer not malloced:
0x500520; This could be a double free(), or free() called with the
middle of an allocated block; Try setting environment variable
MallocHelp to see tools to help debug
a.out(3939) malloc: *** error for object 0x500570: double free
a.out(3939) malloc: *** set a breakpoint in szone_error to debug
a.out(3939) malloc: *** Deallocation of a pointer not malloced:
0x500520; This could be a double free(), or free() called with the
middle of an allocated block; Try setting environment variable
MallocHelp to see tools to help debug
a.out(3939) malloc: *** error for object 0x500570: double free
a.out(3939) malloc: *** set a breakpoint in szone_error to debug
a.out(3939) malloc: *** Deallocation of a pointer not malloced:
0x500520; This could be a double free(), or free() called with the
middle of an allocated block; Try setting environment variable
MallocHelp to see tools to help debug