[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DEC C Problem Reporting Forum |
Notice: | Report DEC C++ problems in TURRIS::C_PLUS_PLUS |
Moderator: | CXXC::REPETE TCHEON |
|
Created: | Fri Nov 13 1992 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 1299 |
Total number of notes: | 6249 |
1299.0. "C code linked under V6.1 fails under V6.2" by ZUR01::LENHERR (SW-Support Switzerland.) Fri Jun 06 1997 05:20
Hello,
One of our customers is currently upgrading from OpenVMS VAX v6.1 to v6.2 and
during testing a problem has been experienced with an application. The
application was linked under v6.1 and when the executables produced are copied
to a VMS v6.2 system, they crash.
We believe we've traced the problem to a failure in the ANSI C isspace()
function and VAXC2DECC
Eexample code (test.c):
#include <ctype.h>
#include <stdio.h>
main()
{
printf("%d\n",isspace(' '));
}
We compiled this code on an OpenVMS VAX v6.1 system using:
$ CC/VAXC test
Because the application uses both DECC and VAXC, we linked using the following
one line link options file (TEST.OPT):
SYS$SHARE:VAXC2DECC.EXE/SHARE
i.e. LINK TEST,TEST/OPT
The resulting TEST.EXE produces different results under OpenVMS VAX v6.1 and
v6.2. On v6.1, the correct value is displayed ( > 0 ). On a v6.2 system, zero
is displayed which is obviously incorrect!
What's going on? Are we missing something obvious here?
-----------------------
TEST.MAP
-----------------------
5-JUN-1997 14:0
2 VAX-11 Linker V05-13 Page 1
+------------------------+
! Object Module Synopsis !
+------------------------+
Module Name Ident Bytes File
Creation Date Creator
----------- ----- ----- -----
------------- -------
VAXC2DECC V6.0-002 0 SYS$COMMON:[SYSLIB]VAXC2DECC.EXE;1 1
6-MAR-1994 18:19 VAX-11 Linker V05-13
DECC$SHR V06.0-64 0 SYS$COMMON:[SYSLIB]DECC$SHR.EXE;1 1
6-MAR-1994 18:18 VAX-11 Linker V05-13
UVMTHRTL VMS V6-002 0 SYS$COMMON:[SYSLIB]UVMTHRTL.EXE;4
9-MAR-1994 01:32 VAX-11 Linker V05-13
LIBRTL V06-001 0 SYS$COMMON:[SYSLIB]LIBRTL.EXE;5 2
7-JUL-1996 08:26 VAX-11 Linker V05-13
CMA$TIS_SHR CMA V2.11-152 0 SYS$COMMON:[SYSLIB]CMA$TIS_SHR.EXE;1
9-MAR-1994 01:31 VAX-11 Linker V05-13
TEST V1.0 60 USER_GTWS_DISK:[GZHCOC]TEST.OBJ;10
5-JUN-1997 14:02 VAX C V3.2-044
+--------------------------+
! Program Section Synopsis !
+--------------------------+
Psect Name Module Name Base End Length Align
Attributes
---------- ----------- ---- --- ------ -----
----------
$CHAR_STRING_CONSTANTS 00000200 00000203 00000004 ( 4.) LONG 2
PIC,USR,CON,REL,LCL,NOSHR,NOEXE, RD, WRT,NOVEC
TEST 00000200 00000203 00000004 ( 4.) LONG 2
$CODE 00000400 0000042B 0000002C ( 44.) LONG 2
PIC,USR,CON,REL,LCL, SHR, EXE, RD,NOWRT,NOVEC
TEST 00000400 0000042B 0000002C ( 44.) LONG 2
C$$TRNS_VALUES 00000800 00000973 00000174 ( 372.) LONG 2
PIC,USR,OVR,REL,GBL, SHR,NOEXE, RD,NOWRT,NOVEC
_CTYPE_ 00000974 000009F3 00000080 ( 128.) LONG 2
PIC,USR,OVR,REL,GBL, SHR,NOEXE, RD,NOWRT,NOVEC
C$$EX_HANDLER 00000A00 00000A13 00000014 ( 20.) BYTE 0
PIC,USR,OVR,REL,GBL,NOSHR,NOEXE, RD, WRT,NOVEC
COLS 00000A14 00000A17 00000004 ( 4.) BYTE 0
PIC,USR,OVR,REL,GBL,NOSHR,NOEXE, RD, WRT,NOVEC
CURSCR 00000A18 00000A1B 00000004 ( 4.) BYTE 0
PIC,USR,OVR,REL,GBL,NOSHR,NOEXE, RD, WRT,NOVEC
ENVIRON 00000A1C 00000A1F 00000004 ( 4.) BYTE 0
PIC,USR,OVR,REL,GBL,NOSHR,NOEXE, RD, WRT,NOVEC
ERRNO 00000A20 00000A23 00000004 ( 4.) LONG 2
PIC,USR,OVR,REL,GBL,NOSHR,NOEXE, RD, WRT,NOVEC
LINES 00000A24 00000A27 00000004 ( 4.) BYTE 0
PIC,USR,OVR,REL,GBL,NOSHR,NOEXE, RD, WRT,NOVEC
RANDX 00000A28 00000A2B 00000004 ( 4.) BYTE 0
PIC,USR,OVR,REL,GBL,NOSHR,NOEXE, RD, WRT,NOVEC
STDERR 00000A2C 00000A2F 00000004 ( 4.) LONG 2
PIC,USR,OVR,REL,GBL,NOSHR,NOEXE, RD, WRT,NOVEC
TEST 00000A2C 00000A2F 00000004 ( 4.) LONG 2
STDIN 00000A30 00000A33 00000004 ( 4.) LONG 2
PIC,USR,OVR,REL,GBL,NOSHR,NOEXE, RD, WRT,NOVEC
TEST 00000A30 00000A33 00000004 ( 4.) LONG 2
STDKB 00000A34 00000A37 00000004 ( 4.) BYTE 0
PIC,USR,OVR,REL,GBL,NOSHR,NOEXE, RD, WRT,NOVEC
STDOUT 00000A38 00000A3B 00000004 ( 4.) LONG 2
PIC,USR,OVR,REL,GBL,NOSHR,NOEXE, RD, WRT,NOVEC
TEST 00000A38 00000A3B 00000004 ( 4.) LONG 2
STDPB 00000A3C 00000A3F 00000004 ( 4.) BYTE 0
PIC,USR,OVR,REL,GBL,NOSHR,NOEXE, RD, WRT,NOVEC
STDSCR 00000A40 00000A43 00000004 ( 4.) BYTE 0
PIC,USR,OVR,REL,GBL,NOSHR,NOEXE, RD, WRT,NOVEC
SYS_ERRLIST 00000A44 00000AD3 00000090 ( 144.) LONG 2
PIC,USR,OVR,REL,GBL,NOSHR,NOEXE, RD, WRT,NOVEC
SYS_NERR 00000AD4 00000AD7 00000004 ( 4.) LONG 2
PIC,USR,OVR,REL,GBL,NOSHR,NOEXE, RD, WRT,NOVEC
VAXC$ERRNO 00000AD8 00000ADB 00000004 ( 4.) LONG 2
PIC,USR,OVR,REL,GBL,NOSHR,NOEXE, RD, WRT,NOVEC
+-----------------+
! Symbols By Name !
+-----------------+
Symbol Value Symbol Value Symbol
Value Symbol Value
------ ----- ------ ----- ------
----- ------ -----
C$MAIN 00000648-RX
C$V_CTYPEDEFS 00000000
MAIN 00000400-R
PRINTF 0000064C-RX
USER_GTWS_DISK:[GZHCOC]TEST.EXE;11 5-JUN-1997 14:0
2 VAX-11 Linker V05-13 Page 2
Symbol Value Symbol Value Symbol
Value Symbol Value
------ ----- ------ ----- ------
----- ------ -----
Key for special characters above:
+------------------+
! * - Undefined !
! U - Universal !
! R - Relocatable !
! X - External !
! WK - Weak !
+------------------+
USER_GTWS_DISK:[GZHCOC]TEST.EXE;11 5-JUN-1997 14:0
2 VAX-11 Linker V05-13 Page 3
+----------------+
! Image Synopsis !
+----------------+
Virtual memory allocated: 00000200 000007FF 00000600 (15
36. bytes, 3. pages)
Stack size: 20. pages
Image header virtual block limits: 1. 1. ( 1. bl
ock)
Image binary virtual block limits: 2. 4. ( 3. bl
ocks)
Image name and identification: TEST V1.0
Number of files: 9.
Number of modules: 7.
Number of program sections: 28.
Number of global symbols: 2461.
Number of image sections: 26.
User transfer address: 00000400
Debugger transfer address: 7FFEDF68
Number of address fixups: 1.
Number of code references to shareable images: 2.
Image type: EXECUTABLE.
Map format: DEFAULT in file USER_GTWS_DISK
:[GZHCOC]TEST.MAP;1
Estimated map length: 189. blocks
+---------------------+
! Link Run Statistics !
+---------------------+
Performance Indicators Page Faults CPU Time Elapsed T
ime
---------------------- ----------- -------- ---------
---
Command processing: 122 00:00:00.03 00:00:
00.09
Pass 1: 546 00:00:00.19 00:00:
00.29
Allocation/Relocation: 28 00:00:00.00 00:00:
00.06
Pass 2: 58 00:00:00.05 00:00:
00.22
Map data after object module synopsis: 13 00:00:00.00 00:00:
00.01
Symbol table output: 1 00:00:00.00 00:00:
00.05
Total run values: 768 00:00:00.27 00:00:
00.72
Using a working set limited to 1706 pages and 758 pages of data storage (excludi
ng image)
Total number object records read (both passes): 217
of which 24 were in libraries and 1 were DEBUG data records containing 66 by
tes
50 bytes of DEBUG data were written,starting at VBN 5 with 1 blocks allocated
Number of modules extracted explicitly = 0
with 1 extracted to resolve undefined symbols
1 library searches were for symbols not in the library searched
A total of 0 global symbol table records was written
LINK/MAP TEST,TEST/OPT
********************************************************************************
Thanks for your help,
Rico Lenherr
T.R | Title | User | Personal Name | Date | Lines |
---|
1299.1 | We will investigate | TLE::D_SMITH | Duane Smith -- DEC C RTL | Fri Jun 06 1997 08:43 | 1 |
|
|
1299.2 | | TLE::D_SMITH | Duane Smith -- DEC C RTL | Fri Jun 06 1997 09:00 | 5 |
| I have reproduced the behavior that you are seeing. I'll update this
note when further analysis is complete. This note will now be tracked
in our internal database as problem report number 1753.
Duane
|
1299.3 | | TLE::D_SMITH | Duane Smith -- DEC C RTL | Fri Jun 06 1997 09:37 | 8 |
| Brief update:
The regression appears to be caused by VAXC2DECC.EXE as opposed to the
underlying DECC$SHR.EXE image. Linking and running against all V6.1
images produces "8". Changing only DECC$SHR.EXE to V6.2 still produces
"8". Changing only VAXC2DECC.EXE to V6.2 produces "0".
Duane
|
1299.4 | | TLE::D_SMITH | Duane Smith -- DEC C RTL | Fri Jun 06 1997 10:48 | 19 |
| The problem has been found and is a real problem in the VAXC2DECC.EXE
and VAXCG2DECC.EXE images. When creating the shareable image, an array
just in front of the _CTYPE_ array (used by the is* functions) changed
in size by 12 bytes causing a misalignment when using the _CTYPE_
array.
Corrective action of some sort will be required. If your customer
still has access to the VAXC2DECC.EXE image from V6.1 then that can
be used on the V6.2 system. If your customer does not have this image,
it can be taken from the VAXACRT09_061 ECO kit which is currently
available from TIMA.
You cannot install this ECO kit, but you can extract the VAXC2DECC
images using:
$ BACKUP/LOG/SELECT=VAXC*2DECC.EXE <eco_kit>/SAVE SYS$SHARE:*.*
Duane Smith
|