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