PROBLEM: (QAR 44327)    	(Patch ID: OSF400-007)
********
This fix changes the internal encoding of IEEE floating-point Quiet NaNs by
setting the sign bit. This fix also removes an inconsistency between the "user
space" and kernel encoding.  Finally, printf() has been fixed so that a
negative NaN will not be displayed even if the NaN's sign bit is set. This is
in accordance with the IEEE Std 754-1985.

A NaN is the floating-point representation of a result which is "Not A Number"
(e.g. the floating-point result of zero divided by zero is a NaN).

This change is only of interest to programmers who use IEEE floating-point math
with the -ieee or the -ieee_with_inexact option. It does not affect programs or
libraries not using the full IEEE math support. Further, the libm isnan()
routine and the IS_*NAN() macros in /usr/include/fp.h are compatible with both
the old and new encodings.

For more information, see the IEEE Standard for Binary Floating Point
Arithmetic ANSI/IEEE (Std 754-1985). For information about the Alpha AXP
implementation, see the Alpha AXP Architecture Reference Manual (Second Edition)
by Richard L. Sites and Richard T. Witek, Digital Press, 1995. See the section
on "Encodings" (4.7.4).

Compile and execute the example listed below.

       csh>
       csh> cat test.c
       #include <stdio.h>
       #include <float.h>
       int main()
       {
           double d_libc = DBL_QNAN, d_zero, d_zero1, d_compute;
           float f_libc = FLT_QNAN, f_zero, f_zero1, f_compute;

           sscanf("0.0","%le",&d_zero);        /* fake out optimizer */
           sscanf("0.0","%le",&d_zero1);       /* so we test dev env */
           f_zero = d_zero;
           f_zero1  = d_zero1;

           d_compute = d_zero / d_zero1;       /* Propagate a NaN */
           f_compute = f_zero / f_zero1;       /* Propagate a NaN */

           printf("DBL_QNAN:%lX\n", *(long *)&d_libc);
           printf(" generated:%lX\n", *(long *)&d_compute);

           printf("FLT_QNAN:%lX\n", *(int *)&f_libc);
           printf(" generated:%lX\n", *(int *)&f_compute);
       }

       Results on a system with out the patches installed.

       csh>
       csh> cc -ieee test.c
       csh>
       csh> a.out
        DBL_QNAN:7FF8000000000000
         generated:7FFFFFFFFFFFFFFF
        FLT_QNAN:7FC00000
         generated:7FFFFFFF
       csh>

       Results on a system with the patches installed, NO recompilation.

       csh> a.out
        DBL_QNAN:FFF8000000000000
         generated:FFF8000000000000
        FLT_QNAN:FFC00000
         generated:FFC00000
       csh>


PROBLEM:  (QAR 45808)  			(Patch ID: OSF400-017)
********
"pthread.h" incorrectly defines the routines pthread_self(),
pthread_testcancel(), pthread_lock_global_np() and pthread_unlock_global_np()
when using a compiler which does not support "#pragma extern_prefix".

The typical symptom of this problem will be an error message from the compiler
being used stating that one of the four routines above are not defined somehow.

A failure case might look like the following:
 cxx: Error: try.cxx, line 9: In the initializer for self, \
                    "pthread_self" is not declared.
              pthread_t self = pthread_self();
            -------------------^

PROBLEM:  (QAR #45997)   	(Patch ID: OSF400-017)
********
Attempting to fork a child process, in a multithreaded program, after having
used a condition variable, may cause a SEGV in the child process.

The symptom of this problem is a SEGV in a child process from a parent which
is multithreaded.

A typical stack trace might look like the following:
            0 cvReinit(0x3ffc008ae28, 0x3ff80578c0c, 0x3ff80577f8c, \
                0x3ffc0187938, 0x3ffc0080c50) [0x3ff805602ec]
            1 uxForkHandler(0x3ff80577f8c, 0x3ffc0187938, 0x3ffc0080c50, \
                0x3ffc0081de0, 0x3ff800d3784) [0x3ff80577f88]
            2 __fork(0x1200165b4, 0x140009900, 0x14003bc20, 0x140003d70, \
                0x3ffc00993c8) [0x3ff800d3780]

PROBLEM:  (QAR #45997)   		(Patch ID: OSF400-017)
********
A child process, created by a multithreaded program, receives an error from a
call to pthread_mutex_destroy() on a mutex.  This will only occur when the
parent calls fork() with other threads blocked on the mutex being destroyed.
If the child unlocks the mutex and then tries to destroy it, EBUSY will be
returned.

The symptom of this problem would be a multithreaded child process exiting or
emitting a message because pthread_mutex_destroy() returned EBUSY.

Another symptom may be an infinite loop in the application.  It is common for
multithreaded programs to retry when EBUSY is returned.

PROBLEM:  (QAR #46441)   (Patch ID: OSF400-017)
********
Multi-threaded programs never create core files.  Usually a DECthreads error
message will have been displayed, the program terminated, but no core file can
be found.

PROBLEM:  (QAR #46442)   (Patch ID: OSF400-017)
********
Multi-threaded programs may receive extra signals.  WARNING: This is a
difficult problem to identify and in the user program.

A simple way to identify the problem would be to modify the user's application
to count the signals it sends and then count how many they receive.  The
number should never be greater than the number sent.  The sender and receiver
must be synchronized somehow, though, to properly identify the problem.

PROBLEM:  (QAR #46443)   (Patch ID: OSF400-017)
********
tis_mutex_lock() in the single-threaded case will recursively lock a mutex of
the default type.  Only mutexes explicitly created as RECURSIVE mutexes should
allow a thread to lock a mutex it has already locked.  When tis_mutex_lock()
is used in a multithreaded environment, the correct behavior exists.


There is no good way to identify this problem.  If an application issues a lock
against a non-recursive type mutex, this patch will cause the illegal recursive
lock attempt to fail.

PROBLEM:  (CLD MGO102122, QAR 45686) (Patch ID: OSF400-022)
********
This patch fixes a memory leak problem that occurs when strxfrm() or wcsxfrm()
executes in a locale that allows one character to substitute for another during
collation. An example is the de_DE.ISO8859-1 locale, in which "ss" is equivalent
to and may be substituted for the German sharp s. In such a locale, each
invocation of strxfrm() or wcsfrm() causes some amount of heap memory to be
leaked. When you apply this patch, the memory leak no longer occurs.

PROBLEM:  (ZUO100558)   	(Patch ID: OSF400-024)
********
Unsuccessful attempts to su to root were not recorded in the syslog/auth.log
file, for BASE security.

PROBLEM:  (QAR 46371) 		(Patch ID: OSF400-025)
********
This patch fixes the incorrect parameter type declaration in the swscanf()
routine. This is a new routine introduced in Version 4.0 for ISO C conformance.
According to the ISO C standard, the function prototype for the swscanf()
routine is as follows:

        int swscanf(const wchar_t *, const wchar_t *, ...)

However, this routine was incorrectly implemented by using the following
function prototype:

        int swscanf(const char *, const wchar_t *, ...)

This patch changes the function prototype of the routine to conform to the ISO
C standard. The patch also makes associated changes in the routine's behavior
so that it accepts a Wide-character string for interpretation.

PROBLEM:  (QAR 45694) 		(Patch ID: OSF400-027)
********
This patch fixes a problem in the fnmatch() routine's single-byte and multibyte
versions, which incorrectly match '?' to a null character.  As a result, a
filename pattern like "???" could match not only a filename containing "aaa",
but also one containing "a" or "aa".  Because the find command uses fnmatch()
for filename pattern matching, there is a chance that data files may be removed
unintentionally.  An example is as follows:

        % find . -name 'data???' -exec rm {} \;

This command could inadvertently remove files named "data1", "data10", and so
forth.  Note that the problem fixed by this patch occurs only when you use
locales other than the default C locale.

PROBLEM:  (QAR #46503, CLD USG-03462) (Patch ID: OSF400-037)
********
This patch fixes a problem that occurs on systems running DECthreads.
Multithreaded programs do not create threads with the proper IEEE floating
point rounding mode. Computations that depend on rounding a floating point
value to its nearest integer equivalent will receive an integer with the
decimal point value truncated.

Note that the initial thread does not have a rounding mode problem.

To reproduce this problem, create a thread and use the rint function to round
a floating point value to the nearest integer. The following shows an incorrect
value returned by the rint function:          rint(4.7) -> 4

PROBLEM:  (QAR #47839) 		(Patch ID: OSF400-047)
********
Multithreaded programs running on a multiprocessor system may behave as
ifi they are utilizing only a few of the CPUs available for execution.

To recognize this problem, attach to the process with this suspect behavior
with ladebug.  Issue the command:

        (ladebug) show thread

If you see any "null threads" in the "running" state while there are user
threads in the "ready" state, the application is experiencing this problem.

Output from a ladebug "show thread" for a process with the suspected behavior
may look like this on a four processor system:

Thread State      Substate        Policy     Priority Name
~~~~~ ~~~~~      ~~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~~~~~~~
     1 blocked    cond wait       throughput 11       default thread
    -1 blocked    kernel          fifo       32       manager thread
    -2 running                    idle        0       null thread for VP 0x0
    -3 ready                      idle        0       null thread for VP 0x1
    -4 running                    idle        0       null thread for VP 0x2
    -5 running                    idle        0       null thread for VP 0x3
     2 ready                      throughput 11       <anonymous>
     3 ready                      throughput 11       <anonymous>
     4 ready                      throughput 11       <anonymous>
     5 ready                      throughput 11       <anonymous>
     6 ready                      throughput 11       <anonymous>
     7 ready                      throughput 11       <anonymous>
     8 ready                      throughput 11       <anonymous>
     9 ready                      throughput 11       <anonymous>
    10 ready                      throughput 11       <anonymous>
    11 ready                      throughput 11       <anonymous>
    12 ready                      throughput 11       <anonymous>
    13 ready                      throughput 11       <anonymous>
    14 ready                      throughput 11       <anonymous>
    15 ready                      throughput 11       <anonymous>
>*  16 running                    throughput 11       <anonymous>
    17 ready                      throughput 11       <anonymous>
    18 ready                      throughput 11       <anonymous>
    19 ready                      throughput 11       <anonymous>
    20 ready                      throughput 11       <anonymous>
    21 ready                      throughput 11       <anonymous>

PROBLEM:  (MCPM64E8E) 		(Patch ID: OSF400-039)
********
This patch fixes a problem in which the malloc function fails to allocate all
available space within the 2GB address space allowed by the taso option.

When a call_shared executable built with the taso option calls the malloc
function with certain large values as the requested amount of memory (for
example, 32*1024*1024), malloc may fail to utilize all of the available 31-bit
address space.  With the given example, malloc returns a NULL and sets ERRNO
after 250MB when it should have been able to allocate closer to 1 GB (other
system and process limits permitting).

The problem does not show up when the taso option is not used, or in statically
linked executables.

PROBLEM:  (48427) 		(Patch ID: OSF400-070)
********
On systems configured to use Network Information Services (formerly known as
Yellow Pages), long-lived multithreaded processes that consist of a series of
shorter lived threads which call system database functions such as getpwent()
or getgrnam(), are likely to accumulate large amounts of unused memory.  This
will show up with the "ps -l" command as a continually growing number under the
"SZ" field for the process.  The problem is caused by failure to free resources
allocated for the thread cache information needed in processing NIS data.  The
problem will not show up in single threaded applications, applications that do
not use the get* functions, or on systems that are not configured in
/etc/svc.conf to use the "yp" (NIS) services.

PROBLEM:  (48354, 48675) 	(Patch ID: OSF400-076)
********
This problem causes multithreaded applications to hang indefinitely.  It is
difficult to isolate the problem to a condition that matches this fix, but
if decladebug indicates you have one or more threads in fork() and one or
more in fclose(), you are probably experiencing this problem.  Likewise you
could also be experiencing the problem if you find one thread in getenv() or
setenv() and another in one of the time functions such as localtime().

PROBLEM:  (BRO100738) 		(Patch ID: OSF400-080)
********
When testing applications on a BSD-style device such as /dev/tty0h, the ttyslot
function returns a number matching the index into the /var/adm/utmp file.
However, when running the same program on an SVR4-style device such as
/dev/lat/622, the ttyslot function always returns zero.  The problem can be
indentified easily by running the sample test program included here.

Copy the following program to ttyslot_test.c:

#include <sys/ioctl.h>
#include <stdio.h>
#include <string.h>
#include <utmp.h>

main()
{
        printf("ttyslot() = %d\n", ttyslot());
        exit(1);
}

Error messages may vary, depending on which applications are being run.  When
connected to a system over an SVR4-style LAT device the application calls the
ttyslot function to locate the entry in the /var/adm/utmp file.  The ttyslot
function returns zero in error because it fails to match the control terminal.
When you connect to a system over a LAT device and make a ttyslot function call
to locate the entry in the /var/adm/utmp file for the control terminal of the
current process, ttyslot() returns zero in error because it fails to match the
control terminal.

PROBLEM:  (QAR 48474) 		(Patch ID: OSF400-083)
********
This fix changes the encoding of IEEE floating-point Quiet NaNs returned by the
math library by setting the sign bit. This fix corrects inconsistency between
the value returned by the math functions and the kernel encoding.

A NaN is the floating-point representation of a result that is "Not A Number"
(e.g. the floating-point result of zero divided by zero is a NaN).

This change is only of interest to programmers who use IEEE floating-point math
 with the -ieee or the -ieee_with_inexact option. It does not affect programs
or libraries not using the full IEEE math support.

For more information, see the IEEE Standard for Binary Floating Point
Arithmetic ANSI/IEEE (Std 754-1985). For information about the Alpha AXP
implementation, see the Alpha AXP Architecture Reference Manual (Second Edition)
by Richard L. Sites and Richard T. Witek, Digital Press, 1995. See the section
on "Encodings" (4.7.4).

Compile the following program using the -ieee and -lm options:

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
main()
{
    double a, b, c, d;
    int i;

    a = sqrt( -1.0 );
    i = sscanf("0.0 0.0 0.0", "%lf %lf %lf", &b, &c, &d);
    assert(i == 3);
    printf( "sqrt( -1.0 ) = %f\t\t0x%016lx\n", a, *(long *)&a );

    d = b / c;

    printf( "0.0 / 0.0 = %f\t\t0x%016lx\n", d,*(long *)&d );
}

Compile this program using the -ieee and -lm command line options.

Results before installing new math library:
sqrt( -1.0 ) = NaNQ             0x7fffffffffffffff
0.0 / 0.0 = -NaNQ               0xfff8000000000000

Results after installing new math library:
sqrt( -1.0 ) = -NaNQ            0xfff8000000000000
0.0 / 0.0 = -NaNQ               0xfff8000000000000

PROBLEM:  (QAR 45667)           (Patch ID: OSF400-088)
********
The inet_makeaddr() libc library routine in V4.0 may corrupt the stackframes of
applications built from V5.1 or earlier versions of the Digital UNIX C++
compiler.   There is no problem for applications built with cc or cc -migrate
or with C++ V5.3 or newer.  The routine inet_makeaddr() is defined to return a
4-byte structure.  However, in V4.0, that routine returns both the required 4
bytes plus an extra 4 bytes of padding.  The V5.1 or earlier versions of C++
were the only compilers that did not provide the extra 4 bytes of padding in
the caller's stackframe.  As a result, the next 4 bytes on the caller's stack
were likely to be corrupted by the extra four bytes of padding.

An example of the problem is shown below:

        % cat a.cxx
        #include <stdio.h>
        #include <arpa/inet.h>

        void main() {
            in_addr  ret;
            long l = 0x5555555555555555;

            printf("l = %lx\n",l);
            ret = inet_makeaddr(inet_addr("16.140.16.3"),
                                inet_addr("16.140.16.3"));
            printf("l = %lx\n",l);
        }

        Results on a system without the patches installed.

        % cxx a.cxx ; a.out
        l = 5555555555555555
        l = 5555555500000000

        Results on a system with the patches installed.

        % cxx a.cxx ; a.out
        l = 5555555555555555
        l = 5555555555555555

This problem is corrected by the patch to the /usr/ccs/lib/libc.a and
/shlib/libc.so libraries.

There are two other alternative solutions to this problem. The first is to
update to the Digital UNIX V4.0A release.  V4.0A contains the corrected
inet_makeaddr() library routines.  The second solution is to recompile the
C++ application with Digital UNIX C++ V5.3 or later.  This newer C++ compiler
allocates 8 bytes of stack space for routines that return 4-byte structures.

PROBLEM:  (QAR 36520, QAR 48372) (Patch ID: OSF400-093)
********
Some valid programs compiled with ieee mode may receive a floating-point
exception even though they should run to completion. The problem occurs
because the floating-point exception handler is too strict when attempting
to enforce trap shadow rules (SRM 4.7.6.1). The following C program fails
when executed on a system with a DECchip 21064.

Compile the following program with the command:
cc -migrate -g -ieee_with_inexact t.c -o t

        f( int dum, ... ) {
        }

        main() {
            int ii = 50;
            f( 42,
                (float)ii / 100,
                (float)ii / 100,
                (float)ii / 100 );
        }
Results on a system with a 21046 chip before applying the patch:
quarry:ieee/48372 [4%] cc -migrate -g -ieee_with_inexact t.c -o t
quarry:ieee/48372 [5%] ./t
Floating exception(coredump)

Results after applying the patch:
sauron:ieee/48372 [2%] ./t
sauron:ieee/48372 [3%]

PROBLEM:  (QAR #48439) 		(Patch ID: OSF400-101)
********
Multi-threaded programs running on a multiprocessor system may behave as if
they are utilizing only a few of the CPUs available for execution.

To recognize this problem, attach to the process with this suspect behavior
with ladebug.  Issue the command:

        (ladebug) show thread

If you see any "null threads" in the "running" state while there are user
threads in the "ready" state, the application is experiencing this problem.

Output from a ladebug "show thread" for a process with the suspected behavior
may look like this on a four processor system:

Thread State      Substate        Policy     Priority Name
~~~~~ ~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~~~~~~~
     1 blocked    cond wait       throughput 11       default thread
    -1 blocked    kernel          fifo       32       manager thread
    -2 running                    idle        0       null thread for VP 0x0
    -3 ready                      idle        0       null thread for VP 0x1
    -4 running                    idle        0       null thread for VP 0x2
    -5 running                    idle        0       null thread for VP 0x3
     2 ready                      throughput 11       <anonymous>
     3 ready                      throughput 11       <anonymous>
     4 ready                      throughput 11       <anonymous>
     5 ready                      throughput 11       <anonymous>
     6 ready                      throughput 11       <anonymous>
     7 ready                      throughput 11       <anonymous>
     8 ready                      throughput 11       <anonymous>
     9 ready                      throughput 11       <anonymous>
    10 ready                      throughput 11       <anonymous>
    11 ready                      throughput 11       <anonymous>
    12 ready                      throughput 11       <anonymous>
    13 ready                      throughput 11       <anonymous>
    14 ready                      throughput 11       <anonymous>
    15 ready                      throughput 11       <anonymous>
>*  16 running                    throughput 11       <anonymous>
    17 ready                      throughput 11       <anonymous>
    18 ready                      throughput 11       <anonymous>
    19 ready                      throughput 11       <anonymous>
    20 ready                      throughput 11       <anonymous>
    21 ready                      throughput 11       <anonymous>

PROBLEM:  (49260)        (Patch ID: OSF400-106)
********
Customer applications that repeatedly call gethostent(), when run on systems
configured to use YP and/or bind services for host entries, will see only the
entries in the local /etc/hosts file.  The problem is not present for similar
routines such as gethostbyname().

The only way to reproduce the problem is to write a program that repeatedly
calls gethostent() and then verify that it does not return all the entries
present in the YP and bind databases served to the machine.

PROBLEM:  (ULC-43)       (Patch ID: OSF400-119)
********
The customer's application sets a timer to go off every 200 milliseconds
via a call to setitimer().  It then loops indefinitely, calling a function
that does a setjmp() and then calling a function that does a longjmp().  On
Digital UNIX V4.0 r386, the application fails with a segmentation fault after
a variable number of loop iterations.

PROBLEM:  (QAR #49720)   (Patch ID: OSF400-131)
********
Multi-threaded applications running on SMP systems, may find their applications
hanging because a thread is never told that a mutex has been unlocked or that a
condition variable has been signaled.

To recognize this problem, use ladebug to display the list of mutexes and
condition variables.

        (ladebug) pthread "mutex -faq; condition -faq"

This will display a very long list of mutexes and condition variables, including
those that belong to libc or libpthread.  An example of the output follows:

(ladebug) pthread "mutex -faq; condition -faq"
.
.
.
Mutex 103 (normal) "mutex at 0x140000b10" (0, block 0x140008b90) is
orphaned blocking structure, 2 threads waiting; waiters: 56, 51
.
.
.
Condition variable 203, "cond at 0x14030b510" (0) is orphaned blocking
structure, 2 threads waiting; waiters: 91, 5
.
.
.

The application will hang forever because the threads are waiting on a blocking
structure not attached to the mutex or condition variable.


PROBLEM:  (QAR #49520)   (Patch ID: OSF400-131)
********
Multi-threaded applications running on SMP systems, may find their applications
hanging because of a corrupted mutex.

To recognize this problem, use ladebug to display the list of mutexes that are
locked:

        (ladebug) pthread "mutex -fal"

This will display a list of locked mutexes.  Some mutexes will be recursive or
error check type mutexes.  Those types of mutexes record the thread that owns
the lock on the mutex.  The corruption is exposed as a recursive or error check
mutex without a thread owner:

(ladebug) pthread "mutex -fal"
Mutex 56 (recursive) "exc cr" (0x3ffc0082f80, block 0x140009d10) is locked
(depth 1), 4 threads waiting; ref count is 4

The output should have a "by thread x" after the "is locked" line above.


PROBLEM:  (QAR #49520)   (Patch ID: OSF400-131)
********
Multi-threaded applications may overflow the stacks of created threads
prematurely.  Applications may receive a SEGV and dump core at unexpected
places when this problem occurs.  The SEGV should be because a memory location
in or near the thread's stack was referenced.

To recognize this problem, use ladebug to run appliation in question and wait
for the SEGV to occur.  Then find the thread that took the SEGV and check to
see what value of the stack pointer is.  Then display the full information on
the thread itself and compare the current stack pointer to the limits displayed.
An example debug session:

(ladebug) run <application>
Thread received signal SEGV
stopped at [hstTransferContext: ??? 0x3ff80572ca8]
(ladebug) p $sp
0x140028bb8
(ladebug) pthread "thread -f x"
thread 2 (running) "<anonymous>" (0x140006030), created by pthread
  Scheduling: throughput policy at priority 11
  Masked signals: none
  Pending signals: none
  Terminated, result value 0
  Object flags: none; self flags: none; sched flags: none; mutex flags:
    terminated; atomic flags: none
  Thread specific data: 0=0x140006488
  Stack: 0x14002fa38; base is 0x140030000, guard area at 0x140027fff
  General cancelability disabled, asynch cancelability disabled
  Current vp is 0, synch port is 0, vp ID is 0
  Join uses mutex 22 and condition variable 7; wait uses mutex 23 and
    condition variable 8
  The thread's start function and argument are 0x120001bc0
(0x3ffc01834c8)
  The thread's latest errno is 0


You should see that there is a considerable amount of free space on the stack.
(0x140028b
b8 - 0x140027fff = 0xbb9 or 3001 bytes!)

PROBLEM:  (QAR #49804)   (Patch ID: OSF400-131)
********
Multi-threaded applications which use fork() may find their applications hanging
because of a deadlock situation.

To recognize this problem, use ladebug to display the list of locked mutexes
and their waiters.

(ladebug) pthread "mutex -alrq"
  Mutex 1 (normal) "malloc" is locked by 13848, 4 threads waiting;
waiters: 13846, 3, 567, 8
  Mutex 10 (normal) "VM 0 cache" is locked, 1 thread waiting; waiters: 1
  Mutex 13 (normal) "VM 3 cache" is locked, 1 thread waiting; waiters: 13848

In the example above, the malloc mutex is held by thread 13848, but it is
waiting on mutex 13.  A stack trace inspection reveals that mutex 13 is held by
thread 13846.

PROBLEM:  (QAR 49787)    (Patch ID: OSF400-133)
********
A multithreaded application that calls any of the system database "get*"
functions (gethostent, getservent, etc.) and that calls fork(), may deadlock.
DECladebug will show a thread blocking on a mutex lock with the call to fork()
on its call stack, while another thread will also be stuck in the mutex
blocking function with a function name like gethostbynam() on its stack. Other
threads may or may not be stuck on other mutex locks.  The two threads in
question will never progress.  Any subsequent calls to fork will block forever.

PROBLEM:  (CLD #HPXQ9B161, QAR #48888) (Patch ID: OSF400-139)
********
On V4.0 and later, when running a call_shared FORTRAN application linked on an
earlier release, the loader will issue the error message:

 "dlopen: Unresolved symbols".  The error can also occur in older non-FORTRAN
applications that are linked with libc_r.so and call dlopen().  The problem
occurs even though there is no explicit reference to the symbol in the
application or library.

In the particular test reported and fixed by this patch, the DEC FORTRAN
Runtime Library (libfor.so) was inadvertently referencing the following libc
entry symbols:  __index, __rindex,
__realtime_kernel, chk_perm, __chk_perm, fchk_perm, __fchk_perm
and __list_free.  The entry symbols have been replaced in libc.
However, in some cases, they are just error termination routines and are treated
as unsupported.   This fix only handles the resolution of the missing symbols.

PROBLEM:  (CLD SSRT0425U) 	(Patch ID: OSF400-143)
********
A potential security vulnerability has been discovered, where under certain
circumstances, system integrity may be compromised. This may be in the form of
improper file or privilege management. Digital has corrected this potential
vulnerability.

PROBLEM:  (QAR50691)		 (Patch ID: OSF400-153)
********
A call to popen() was hanging after a call to pclose() with an invalid stream
pointer (such as a stream that was not popened) in a threaded program (one
built with -pthread).

PROBLEM:  (50746, 50316) (Patch ID: OSF400-154)
********
When a call to mallopt(M_MXFAST, value) was performed, the performance of
subsequent calls to malloc() slowed by as much as 65 times.

PROBLEM:  (SSRT0296U)    (Patch ID: OSF400-189)
********
A potential security vulnerability has been discovered in BIND (Domain Name
Service), where under certain circumstances, system integrity may be
compromised. This may be in the form of improper file or privilege management.
Digital has corrected this potential vulnerability.

PROBLEM:  (QAR 50961)            (Patch ID: OSF400-195)
********
The native exception handling facility may corrupt the users stack.  This is
most easily seen in an application using threads since the exception handling
facility is always present there. But other applications linked with "-lexc"
may see this problem as well.

A typical stack trace from Ladebug showing this problem may look like this:

(ladebug) t
Stack trace for thread 2
>0  0x3ff80579a94 in /usr/shlib/libpthread.so
#1  0x3ff80110b98 in /usr/shlib/libc.so
#2  0x3ff80110318 in __tis_read_unlock(0x3ff8011031c, 0x3ffc0092500,
        0x3ff8017345c, 0x3ffc0092500, 0x3ffc0087fe0, 0x0)
        DebugInformationStrippedFromFile738
#3  0x3ff80173458 in /usr/shlib/libc.so
#4  0x3ff807b2004 in exc_lookup_function_entry(0x14005d180, 0x3ff807b1d30,
        0x14005d180, 0x23bd5eb8, 0x3ff807b325c, 0x14005c640)
        DebugInformationStrippedFromFile0
#5  0x3ff807b3258 in UnknownProcedure16FromFile1(0x0, 0x14005d9a8, 0x100000001,
        0x14005c640, 0xabadabad00beed00, 0x3ff80579ac0)
        DebugInformationStrippedFromFile1
#6  0x3ff807b3634 in exc_unwind(0x100000001, 0x14005c640, 0xabadabad00beed00,
       0x3ff80579ac0, 0x3ff807b3b04, 0x3ff807b3aa0)
        DebugInformationStrippedFromFile1
#7  0x3ff807b3b00 in __Ots_CSpecificHandler(0x3ff807b3980, 0x14005d6f8,
        0x14005d6d0, 0x14005d180, 0x3ff00000000, 0x14005d408)
        DebugInformationStrippedFromFile4
#8  0x3ff807b2ac4 in UnknownProcedure12FromFile1(0x0, 0x3ff8055c8d8, 0x0,
        0x63ff0000, 0x14005de78, 0x0) DebugInformationStrippedFromFile1
#9  0x3ff807b2da0 in exc_dispatch_exception(0x14005de78, 0x3ff8055c460,
        0x14005d180, 0x23bd5f3c, 0x3ff807b24e0, 0x0)
        DebugInformationStrippedFromFile1
#10 0x3ff807b2534 in exc_raise_exception(0x3ffc00802a0, 0x0, 0x3ff80579a60,
        0x0, 0x3ffc0087650, 0x120002604) DebugInformationStrippedFromFile1
#11 0x14005d17c

Note that the last frame (frame #11 above) does not have any information
printed.  This is symptomatic of the stack being corrupted in such a way
that the debugger cannot interpret it correctly.

PROBLEM:  (QAR 50392)            (Patch ID: OSF400-195)
********
Some applications have bugs in them that developers are trying to find.  The
nature of these bugs might be to corrupt the internal workings of malloc()
or free() such that calling them causes a SEGV.

When this happens, it is possible for the native exception handling routines
to block while accessing their internal procedure descriptor list, due to some
other thread performing a lookup on that list. If the exception handling
routines actually try to block, it is possible for the blocking operation
itself to try to allocate memory and to call malloc() again.  This attempt to
call malloc() will hang.

A typical stack trace from Ladebug showing this error might look like this:

(ladebug) t
>0  0x3ff8057ca24 in /usr/shlib/libpthread.so
#1  0x3ff8057a450 in hstTransferContext(0x1, 0x140048030, 0x3ffc018a010, 0x4,
        0x3ffc0188a50, 0x90) DebugInformationStrippedFromFile109:???
#2  0x3ff8056429c in dspDispatch(0x14000c210, 0x140048c68, 0x140048af0, 0x8f4,
        0x3ffc0082770, 0x0) DebugInformationStrippedFromFile89:???
#3  0x3ff80567b98 in pthread_mutex_block(0x3ffc018a1c0, 0x3ffc018a1d0,
        0x1400e6ef0, 0x8f4, 0x3ffc0082770, 0x0)
        DebugInformationStrippedFromFile95:???
#4  0x3ff8057c820 in __pthread_mutex_lock(0x3ffc018a1d0, 0x1400e6ef0, 0x8f4,
        0x3ffc0082770, 0x0, 0x3ff80575e88)
        DebugInformationStrippedFromFile111:???
#5  0x3ff80575e84 in UnknownProcedure3FromFile103(0x8f4, 0x3ffc0082770, 0x0,
        0x3ff80575e88, 0x3ff800d194c, 0x0)
        DebugInformationStrippedFromFile103:???
#6  0x3ff800d1948 in malloc(0x3ff800d194c, 0x0, 0x3ff80579170, 0x90, 0x0,
        0x3ffc0184e70) DebugInformationStrippedFromFile22:???
#7  0x3ff8057916c in vmAlloc(0x3ff8055d94c, 0x3ffc0082870, 0x0, 0x0,
        0x3ffc018a1c0, 0x3ff8055d934) DebugInformationStrippedFromFile108:???
#8  0x3ff8055d948 in cvGetBlock(0x3ffc0082818, 0x3ffc0082800, 0x14000c040,
        0x3ffc008f7ec, 0x3ffc008f868, 0x3ff8057c8fc)
        DebugInformationStrippedFromFile1:???
#9  0x3ff8055f574 in cvWait(0x3ffc008f868, 0x8f4, 0x3ffc0082870, 0x140048af0,
        0x0, 0x3ff80575e88) DebugInformationStrippedFromFile1:???
#10 0x3ff8055d45c in __pthread_cond_wait(0x3ffc0082870, 0x140048af0, 0x0,
        0x3ff80575e88, 0x3ff8010fd54, 0x0) DebugInformationStrippedFromFile1:???
#11 0x3ff8010fd50 in /usr/shlib/libc.so
#12 0x3ff8010f570 in __tis_write_lock(0x3ff8010f574, 0x3ff8019241c,
        0x3ff80172aec, 0x1, 0x3ff800ccda0, 0x1)
        DebugInformationStrippedFromFile735:???
#13 0x3ff80172ae8 in __exc_lookup_function_entry(0x0, 0x0, 0x3ffc018a010, 0x0,
        0x3ff800d1540, 0x1401e5020) DebugInformationStrippedFromFile304:???
#14 0x3ff807b2004 in exc_lookup_function_entry(0x3ffc018a010, 0x0,
        0x3ff800d1540, 0x1401e5020, 0x3ff807b2bec, 0x1400249e0)
        DebugInformationStrippedFromFile0:???
#15 0x3ff807b2be8 in exc_dispatch_exception(0x0, 0x12009407c, 0x140122910,
        0x140020000, 0x0, 0x0) DebugInformationStrippedFromFile1:???
#16 0x3ff807b38c4 in exc_raise_signal_exception(0x80, 0x0, 0x3ff8019241c, 0x1,
        0x1, 0x140048af0) DebugInformationStrippedFromFile3:???
#17 0x3ff800d3b28 in __sigtramp(0x3ff8019241c, 0x1, 0x1, 0x140048af0,
        0x140122ef8, 0x0) DebugInformationStrippedFromFile105:???
#18 0x3ff8019241c in UnknownProcedure22FromFile22(0x3ffc0080c50, 0x1,
        0x14017cc00, 0x2f, 0x140024f20, 0x3ff8057c824)
        DebugInformationStrippedFromFile22:???
#19 0x3ff80192f40 in UnknownProcedure17FromFile22(0x3ff801943c8, 0x1, 0x10,
        0x3ffc0080e18, 0x72, 0x140024f20) DebugInformationStrippedFromFile22:???
#20 0x3ff801943c4 in /usr/shlib/libc.so
#21 0x3ff80194604 in /usr/shlib/libc.so
#22 0x3ff800d1958 in malloc(0x3ff800d195c, 0x0, 0x12008e3bc, 0x140024f20,
        0x1401232a0, 0x14017cc00) DebugInformationStrippedFromFile22:???
#23 0x12008e3b8 in lxldalc() /vobs/nlsrtl3/src/lxi/lxldalc.c:54

Note that frame #23 has a call to malloc().  In frame #16 a synchronous signal
(such as a SEGV) is taken, which results in an exception being raised.  Notice
in frame #6 that malloc() is called again as part of handling the exception,
which leads to the thread blocking.  This is because the previous call to
malloc() caused it to lock its internal mutex for synchronization purposes.

This recursive call to malloc() is the problem.  The user might be able to fix
the cause of the original SEGV if its accompanying exception is fully processed.
This patch allows the SEGV to be processed fully and correctly.

PROBLEM:  (QAR 49804)            (Patch ID: OSF400-195)
********
Threaded applications may see hangs when trying to use fork().  A prior patch
fixed only a part of the problem.

The user sees the child process with a stack trace from Ladebug like this:

(ladebug) t
>0  0x3ff8057ca24 in /usr/shlib/libpthread.so
#1  0x3ff8057a450 in hstTransferContext(0x1, 0x140ae11f0, 0x3ffc018a010, 0x4,
        0x3ffc0188a50, 0x3ffc01852c0) DebugInformationStrippedFromFile109:???
#2  0x3ff8056429c in dspDispatch(0x140051810, 0x1408641a8, 0x140864030, 0x0,
        0x3ffc01851d0, 0x0) DebugInformationStrippedFromFile89:???
#3  0x3ff80567b98 in pthread_mutex_block(0x3ffc008ae28, 0x3ffc01876f8,
        0x140621c00, 0x0, 0x3ffc01851d0, 0x0)
        DebugInformationStrippedFromFile95:???
#4  0x3ff8057c820 in __pthread_mutex_lock(0x3ffc01876f8, 0x140621c00, 0x0,
        0x3ffc01851d0, 0x0, 0x3ff8057984c)
        DebugInformationStrippedFromFile111:???
#5  0x3ff80579848 in vmReinit(0x0, 0x3ff8057984c, 0x3ff80578e70, 0x0,
        0x3ffc0080c50, 0x3ffc0081de0) DebugInformationStrippedFromFile108:???
#6  0x3ff80578e6c in /usr/shlib/libpthread.so
#7  0x3ff800d36e0 in __fork(0x120040830, 0x0, 0x140684bc0, 0x0, 0x1f, 0x0)
        DebugInformationStrippedFromFile335:???
#8  0x12004082c in forkTranslator(inoutp_handle=0x140a9b8f8,
        inoutp_operation_data=0x140763a00) dp_xlatr.c:3610
#9  0x12004040c in forkedTranslatorInterface(inoutp_handle=0x140a9b8f8,
        in_operation_code=eConnect, inoutp_operation_data=0 x140763a00,
        getr=0x0, putr=0x0, arg_p=0x0) dp_xlatr.c:3471
#10 0x12003e0c0 in dp_callTranslator(inoutp_handle=0x140a9b8f8,
        in_operation_code=eConnect, inoutp_operation_data=0x140763a00,
        inp_scb=0x140621c00, getr=0x0, putr=0x0, arg_p=0x0) dp_xlatr.c:1894
#11 0x12003d878 in dp_connectToTranslator(inp_scb=0x140621c00) dp_xlatr.c:1468
#12 0x1200649d0 in dp_pjaConnectToTranslator(inp_Scb=0x140621c00,
        in_docPdlOid=1252, inoutp_printerPdlOid=0x140a9b988,
        outp_needsTranslator=0x140a9b9a8) pja_doc.c:726
#13 0x12005b4a0 in startDocument_1(getr=0x12004bb0c, putr=0x12005dc40,
        inp_fib=0x140a53c00) dp_pja.c:1508
#14 0x12004b234 in fiberRoutineJacket(inp_fib=0x140a53c00) dp_jbstp.c:1276
#15 0x12004b430 in fibThreadJacket(inp_fib=0x140a53c00) dp_jbstp.c:1331
#16 0x3ff80574b94 in thdBase(0x0, 0x3ffc0183430, 0x3ffc018a010, 0x1, 0x45586732,
        0x3) DebugInformationStrippedFromFile101:???

    Note that frame #7 above shows the call to fork().  The DECthreads library
    is then entered with an attempt to lock a DECthreads internal mutex in
    frame #4.  This attempt causes the thread to block while waiting for
    another thread to unlock the mutex.  But because this is the only thread
    left in the child process after the parent forks, this mutex will never
    be unlocked.  The parent failed to lock this mutex during the fork
    operation and so is incorrectly left in the locked state in the child.

PROBLEM:  (QAR 51033)                    (Patch ID: OSF400-195)
********
Threaded applications using pthread_kill() may experience a stack corruption.
This is rather difficult to detect.

PROBLEM:  (QAR 51214)                    (Patch ID: OSF400-195)
********
A threaded application can experience a DECthreads bug check with a message
that mentions the routine nxm_resched(). This application might also hang
with one of its threads having a stack trace containing a frame for a call
to the routine errBugcheck().

The formatted DECthreads bugcheck message might look like this:

(ladebug) t
>0  0x3ff80568b20 in pthread_mutex_unblock(0x3ffc00802a0, 0x0, 0x0,
        0x3ffc0181580, 0x3ffc018a968, 0x0)
        DebugInformationStrippedFromFile95:???
#1  0x3ff8057c1f8 in __pthread_mutex_unlock(0x0, 0x0, 0x3ffc0181580,
        0x3ffc018a968, 0x0, 0x3ff80575618)
        DebugInformationStrippedFromFile111:???
#2  0x3ff80575614 in UnknownProcedure5FromFile103(0x3ffc0181580,
        0x3ffc018a968, 0x0, 0x3ff80575618, 0x3ff800d6904, 0x3ffc0187760)
        DebugInformationStrippedFromFile103:???
#3  0x3ff800d6900 in fflush(0x3ff800d6904, 0x3ffc0187760, 0x3ff80565cfc,
        0x3ffc018a968, 0x3ffc0187768, 0x0)
        DebugInformationStrippedFromFile84:???
#4  0x3ff80565cf8 in errBugcheck(0x3ffc0185da0, 0x3ffc01700d8, 0x4, 0x26e,
        0x0, 0x3ffc018aae0) DebugInformationStrippedFromFile90:???
#5  0x3ff8057bcd4 in UnknownProcedure26FromFile109(0x0, 0x14014b438,
        0x3ffc018a968, 0x3ffc018a968, 0x1, 0x14014b438)
        DebugInformationStrippedFromFile109:???
#6  0x3ff8057b0d8 in UnknownProcedure20FromFile109(0x500, 0x1f4, 0x1,
        0xffffffffdfbbee16, 0x1f4, 0x14014b478)
        DebugInformationStrippedFromFile109:???
#7  0x3ff80535200 in msg_receive(0x0, 0x3ffc018abf0, 0x0, 0x0, 0x3ffc018a968,
        0x0) DebugInformationStrippedFromFile6:???
#8  0x3fefffffffd in ???

Note that frame #8 above is not readable.  This is to be expected because the
problem is occuring in an "upcall" frame.  (This "upcall" frame is used by the
kernel to call into user space to perform an operation.) Note that frame #4
above contains the DECthreads bugcheck call, but als note that it eventually
calls pthread_mutex_unblock() (frame #0 above). This call to ed_mutex_unblock()
hangs because it is incorrect to call pthread_mutex_unblock() within the context
of an upcall.

PROBLEM:  (QAR 51214) (Patch ID: OSF400-210)
********
A threaded application might hang while attempting to issue a message from the
DECthreads bugcheck.  A stack trace of a thread in this state will contain
frames for calls to the routines errBugcheck(), fflush() and
pthread_mutex_unblock().

A typical stack trace for this problem might look like the following:

 (ladebug) t
>0  0x3ff80568b20 in pthread_mutex_unblock(0x3ffc00802a0, 0x0, 0x0,
0x3ffc0181580, 0x3ffc018a968, 0x0) DebugInformationStrippedFromFile95:???
#1  0x3ff8057c1f8 in __pthread_mutex_unlock(0x0, 0x0, 0x3ffc0181580,
0x3ffc018a968, 0x0, 0x3ff80575618) DebugInformationStrippedFromFile111:???
#2  0x3ff80575614 in UnknownProcedure5FromFile103(0x3ffc0181580,
0x3ffc018a968, 0x0, 0x3ff80575618, 0x3ff800d6904, 0x3ffc0187760)
DebugInformationStrippedFromFile103:???
#3  0x3ff800d6900 in fflush(0x3ff800d6904, 0x3ffc0187760,
0x3ff80565cfc, 0x3ffc018a968, 0x3ffc0187768, 0x0)
DebugInformationStrippedFromFile84:???
#4  0x3ff80565cf8 in errBugcheck(0x3ffc0185da0, 0x3ffc01700d8, 0x4,
0x26e, 0x0, 0x3ffc018aae0) DebugInformationStrippedFromFile90:???
#5  0x3ff8057bcd4 in UnknownProcedure26FromFile109(0x0, 0x14014b438,
0x3ffc018a968, 0x3ffc018a968, 0x1, 0x14014b438)
DebugInformationStrippedFromFile109:???
#6  0x3ff8057b0d8 in UnknownProcedure20FromFile109(0x500, 0x1f4, 0x1,
0xffffffffdfbbee16, 0x1f4, 0x14014b478)
DebugInformationStrippedFromFile109:???
#7  0x3ff80535200 in msg_receive(0x0, 0x3ffc018abf0, 0x0, 0x0,
0x3ffc018a968, 0x0) DebugInformationStrippedFromFile6:???
#8  0x3fefffffffd in ???

Note that frame #8 above is not readable.  This is to be expected because the
problem is occuring in an "upcall" frame.  (This "upcall" frame is used by the
kernel to call into user space to perform an operation). Note that frame #4
above contains the DECthreads bugcheck call, but also note that it eventually
pthread_mutex_unblock() hangs because it is incorrect to call
pthread_mutex_unblock() within the context of an upcall.

PROBLEM: (EVMS-GRYPHON-FT QAR 00237) (Patch ID: OSF400-210)
********
This patch fixes a situation where threads would hang in pthread_once() or
cma_once() routines.

The DECthreads routines pthread_once() and cma_once() use the DECthreads global
mutex.  The first thread to call pthread_once() or cma_once() would lock this
mutex and subsequent threads calling pthread_once() or cma_once() would hang.
This problem was fixed on OpenVMS and the patch has been ported to Digital
UNIX 4.0.

PROBLEM: (IPMT HPAQ11MMTG) (Patch ID: OSF400-210)
********
For the signals traditionally representing synchronous errors in a program
DECthreads catches the signal and converts it into an equivalent exception.
Digital UNIX 4.0 attempts to print an abort message for an unhandled exception.
If an unhandled exception occurs in a libc library I/O routine, the thread
causing the exception may hang in abort() because of a deadlock over an I/O
mutex.

PROBLEM:  (QAR 52332, 51161)             (Patch ID: OSF400-226)
********
This patch corrects problems encountered when using signals with multithreaded
programs.  It is possible for threaded applications to lose signals on occasion.

PROBLEM:  (QAR 52339)                    (Patch ID: OSF400-226)
********
This patch corrects a random memory corruptor in multithreaded applications.

PROBLEM:  (IPMT HPAQ309UJ)               (Patch ID: OSF400-226)
********
This patch corrects problems encountered where multithreaded applications
fail to create threads with user allocated stacks.

PROBLEM:  (HPAQ31FCB)                   (Patch ID: OSF400-064)
********
This patch fixes a problem with the mkpasswd command. Hashed password database
files (for example, /etc/passwd.pag and /etc/passwd.dir) are deleted before new
database files are created.

To recreate the problem, complete the following steps:
1. Log in as root.
2. Select a very large password file and enter the following command:
      ls -l /etc/passwd*
3. Verify the byte count of the /etc/passwd.pag and /etc/passwd.dir files.
4. Enter the following command:
      mkpasswd -v /etc/password
5. While the mkpasswd command is running, open another window and
   verify the byte count of the /etc/passwd.pag and /etc/passwd.dir
   files. Note that these files will be removed before new ones
   are created.

PROBLEM:  (HPAQB17NM, QAR 50343, QAR 49427, QAR 52143) (Patch ID: OSF400-227)
********
When the /etc/passwd files are very large, a performance degradation may occur.

When the number of passwd entries reaches up into the 30,000 to 80,000 range,
mkpasswd will sometimes fail to create an ndbm database.  Since the purpose of
this database is to allow for efficient (fast) searches for passwd file
information, failure to build it causes a serious performance degradation for
commands that rely on it.

The change to the mkpasswd command creates one potential database compatibility
problem.  If a customer application that accesses the password database created
by mkpasswd is built static, i.e., non-shared, that application will be unable
to read from or write to the password database correctly.  This would cause
the customer application to fail either by generating incorrect results or 
by possibly dumping core.  Any staticly linked application that directly or
indirectly calls any of the libc ndbm routines documented in the ndbm(3) man 
page and then accesses the password database would be affected.  To remedy 
this situation, the customer would need to re-link the application using the
libc.a supplied with this patch.

PROBLEM:  (QAR 45580)           (Patch ID: OSF400-239)
********
Multithreaded applications that call the pthread_mutex_destroy routine may
fail when there are no threads referencing the mutex.  This is caused by
a race condition inside the pthread_mutex_unlock code.  The typical symptom
will be a return value of EBUSY from pthread_mutex_destroy.

*** NOTE ***
Applications using "inline" mutex operations, as described in the pthread.h
header file, will need to RECOMPILE with the application of this patch.
The instruction sequences for the pthread_mutex_unlock routine have changed.

Please refer to the existing note in pthread.h entitled "NOTICE: inline function
performance vs. binary compatibility" for more information.

PROBLEM:  (QAR 52332)            (Patch ID: OSF400-239)
********
Over time, a multithreaded application may find that asynchronous signals are
not being delivered to it.  The asynchronous signal may have originated outside
the application or from within it. The effect will be that the signal is
pending against a thread, the thread will NOT have the signal blocked, but it
will not be delivered to that thread.

PROBLEM: (QAR 00237)            (Patch ID: OSF400-241)
********
This patch fixes a situation where threads would hang in the DECthreads POSIX
1003.41/Draft 4 (d4) interface's pthread_once() routine.

The d4 legacy routine pthread_once() uses the DECthreads global mutex.
The first thread to call pthread_once() would lock this mutex and
subsequent threads calling pthread_once() would hang.  This problem
was fixed on OpenVMS and the patch has been ported to Digital UNIX 4.0.

PROBLEM:  (QAR 52405, QAR 52710)	 (Patch ID: OSF400-261)
********
The problem this patch fixes shows up only in multithreaded applications.
File descriptors opened by the application may unexpectedly be closed when NIS
or RPC services are called, either directly or through remote database lookups
(e.g., getpwent()).  Subsequent I/O operations on the applications file
descriptor will typically produce an error with errno set to EBADF.

PROBLEM:  (QAR 52450, QAR  52464)	 (Patch ID: OSF400-261)
********
The problem this patch fixes will only show up in multithreaded applications.
The problem symptoms are that heavy usage of any of the several database
lookup functions such as getpwent() and getprotoent(), from multiple short-lived
threads, may eventually result in the application getting a segmentation
violation, core dumping, and exiting.

PROBLEM:  (QAR 52810,40239,53048) (Patch ID: OSF400-284)
********
This patch is mandatory for JAVA applications.

This patch fixes a problem where conversion from double-precision floating
point numbers to single-precision floating point numbers may not round
properly in IEEE mode when the result should be the smallest denormal.

More specifically, software completion of the Alpha CVTTSSU instruction does
not properly round the result when the input double value is between the
smallest S-float denormal and 1/2 the smallest S-float.

For example:

   double d = 1.5E-45;
   double f;
   f = d;

   The result should be:1.40129846E-45
   The result before the patch is 0.0.

PROBLEM:  (QAR 52294, CLD SDT-1335) (Patch ID: OSF400-293)
********
There is a problem with the F_exp(), the fast exponentiation function,
and the F_pow(), the fast math power function, in the way that they
handle underflow arguments.

For certain arguments, a calls to F_exp() and F_pow() result in a
floating-point exceptions.

PROBLEM:  (CLD HPAQ30CW2, QAR 51943)	 (Patch ID: OSF400-302)
********
This patch fixes a problem in which the rcmd function may cause the system
to dump core.  User applications that produce a call to rcmd() may experience
this problem.  Typically, the application has calls to either the fget()
or fclose() function.

PROBLEM:  (QAR 53701)		 (Patch ID: OSF400-307)
********
In applications linked with -pthreads, the process signal mask is being lost
(set to zero) in the child process following a fork() operation.

PROBLEM:  (QAR 53767)		 (Patch ID: OSF400-307)
********
Occasionally, under certain load condtions, a DECthreads bugcheck occurs
in pthread_kill().  This results in a core dump.

PROBLEM:  		(Patch ID: OSF400-331)
********
When the /etc/passwd file is very large, a performance degradation may occur.

When the number of passwd entries reaches up into the 30,000 to 80,000 range
or greater, mkpasswd will sometimes fail to create a hashed (ndbm) database.
Since the purpose of this database is to allow for efficient (fast) searches
for passwd file information, failure to build it causes commands that rely
on it to do a linear search of /etc/passwd.  This results in a serious per-
formance degradation for those commands.

For customers choosing to use the mkpasswd -s option to avoid this type of
failure, a potential database/binary compatibility problem may arise.  If a
customer application that accesses the password database created by mkpasswd
is built statically (non-shared), that application will be unable to read
from or write to the password database correctly.  This would cause the
customer application to fail either by generating incorrect results or by
possibly dumping core.  Any statically linked application would be affected
if it directly or indirectly calls any of the libc ndbm routines documented
in the ndbm(3) man page and then accesses the password database.  To remedy
this situation, the customer would need to re-link the application.

Customers who do not use the mkpasswd -s option will not see this database/
binary compatibility problem.

PROBLEM:  (QAR 53135,44398)		 (Patch ID: OSF400-323)
********
This patch fixes a TCP/IP problem that can occur with programs linked with
the libc library. These programs may return a value of (-1) when calling
the svc_tcp() function.

This problem occurs because a return value, EINTR, is ignored in the readtcp()
and writetcp() functions. The patch involved checking for this return before
continuing a readtcp() and writetcp().

PROBLEM:  (QAR 53589)		 (Patch ID: OSF400-334)
********
In applications linked with -pthreads, the parent and child processes of
a fork() operation may be seen to hang if an exception occurs during fork()
processing.

PROBLEM:  (QAR 52093)		 (Patch ID: OSF400-341)
********
The openpty() routine in libc doesn't handle signal logic correctly.
This can cause the following problem to occur when using the EMACS editor.
If you use the command "M-X shell" to start up a shell in a buffer, then
you will sometimes see the message:

  Warning: no access to tty; thus no job control in this shell...

PROBLEM:  (Patch ID: OSF400-348)
********
The mkpasswd command dumps core when user just types 'mkpasswd -s' with no
other arguments.  It also wasn't using the page block size of an existing
database if the -s option was not specified.

PROBLEM:  (QAR 52294, CLD SDT-1335)	 (Patch ID: OSF400-362)
********
There is a problem with the F_exp(), the fast exponentiation function, and
the F_pow(), the fast math power function, in the way that they handle
underflow arguments.

For certain arguments, a calls to F_exp() and F_pow() result in floating-point
exceptions accompanied by core dumps.

PROBLEM: (QAR 55232)		 (Patch ID: OSF400-372) 
********
Broadcasts of a condition variable was occassionally being lost, even though
there were threads actually waiting on that condition variable.  The result
was that threads would never receive notice to unblock and start running
again.  This problem is most evident on multiprocessor systems.

PROBLEM: (QAR 55647)		 (Patch ID: OSF400-372) 
********
During the search for exception handlers, DECthreads unwound the stack and,
in the process, removed the stack frame in which the exception occurred. 
The result was an incorrect stack trace with missing frames.

PROBLEM:  (QAR 51274, HPAQC0X4J)	 (Patch ID: OSF400-393)
********
The multiplication of 2 single precision floating point numbers in ieee
mode when the result prior to rounding is the largest denormal will cause
the IEEE emulator to fail with the message:

    FATAL IEEE FLOATING POINT EMULATION ERROR:
    unf:  "UNEXPECTED 2nd execution calls underflow"

Compile the following program with the command
"cc  -float -ieee emerror.c -o emerror":
#include <stdio.h>
 /* This code causes the IEEE emulator to fail with the
  * message indicated below:
  FATAL IEEE FLOATING POINT EMULATION ERROR:
  floating_underflow:  "UNEXPECTED 2nd execution calls underflow"
  * The -ieee and either (-float  or -std1 ) switch is imperative.
  * cc -ieee -float emerror.c -o emerror
  */
 main(){
     float fr,fi,gi,gr,ci;
     sscanf("0 80020c18 bf7fffff 80800000", "%x%x%x%x", &fr, &gi, &fi, &gr);
     printf("%s=%18.9e (%08x)\n","fr",fr,*(int*)&fr);
     printf("%s=%18.9e (%08x)\n","gi",gi,*(int*)&gi);
     printf("%s=%18.9e (%08x)\n","fi",fi,*(int*)&fi);
     printf("%s=%18.9e (%08x)\n","gr",gr,*(int*)&gr);
     ci = fr*gi + fi*gr;
     printf("%s=%18.9e (%08x)\n","ci",ci,*(int*)&ci);
 }
Results before applying the patch:
fr=   0.000000000e+00 (00000000)
gi=  -1.880094124e-40 (80020c18)
fi=  -9.999999404e-01 (bf7fffff)
gr=  -1.175494351e-38 (80800000)
FATAL IEEE FLOATING POINT EMULATION ERROR:
unf:  "UNEXPECTED 2nd execution calls underflow"
   pc:    0xfffffc000060e368
  ins: 0x20001274
  op1: 0x5ad9b01a
  op2: 0x800000000Killed

Results after applying the patch: (a kernel reboot is necessary)
fr=   0.000000000e+00 (00000000)
gi=  -1.880094124e-40 (80020c18)
fi=  -9.999999404e-01 (bf7fffff)
gr=  -1.175494351e-38 (80800000)
ci=   1.175494351e-38 (00800000)

PROBLEM: (QAR 55153)		 (Patch ID: OSF400-400)
********
There is a problem in the statically initialized mutex operations.  If the
preprocessor symbol _PTHREAD_NOMETER_STATIC is not defined, a statically
initialized mutex makes a call into DECthreads before it attempts to lock
or to unlock for the first time. This call provides metering information.
If the metering is not enabled, the mutex, in its subsequent attemps to 
lock or to unlock, will not make the call into DECthreads unless there is
contention. There was a bug in the call which is causing the mutex to make
the call every time it attempt to lock or to unlock.  The bug results into
slow mutex operations.  The dynamically initialized mutex operations are
unaffected by the bug. The fix helps all statically initialized mutex 
operations that do not use metering.

PROBLEM:  			(Patch ID: OSF400-402)
********
A call to the libc dbm_open() routine followed immediately by a call to
dbm_close() causes hashed database directory files to be truncated and
applications that do such a thing to fail.

PROBLEM: (CLD HPAQA0X6X) 	(Patch ID: OSF400-403)
********
There is a bug in the DECthreads libpthread library for Digital UNIX 4.0
and later that is manifested by calling pthread_cond_timedwait() with
an pthread_cond_timedwait() with an unusually large timeout value 
(greater than 23 days).  The symptom is that the threaded program takes
up a significant amount of CPU time (close to 100%). The bug does not
occur if the timeout value is either less than 2,000,000 seconds or more
than 5,000,000 seconds. With the fix, pthread_cond_timedwait() can be
called with any timeout value.

PROBLEM:  (QAR 56298)		 (Patch ID: OSF400-408)
********
There is a problem in the Bind (Domain Name Service) patch which may cause
incorrect messages to be reported from certain networking related applications
and from certain networking related functions in the C runtime library.
It may also cause segmentation violations in existing statically linked
applications using the US english message catalog, and in dynamically linked
applications using non-english message catalogs.  In all cases the problem will
only occur if the LANG environment variable is set.

PROBLEM:  (QAR 48541)		 (Patch ID: OSF400-410)
********
Executables that are explicitly linked call_shared with the archive version
of libc (libc.a) and *not* the shared library version of libc (libc.so) may
have problems using libc features that are supported by the loader.  These
loader features are documented in the loader(5) man page in the section that
describes the low level _rld_new_interface() routine and includes running
the application's fini routines (if any) and proper functioning of the dl*
routines such as dlopen(3).

One might be able to identify this problem by using the debugger to set a 
breakpoint in the _rld_new_interface() routine and running the application
with the failing loader feature(s). If the breakpoint is hit and the 
_rld_new_interface() is simply doing a return, the libc archive version of
_rld_new_interface() which is defined in ldr_dummy.o is being run instead
of being preempted by a call into the loader.  Relinking the application
with the patched version of libc.a should correct this problem.

PROBLEM:  (GOZ100846)		 (Patch ID: OSF400-417)
********
If the server to which an auditd daemon has been configured to send its audit
information becomes unavailable, the local auditd daemon cpu usage rises
dramatically.

PROBLEM:  (QAR 52255,52836,55617)	 (Patch ID: OSF400-430)
********
This patch fixes a problem in which RPC client functions do not correctly handle
system calls interrupted by a signal (EINTR errors).

If a multi-threaded RPC client process catches a signal, a read or write to an
RPC socket can get interrupted, and the RPC operation fails.

PROBLEM:  (QAR 56286)		 (Patch ID: OSF400-448)
********
There is a problem with the readdir function in that the readdir_r() function
reads past the end of its input buffer.

The readdir_r() function is using memcpy to copy data that's partly off the
end of its internal buffer.  This happens when the buffer is close to an
an unmapped page.


FILE(s):

/usr/sbin/auditd                           subset OSFBASE400
CHECKSUM: 01055    504     RCSfile: auditd.c       RCS: 1.1.8.6
/sys/BINARY/fp.mod                         subset OSFBIN400
CHECKSUM: 01768     69 
/sbin/halt              		   subset OSFBASE400
CHECKSUM: 47796    352     RCSfile: halt.c         RCS: 4.2.18.4
/usr/ccs/lib/libc.a                        subset OSFCMPLRS400
CHECKSUM: 26474   1954 
/usr/ccs/lib/libc_r.a                      subset OSFCMPLRS400
CHECKSUM: 26474   1954 
/usr/lib/nls/msg/en_US.ISO8859-1/libc.cat  subset OSFBASE400
CHECKSUM: 06660     13
/shlib/libc.so                             subset OSFBASE400
CHECKSUM: 22278   1543 
/shlib/libc_r.so                           subset OSFBASE400
CHECKSUM: 22278   1543 
/usr/shlib/libexc.so                       subset OSFBASE400
CHECKSUM: 47269     48
/usr/shlib/libpthread.so                   subset OSFBASE400
CHECKSUM: 11178    416 
/usr/shlib/libpthreads.so                  subset OSFBASE400
CHECKSUM: 26748    120
/usr/shlib/libpthreaddebug.so              subset OSFBASE400
CHECKSUM: 16295    144 
/sbin/ls                                   subset OSFBASE400
CHECKSUM: 10393    416     RCSfile: ls.c           RCS: 4.3.23.6
                           RCSfile: flsbuf.c       RCS: 4.2.15.2
                           RCSfile: errlst.c       RCS: 4.2.9.2
                           RCSfile: __lc_dlsym.c   RCS: 1.1.2.5
                           RCSfile: sia_globals.c  RCS: 1.1.11.2
                           RCSfile: dlsym.c        RCS: 1.1.2.5
/usr/sbin/mkpasswd                         subset OSFBASE400
CHECKSUM: 06128     24     RCSfile: mkpasswd.c     RCS: 4.2.17.5 
/sbin/mount                                subset OSFBASE400
CHECKSUM: 07139    512     RCSfile: mountxdr.c     RCS: 4.2.7.2
                           RCSfile: mountxdr_v3.c  RCS: 1.1.2.3
                           RCSfile: mount.c        RCS: 4.3.42.18
                           RCSfile: mountxcdr.c    RCS: 1.1.2.4
/usr/sbin/mount         		   subset OSFBASE400
CHECKSUM: 12875     56     RCSfile: mountxdr.c     RCS: 4.2.7.2
/usr/sbin/umount                           subset OSFBASE400
CHECKSUM: 63922     24     RCSfile: umount.c       RCS: 4.2.18.2
/sbin/umount            		   subset OSFBASE400
CHECKSUM: 37134    336     RCS: umount.c      Revision: 4.2.18.2
/usr/bin/nslookup                          subset OSFCLINET400
CHECKSUM: 33376     96
/usr/lib/nls/msg/en_US.ISO8859-1/nslookup.cat subset OSFCLINET400
CHECKSUM: 10924      7
/sbin/reboot            		   subset OSFBASE400
CHECKSUM: 27445    336     RCSfile: reboot.c       RCS: 4.2.16.3
/usr/bin/uudecode               	   subset OSFBASE400
CHECKSUM: 56566    360     RCSfile: uudecode.c     RCS: 4.3.11.3
/usr/lbin/upd_merge             	   subset OSFBASE400
CHECKSUM: 64700    384 
/usr/sys/include/arch/alpha/fpu.h          subset OSFBINCOM400
CHECKSUM:  17133     12
/usr/sbin/ypbind                           subset OSFCLINET400
CHECKSUM: 50576    328     RCSfile: ypbind.c       RCS: 4.2.7.3
