thanvir@gmail.com (Thanvir) writes:
> The crash happens in various places, some time it happens when we
> allocate memory for an object using new system call.
Any crash in malloc() indicates (with 99.9% probability) heap
corruption, e.g. double-free, free unallocated, etc.
The crash on HP-UX which you described in comp.sys.hp.hpux likely
has the same root cause.
> we checked the memory allocation in our program, it is fine
No, it isn't.
> (it runs in Linux, Solaris, SCO and Windows),
You got lucky. It is not at all uncommon to uncover heap corruption
bugs when porting from one platform to another.
Another thing to note is that your 2 crashing platforms are both
64-bit. Does your app run fine on Solaris and Linux in 64-bit mode?
If not, you may have 64-bit bug (such as storing a pointer into
an int).
> we also used GNU Malloc library
Did you run your app with MALLOC_CHECK_=2 (on Linux)?
> Please let me know if anyone have a clue how to solve this problem.
There are free and commercial tools that can help you locate the
problem: ElectricFence, dmalloc, ccmalloc, Valgrind (Linux/x86 only),
Purify, Insure++.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.