[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference clt::dec_pascal_bugs

Title:DEC Pascal Bug Reports
Notice:New kit announcement in TURRIS::Pascal conference
Moderator:TLE::GARRISON
Created:Wed Sep 09 1992
Last Modified:Fri May 30 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:838
Total number of notes:3659

832.0. "Small buglet in RTL when opening with $V_NAM" by TLE::REAGAN (All of this chaos makes perfect sense) Thu Mar 13 1997 19:00

From Ned Freed @ Innosoft,

I've been putting in code to try and speed up some of our file operations by
opening files on VMS via the file ids rather than by name. Doing this has
turned up something I'd call a wee bug in the Pascal RTL.

I'm using a user_open to do this, of course, where I set FAB$V_NAM to true,
punch in the various NAM fields it needs (DVI, DID, FID), and then do
the $OPEN and $CONNECT and then return. But then the Pascal RTL decides
it wants a copy of the file name from the NAM block RSA/RSL fields. In the
case of an open by file id these fields don't get filled in (for obvious
reasons). The Pascal RTL then attempts to allocate a zero length block to
put the zero length name in. Result: Bad block size error from LIB$GET_VM,
which you then turn into your PAS$_INSVIRMEM error.

I've worked around this by simply copying the file name into the NAM RSA/RSL
fields (since I know it), which I find to be a local variable in PAS$OPEN2.
And this seems to work fine. But you probably want to take the possibility of
a zero length file name into account at some point.

Like I say, the priority of this one could not be lower. The only part fo me
that was at all hard was tracking it down using VMS 7.1 listings on a VMS 6.1
machine (seems to have been some changes in there...). Once found the
workaround was obvious, and may in fact be a good idea to keep in any case.

                                Ned

T.RTitleUserPersonal
Name
DateLines