ECO NUMBER: ALPACRT06_070 ----------- PRODUCT: OpenVMS Alpha Operating System -------- UPDATED PRODUCT: OpenVMS Alpha Operating System 7.0 ---------------- APPRX BLCK SIZE: 15534 ---------------- COVER LETTER 1 KIT NAME: ALPACRT06_070 2 KITS SUPERSEDED BY THIS KIT: ALPACRT05_070 3 KIT DESCRIPTION: 3.1 Version(s) of OpenVMS to which this kit may be applied: OpenVMS Alpha V7.0 3.2 In order to receive the full fixes listed in this kit the following remedial kits also need to be installed: None 3.3 Files patched or replaced: o SYS$TZDIR:[SOURCES]EUROPE. (new timezone source file) o SYS$I18N_LOCALE:IW_IL_ISO8859-8.LOCALE (new locale file) o [SYSLIB]STARLET.OLB (updated with CRTL.OBJ and CRTLMSGDEF.OBJ) o [SYSLIB]DECC$SHR.EXE (new image) 4 PROBLEMS ADDRESSED IN ALPACRT06_070 KIT o The lseek function may position incorrectly when repeatedly called to seek in a file containing fixed length records of odd length. o The interval timer function, setitimer, fails to reset itself when used in a multithreaded application. The result is a single firing of the timer as opposed to repeated firing of the timer at fixed intervals. o A change made in OpenVMS V7.1 and remedial kits to other versions cause calls to the mktemp function using templates of the form "dumpXXXXXX.txt" to no longer substitute the pattern with the process id. While a change is necessary to prohibit substituting the directory portion in a template such as -- COVER LETTER -- Page 2 28 May 1997 "[XX]dumpXXXXXX", the change that was made was overly harsh, forcing all substitution to the end of the pattern. o The strstr function accesses memory beyond the ends of the strings passed. In cases where the next page is not accessable, the result is an access violation. The problem was reported against the ADA compiler, which uses the strstr function in this way. o Although files in general are correctly inherited after a fork/exec function call, files which are opened in any sort of sharing mode are not. o When accessing files in stream mode, closing the file may result in an extra byte being written to the file. While this byte is not seen using the type command, it may be seen when using the dump utility. o A customer reports that the functions atof, strtod, and wcstod incorrectly return HUGE_VAL values when compiling with the IEEE_FLOAT and an ieee_mode qualifier of DENORM_RESULTS. The results returned have been modified to take the compilation mode of the calling program into account. The return value can now be compared against HUGE_VAL. o The following code segment demonstrates a problem in the printf family of functions running on OpenVMS for Alpha. double n; for (n = 9.0e16; n < 11.0e17; n += 1.0e+17) printf ("%20.0f\n", n); The result is that the final zero is missing in the display of all but the first and last line. 5 PROBLEMS ADDRESSED IN ALPACRT05_070 KIT o The stat function now uses a thread specific buffer to store data. Prior to this correction, calling stat from two separate threads would interfere with one another. o An ISV reports that extra characters are seen on occasion when using a subprocess which sends data back to the parent process using a mailbox. o A case was found where the fseek function failed, correctly returned a -1 value, but failed to set errno properly. o One of the arguments to the decc$to_vms function is "allow_wild" which is documented to accept the values zero and one. If wildcards are used in the file specification, they are either rejected or expanded into the resultant file specifications. Passing a value of -1 for the allow_wild -- COVER LETTER -- Page 3 28 May 1997 parameter now returns the file specifications with the wildcards intact, but after having prepared to the point of doing a sys$search. o Unlike Digital UNIX, the fsync(socket_id) call results in an access violation instead of returning an EINVAL status. o A user reports and demonstrates that opening and closing sockets does not properly release mutexes eventually causing this resource to be exhausted. This problem was introduced in OpenVMS V7.0. o Applications which call opendir and readdir recursively to traverse subdirectories may end up in an infinite loop when reading the directory which includes returning [000000]000000.DIR. The readdir function no longer returns an entry which is equivalent to the directory being read. 6 PROBLEMS ADDRESSED IN ALPACRT04_070 KIT o The sscanf function inadvertantly truncates a 64-bit pointer when assigning values to that pointer. The simple statement sscanf("s","%s",x) will access violate if "x" is a 64-bit pointer. o The timezone cache introduced to correct performance problems reported with the timezone functions incorrectly frees memory that is later used by the cache routines. If the user's application happens to allocate and use this memory, the routines which assume the data in the memory was written by the DEC C RTL, may access violate. o Calling the stat function in a loop shows that memory is being leaked. This problem was introduced in OpenVMS V7.0. o Extra characters may be written to stdout under the conditions that the application is reading from stdin and it is not a terminal. The extra characters appear random in the output, but in fact are written each time a new record is read from stdin. o An application which closes either stdin, stdout, or stderr, and then reopens it using the dup function may not have the file actually closed if i/o is not done using the file descriptor. A workaround is to force i/o on the file by using a function call such as sync or flush. -- COVER LETTER -- Page 4 28 May 1997 7 PROBLEMS ADDRESSED IN ALPACRT03_070 KIT o The ECO kit ALPACRT02_070 correctly added the new rules for GB-EIRE, but neglected to add the new rules for the other European countries. Additionally, ALPACRT02_070 neglected to terminate the September rules to not take affect in 1996. o The ECO kit ALPACRT02_070 attempted to fix a problem with printf which resulted in spurious characters being displayed due to an uninitialized buffer. The work to reduce stack usage in printf reintroduced this initial problem. 8 PROBLEMS ADDRESSED IN ALPACRT02_070 KIT o The DEC C Runtime Library functions whose name are of the form decc$fmath_2, are defined in STARLET, but are not universal symbols in the DECC$SHR image. When these functions are referenced by an application, linking the image results in inclusion of the DECC$SHR image from IMAGELIB and the specific C math modules from STARLET. If neither the DPML$SHR image or the CMA$TIS_SHR image were already brought in during the IMAGELIB phase, the object form is included from STARLET. This is due to the reference to these symbols appearing in the STARLET phase. On OpenVMS V7.0, this results in the undefined symbols: CMA$TIS_ERRNO_SET_VALUE CMA$TIS_VMS_ERRNO_SET_VALUE After adding the decc$fmath_2 symbols to the DECC$SHR image, both the DPML$SHR and CMA$TIS_SHR references are resolved using shareable images found in IMAGELIB. o The time zone file for Europe needs to have a rule added to reflect the Seventh Directive of the European Parliament and of the Council of 30 May 1994 which defines the start and end dates of summer time throughout the EEC, using a new algorithm with effect from 1996. o The UTC based time functions, introduced in OpenVMS V7.0, caused the performance of these functions or "degrade enormously". o A cache for tzfiles has been introduced to improve performance. The size of the cache is determined by the logical name DECC$TZ_CACHE_SIZE. To accomodate most countries having both standard and summer time, the default cache size is two. o Dates using the Hebrew locale appear in the format MM/DD/YY, instead of the format DD/MM/YY. The problem is in the source of the Hebrew locale, in the way the date format is defined. -- COVER LETTER -- Page 5 28 May 1997 o Many DEC C Runtime Library routines (fwrite in particular) are mistakenly REENABLING AST delivery in the case where it was disabled on entry to the routine. o A change occurred in how fseek works with fixed length odd byte record lengths. The description of fseek in the rtl reference manual says "The function can position fixed-length record-access file with no carriage control or a stream-access file on any byte offset, ....". Using OpenVMS V6.1 the phrase "on any byte offset" did not include the pad byte that RMS keeps on disk between records of odd length in fixed length record format sequential files. By the time of OpenVMS V6.2, the phrase "on any byte offset" apparently includes that pad byte. o Processing VFC files (both writing and reading) IN STREAM MODE is broken in OpenVMS V7.0. This is most evident when the number of characters written to or read from the file is greater than the size of the internal I/O buffer. o The qsort function no longer access violates when sorting a large number of records. This was demonstrated by sorting 1966079 records whose values were 1 through 1966079. The qsort function can now sort the maximum number of records. o The DEC C Runtime Library had previously added the ability for users to define the logical name DECC$DEFAULT_LRL to change the default longest record length value on stream files. A problem existed such that defining this logical name to zero resulted in files which had fixed length records instead of stream_lf records. o Functions which write records to a file no longer access violate when a null record is written. A test program which issues fputs(" ", stdout) followed by fputs("", stdout) can be used to demonstrate this problem. o The getcwd function does not correctly return the directory name, when the third parameter is used to specify UNIX format. The last character of the resultant UNIX file name is incorrect. o The tempnam function, when generating a filename, incorrectly increments the character "9" to the character ":", resulting in an invalid filename. o The setvbuf function now limits the buffer size used to 32767 bytes. It further limits this value to the sysgen parameter MAXBUF when associated with a terminal device. o The DEC C Runtime Library does not properly handle all rms error codes that have secondary values returned in the stv fields. For example, after a call to the open function fails, the perror function reports the error 'ACP create failed', but does not indicate the specific reason available in the secondary RMS status. -- COVER LETTER -- Page 6 28 May 1997 o The fileno function, when called with results of a dup2 file doesn't return the file descriptor of the original file. Applications expect that fileno(stdout) will always return one regardless of whether stdout was used in a call to dup2. o Testing of the printf function showed that the conversion of "printf("%.9sn",s)" will access all 9 characters of the string even if the null terminator is earlier in the string. If the terminator is at the end of a page and the next page is a protected page, an access violation will result. o In a UNIX file system, passing "." refers to the current directory. The opendir function does not accept "." as the directory name. o The opendir function now accepts directory names specified in UNIX format which end in a "/" character. o The ftw function has been corrected to accept both OpenVMS and UNIX style path arguments. o The translation of OpenVMS to UNIX file specifications should consistently lowercase the resultant name. o The translation of [xxx,yyy]zzz should result in /xxxyyy/zzz, treating both xxx and yyy as decimal characters. The translation of [1,9] should not generate a numeric conversion error. o The documentation for the readdir function states that the ".dir" extension is removed from directory specifications, but it is not. o The DEC C Runtime Library functions do not correctly interpret the standard UNIX escape character (backslash). These characters are now removed from the file specification. o In contrast to what is said in the DEC C RTL Reference Manual, the pipe function does not ignore the second parameter. The function has been corrected to ignore all values except O_NDELAY and O_NONBLOCK. The documentation for this second argument will be changed as follows: flag An optional argument used as a bitmask. If either O_NDELAY or O_NONBLOCK bit is set, the I/O operations to the mailbox via array_fdscptr file descriptors terminate immediately, rather than waiting for another process. If, for example, the O_NDELAY bit is set and the child issues a read request to the mailbox before the parent has put any data into it, the read terminates immediately with zero status. If neither O_NDELAY nor O_NONBLOCK bit set, the child will be waiting on the read until the parent writes any data into the mailbox. This is the default -- COVER LETTER -- Page 7 28 May 1997 behaviour if no flag argument is specified. The values of O_NDELAY and O_NONBLOCK are defined in the header file. Any other bits in the flag argument are ignored. You must specify this argument if the second optional, positional argument bufsize is specified. If the flag argument is needed only to allow specification of the bufsize argument, specify flag as zero. o The function strnlen is marked as being an ANSI function, even though it is not defined by the standard. This is important for customers who restrict name prefixing using /prefix=ansi. The correction is to not prefix usages of strnlen when compiling with this qualifier. 9 PROBLEMS ADDRESSED IN ALPACRT01_070 KIT o The sleep function, when passed an argument of zero, now correctly returns to the calling program without sleeping. o The sleep function restricts the duration of a sleep request to 9999 days. o The mktemp function generates unique file specifications by replacing Xs found a user-supplied string with a derivative of the process id. The problem is that only trailing Xs are to be replaced as opposed to Xs found throughout the string. o Files defined as having Fortran carriage control are expected to have control information in each record of the file. The runtime library now correctly defaults to space carriage control when zero length records are encountered. o The read function fails to load characters that have been used in calls to the ungetc function. o The read function was not loading characters from the unget buffer before reading from the disk. o A problem was introduced into the runtime library such that the calculations of the end of file position were incorrect when the entire file fit into a single i/o buffer. o Prior to extending a file, the runtime library ensures that the user has opened the file with write access. A boundary condition existed such that this test was incorrectly done when positioning to the end of the file, but not beyond it. o In the access function, the user_group and user_member components are no longer truncated when they are larger than 255. In addition, the system group now abides by the MAXSYSGROUP SYSGEN parameter. -- COVER LETTER -- Page 8 28 May 1997 o The truncate function has been corrected to return unused blocks to the file system. Prior to this change, the number of blocks allocated to the file were not changed. o The printf function has been corrected to properly initialize a work buffer during the format string processing. Prior to this change, the processing of a format specifier could result in data from the last specifier processed remaining in the buffer. o The functions sleep, alarm, setitimer, and usleep have been rewritten to make better use of Timer Queue Entries (TQEs). Prior to this change, the runtime library made liberal use of the sys$canwak system service in these functions. o The readdir function returns file names to the application in either OpenVMS or UNIX format. The UNIX format lowercases the name, but inadvertantly used a locale-sensitive lowercase routine. This was quite apparent using the Far East locales. o The exec functions have the ability to pass environment strings to the child process. Prior to this change, a coding error prevented these strings from exceeded 127 bytes. These strings can now be up to 255 bytes in length. o Since changing the default LRL value for stream files from 0 to 32767, we've been informed that this change has a dramatic affect on sort times and workfile size. We now look for a logical DECC$DEFAULT_LRL for this value, using 32767 if not defined. o The atof function no longer generates a high performance arithmetic trap when passed an IEEE denorm floating point number. The underlying function is now told to treat denorms as zero. o The rewind function is documented to write all buffered output and discard all buffered input prior to rewinding the file. Under certain situations, the buffer was not being flushed to disk. o The function decc$to_vms, has been corrected to allow file specifications of the form "./aaa.-bbb" to be converted to OpenVMS file specification format. o The amount of stack space used by the printf functions has been reduced. Prior to this change, using printf within a threaded application would likely exhaust the stack space. o The lseek function may position incorrectly when given the SEEK_END option. Typically this occurs when the internal buffer is full and the last operation done to the file is flush or sync. o The fsync and flush functions will leave the file positioned at the end, as opposed to the original position, under certain conditions. These functions are not intended to move the -- COVER LETTER -- Page 9 28 May 1997 current position. 10 KIT INSTALLATION RATING: The following kit installation rating, based upon current CLD information, is provided to serve as a guide as to which customers should apply this remedial kit. (Reference attached Disclaimer of Warranty and Limitation of Liability Statement) INSTALLATION RATING: 3 : To be installed by customers experiencing the problems corrected. 11 INSTALLATION INSTRUCTIONS: Install this kit with the VMSINSTAL utility by logging into the SYSTEM account, and typing the following at the DCL prompt: @SYS$UPDATE:VMSINSTAL ALPACRT06_070 [location of the saveset] The saveset location may be a tape drive, or a disk directory that contains the kit saveset. The system should be rebooted after successful installation of the kit. If you have other nodes in your VMScluster, they should also be rebooted in order to make use of the new image(s). During installation you may see the following message: %INSTALL-E-NODELSHRADR, unable to delete image with shareable address data -INSTALL-I-PLSREBOOT, please reboot to install a new version of this image This is not a cause for concern. It simply means that DECC$SHR.EXE was installed as a resident image, which is the standard configuration for OpenVMS Alpha V6.1 systems. The new image will not take effect until the system is rebooted. 12 REMOVAL INSTRUCTIONS: Remove this kit and restore the original files and libraries by logging into the SYSTEM account, and typing the following DCL prompt: @SYS$UPDATE:ACRT$ECO_DROP -- COVER LETTER -- Page 10 28 May 1997 Copyright (c) Digital Equipment Corporation, 1997 All Rights Reserved. Unpublished rights reserved under the copyright laws of the United States. The software contained on this media is proprietary to and embodies the confidential technology of Digital Equipment Corporation. Possession, use, or dissemination of the software and media is authorized only pursuant to a valid written license from Digital Equipment Corporation. DISCLAIMER OF WARRANTY AND LIMITATION OF LIABILITY THIS PATCH IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED TO THE EXTENT PERMITTED BY APPLICABLE LAW. IN NO EVENT WILL DIGITAL BE LIABLE FOR ANY LOST REVENUE OR PROFIT, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, WITH RESPECT TO ANY PATCH MADE AVAILABLE HERE OR TO THE USE OF SUCH PATCH.