develooper Front page | perl.perl5.porters | Postings from October 2001

perl@12605 on VMS

From:
Craig A. Berry
Date:
October 25, 2001 22:13
Subject:
perl@12605 on VMS
Message ID:
a05101005b7fe9750d10d@[172.16.52.1]
The dynaloading changes seem to work fine.  Using Compaq C V6.4-005 
on OpenVMS Alpha V7.3, -des configuration, all tests pass except for 
the last two in ext/Time/HiRes/HiRes.t.

The first one of those looks like:

eval { alarm(-3) };

Since this function is not imported or fully specified, it seems to 
me it is probably running Perl_pp_alarm rather than 
Time::HiRes::alarm.  Did I miss something?  In any case, it's bad 
news when given a negative number:

$ perl -e "alarm(-3);"
%SYSTEM-F-ASTFLT, AST fault, SP=00000000, param=00000000, PC=0000000000000000, PS=00000000, target PC=FFFFFFFF80A50B44, PS=0000001B

Note that SP is the stack pointer, so basically when the timer fires 
there's no one home to notify.  The docs for this error say:

              The system attempted to deliver an asynchronous system trap
              (AST) to an image, but the user stack pointer is either
              invalid or does not have sufficient space for the AST call
              frame.

I couldn't reproduce this in C so I wonder if there is something 
about Perl's stack abuse that disagrees with the way alarm() is 
implemented in the C RTL.

The other test that fails looks like:

eval { ualarm(-4) };

This function has been imported, so it's doing the equivalent of:

$ perl -e "use Time::HiRes; print Time::HiRes::ualarm(-4);"
Your vendor has not defined Time::HiRes macro ualarm, used at -e line 1.
%RMS-E-FNF, file not found

I haven't dug around yet to find out what this means.

Perhaps relevant or perhaps not is the fact that we set HAS_UALARM to 
undef even though we do have the function (at least on recent VMS 
versions).  This needs to be updated in configure.com.  In the 
absence of ualarm, though, Time::HiRes implements its own version 
using setitimer, so it should still work.
-- 
________________________________________
Craig A. Berry
mailto:craigberry@mac.com

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About