Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!ncar!gatech!bloom-beacon!eru!hagbard!sunic!kuling!jand From: jand@kuling.UUCP (Jan Dj{rv) Newsgroups: comp.lang.perl Subject: Memory fault on HP-UX and a patch Message-ID: <1793@kuling.UUCP> Date: 13 Nov 90 21:54:41 GMT Reply-To: jand@kuling.UUCP (Jan Dj{rv) Organization: Dept. of Computer Systems, Uppsala University, Sweden Lines: 42 Hi all. I get a memory fault with perl PL 40 on a HP 9000/835 when I run Larrys (now very old version of?) metaconfig. It's a normal substitution which causes the core dump. In the perl code it's a call to free() which causes the fault. I can't isolate the error on a smaller scale so I guess some memory corruption is involved. I did compile perl with -lmalloc (which is said to be better that the malloc in libc.a) but it didn't help. This didn't happen in previous patchlevels of perl and it doesn't happen on HP 9000 series 300 so perl is probably innocent. Compiling with perls malloc solves the problem. I therefore recommend all HP users to compile with perl:s malloc. However, since HP 9000/800 (HP Precision Architecture) alignes (sp?) double on a eight byte boundary, malloc.c needs a little patch: *** malloc.c.Distr Tue Nov 13 15:48:08 1990 --- malloc.c Tue Nov 13 15:48:24 1990 *************** *** 56,62 **** */ union overhead { union overhead *ov_next; /* when free */ ! #if defined(mips) || defined(sparc) || defined(luna88k) double strut; /* alignment problems */ #endif struct { --- 56,62 ---- */ union overhead { union overhead *ov_next; /* when free */ ! #if defined(mips) || defined(sparc) || defined(luna88k) || defined(hp9000s800) double strut; /* alignment problems */ #endif struct { Jan D.