[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | VAX and Alpha VMS |
Notice: | This is a new VMSnotes, please read note 2.1 |
Moderator: | VAXAXP::BERNARDO |
|
Created: | Wed Jan 22 1997 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 703 |
Total number of notes: | 3722 |
537.0. "SDL incorrect for ESDF$T_NAME and ESDF$S_NAME?" by GIDDAY::GILLINGS (a crucible of informative mistakes) Mon Apr 28 1997 03:21
A customer is writing PASCAL programs which produce Alpha object code.
He has found that long symbol names cause array bounds errors when accessing
the ESDF$T_NAME field. According to the OpenVMS Linker Utility Manual:
"B.3.2.1 GSD Subrecord for a Global Symbol Definition
(EGSD$C_SYM with EGSY$V_DEF Set)
...
SYMBOL NAME Name: ESDF$T_NAME
Length: Variable, 1 to 64 bytes
This field contains the symbol name in ASCII format."
However, the Pascal, MACRO and Bliss definitions are for 31 characters
only:
ESDF$L_PSINDX : UNSIGNED; (*Owning psect number *)
ESDF$B_NAMLNG : $UBYTE; (*Length of name *)
ESDF$T_NAME : PACKED ARRAY [1..31] OF CHAR; (*Symbol name *)
$EQU ESDF$B_NAMLNG 32
$EQU ESDF$S_NAME 31
$EQU ESDF$T_NAME 33
macro ESDF$B_NAMLNG = 32,0,8,0 %; ! Length of name
macro ESDF$T_NAME = 33,0,0,0 %;
literal ESDF$S_NAME = 31; ! Symbol name
(I suspect other languages have a similar definition but haven't gone
searching).
Now, given that this subtype is overlayed with other subtypes which are
plenty large enough to accommodate a 64 byte field, MACRO or Bliss programs
might no be concerned with the apparently incorrect definition of
ESDF$S_NAME, but in Pascal, processing a symbol longer than 31 characters
causes array bounds violations.
I'm not sure where the customer is finding these long symbols, but they're
causing trouble. Redefining the field as PACKED ARRAY [1..64] works as
expected.
It seems likely that this is a bug in the SDL definition, but I can't
figure out how to disassemble STARLETSD.TLB to prove it.
Can anyone confirm that this should be QARed? OpenVMS/Alpha V6.1 and V7.1
John Gillings, Sydney CSC
T.R | Title | User | Personal Name | Date | Lines |
---|
537.1 | | AUSS::GARSON | DECcharity Program Office | Mon Apr 28 1997 04:54 | 6 |
| re .0
C and FORTRAN both define the symbol name as having length 31. (Alpha
V6.2) I suggest you QAR it.
(This could reflect a VAX limit that just hasn't been updated.?)
|