
I have analysed the core dump files many times using gdb but the failure occures at random places and I found nothing obvious. The only strange thing is that it appears that the application bombs once it ties to allocate morte than 8MB of RAM from the heap.
The 8MB figure looks familiar. It is the default size that many Unices allocate to the program's stack. Could you be overwriting the program stack? Allocating too many local variables can cause this - normally only achieved by recursive entry of a single routine since 8MB is usually a huge stack. Admittedly I'm stabbing in the dark here! With crashes at random places I'm not so certain this is likely to be the explanation.
There is one more major difference between the HP-UX and the other environments: the HP9000 is a multi CPU machine, while both my Linux and WinXP Pro boxes a are single CPU machines. For this reason, concurrency issues (thread synchronisation) is another area I'd like to focus on when chasing this bug.
And this is also where you step out of my experience too. I have run my compiled programs on multiprocessor Alphas and also Linices, but they are really only single process programs. I have never had to use threads and have used fork rarely so don't have much experience in debugging such programs. The techniques I described in my last post are what I have found very useful in my own programming. Michael.