develooper Front page | perl.perl5.porters | Postings from December 2000

Re: [ID 20001214.011] Unreachable value in a search list logical name

Thread Previous | Thread Next
From:
Peter Prymmer
Date:
December 14, 2000 14:23
Subject:
Re: [ID 20001214.011] Unreachable value in a search list logical name
Message ID:
Pine.OSF.4.10.10012141415480.57557-100000@aspara.forte.com


On Thu, 14 Dec 2000, Craig A. Berry wrote:

> It doesn't.  This turns out to be a bona fide bug in Perl on VMS.  We
> are using LNM$_MAX_INDEX as if it were the largest allowable index
> value, but instead it is an item code which tells sys$trnlnm "Give me
> the value of the highest current index," or, in other words, give me
> the index of the last one in the list if it is a search list logical.
> For more details see the OpenVMS System Services Reference Manual
> entry for $TRNLNM located here:
> 
> <http://www.openvms.compaq.com:8000/72final/4527/4527pro_094.html#index_x_1128>
> 
> You'll also find there that the valid index values are 0 through 127.
> It's possible all we'll need is what follows, though my build
> directory is in a bit of disarray at the moment so I haven't tested
> it yet.

Heh "bug in DECC indeed :-)"

> 
> --- vms/vms.c;-0        Fri Dec  8 14:28:19 2000
> +++ vms/vms.c   Thu Dec 14 15:06:44 2000
> @@ -152,7 +152,7 @@
>       }
>   #endif
> 
> -    if (!lnm || !eqv || idx > LNM$_MAX_INDEX) {
> +    if (!lnm || !eqv || idx > 127) {
>         set_errno(EINVAL); set_vaxc_errno(SS$_BADPARAM); return 0;
>       }
>       for (cp1 = (char *)lnm, cp2 = uplnm; *cp1; cp1++, cp2++) {

OK I've had a chance to test it against a patched @8102 kit (we need to
modify vms specific Makefile.PL files and IO.xs - I'll send in a separate
message).  But with your patch Craig I do obtain this result:

 $ Define STORY  once,upon,a,time,there,was,a,little,girl,with
 $ perl -e "for ($i = 0; $i <= 9; $i++) { print $ENV{'story;'.$i},' '}"
 ONCE UPON A TIME THERE WAS A LITTLE GIRL WITH
 $ perl -v
 
 This is perl, v5.7.0 built for VMS_AXP
 (with 1 registered patch, see perl -V for more detail)

The `mms test` result returned these glitches:

 [.lib]filehand..........FAILED on test 4

 [.lib]vmsish............FAILED on test 14

 Failed 2/265 tests, 94.72% okay.
 u=34.42  s=0  cu=0  cs=0  scripts=253  tests=13349

But the filehand.t failure is an ungetc() problem??? and the vmsish
was a bad SYS$TIMEZONE_DIFFERENTIAL (yet another: why don't we have
daylight savings automated around here? :-) BTW it passes with:

 $ sho log sys$timezone_differential
   "SYS$TIMEZONE_DIFFERENTIAL" = "-28800" (LNM$SYSTEM_TABLE)

At any rate it looks like your patch is just the ticket (modulo any 
/* comments on $TRNLNM */ you might want to add to appease Jarkko :-)

Thanks.

Peter Prymmer



Thread Previous | Thread Next


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