wwm@pmsmam.uucp (Bill Meahan) (04/26/91)
I'm trying to bring up perl r4pl3 on a 9000/825 under HP/UX 2.1 here at work. (PLEASE don't ask why we're still on 2.1 instead of 7.0 - suffice to say there are many non-technical reasons). Everything compiles happily with +O1 and -Nw500 flags and every test EXCEPT dbm passes without a hitch. The dbm test gets through parts 0..7 then, when it gets to the following statement, dumps core after giving an error message: "No memory" -------------------included code fragment--------------------- if ($#keys == 31) {print "ok 7\n";} else {print "not ok 7\n";} ----------------------------does the above, blows up on the following:---- $h{'foo'} = ''; $h{''} = 'bar'; --------------------------end fragment------------------------- I did NOT use Larry's malloc. Perl 3.044 runs THIS dbm.t without problem. Any ideas? -- Bill Meahan |Product Design & Testing Section Production Test Engineer |Starter Motor Engineering wwm@pmsmam | +1 313 484 9320
rmccask@seas.gwu.edu (Randy McCaskill) (04/26/91)
In article <1991Apr26.114136.11077@pmsmam.uucp> wwm@pmsmam.uucp (Bill Meahan) writes: >I'm trying to bring up perl r4pl3 on a 9000/825 under HP/UX 2.1 here at work. >(PLEASE don't ask why we're still on 2.1 instead of 7.0 - suffice to say >there are many non-technical reasons). > >The dbm test gets through parts 0..7 then, when it gets to the following >statement, dumps core after giving an error message: "No memory" > >I did NOT use Larry's malloc. I had the same problem so I compiled it using Larry's malloc. It passed the dbm test this way. It didn't really fix the problem, only avoided it. If anyone knows of a better way, please post it. -------- Randy McCaskill Computer Science major rmccask@seas.gwu.edu George Washington University
wwm@pmsmam.uucp (Bill Meahan) (04/27/91)
Problem solved. (Thanks to the gentleman from Milwaukee who called and left a message on my answering machine - sorry I missed your name). It turns out that Configure wants to include -lmalloc alnog with -lndbm among the optional libraries. The two are incompatible. HP supplies two DIFFERENT mallocs - the optional one in libmalloc.a. Solution: either edit out the -lmalloc in the Makefile or use Larry's. Larry's works fine. -- Bill Meahan |Product Design & Testing Section Production Test Engineer |Starter Motor Engineering wwm@pmsmam | +1 313 484 9320
urlichs@smurf.sub.org (Matthias Urlichs) (04/27/91)
In comp.lang.perl, article <3127@sparko.gwu.edu>,
rmccask@seas.gwu.edu (Randy McCaskill) writes:
<
< I had the same problem so I compiled it using Larry's malloc. It
< passed the dbm test this way. It didn't really fix the problem, only
< avoided it. If anyone knows of a better way, please post it.
<
The problem is that some mallocs return NULL when you allocate a zero-byte
memory block. While that seems to be legal behavior, some dbm libraries can't
cope with this.
I don't have a good fix either. (However, the Perl malloc is faster anyway,
at least on my machine.)
--
Matthias Urlichs -- urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de /(o\
Humboldtstrasse 7 - 7500 Karlsruhe 1 - FRG -- +49-721-621127(0700-2330) \o)/
barry@giaea.gi.oz (Computer Centre Manager) (05/01/91)
I just installed perl 4.003 on our HP 825 on HP-UX 7.0 and on the dbm test it echoed "No memory" 3 times then got to "ok", and continued on until "All test successful". This was not using lwall malloc. Does this mean the test is vaild ??? barry@giaea.oz