Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

eval_12.pir failure on HP-UX

3 views
Skip to first unread message

Nick Glencross

unread,
Oct 16, 2005, 3:02:44 PM10/16/05
to Perl 6 Internals
eval_12.pir is one of the few tests which are failing on HP-UX. It
writes some bytecode to a file and executes it, and then does it again
with a slight variation.

Running the test gives:

# ./parrot t/pmc/eval_12.pir
hello from foo_1
Parrot VM: Can't mmap file /var/tmp/build/src/parrot_hpux/./temp.pbc,
code 12.
current instr.: 'main' pc 47 (t/pmc/eval_12.pir:24)
hello from foo_2
#

The cause of the problem is calling load_bytecode twice on the same
filename in the script. If the two filenames are different, then the
problem goes away. The code 12 in the error message is ENOMEM.

[Internally when the mmap fails, it falls back to doing a straight load
which is why the 'hello from foo_2' does appear]

The problem goes away by changing the MAP_SHARED in src/embed.c to
MAP_PRIVATE (at about line 1009).

Does anyone have a problem with this change, or should I just make it
HP-UX specific? I imagine that it could use more system-wide VM on some
OSes.

Cheers,

Nick

0 new messages