Bug 3738

Summary: pthread lib not compatible
Product: [Retired] Red Hat Linux Reporter: brownb
Component: glibcAssignee: Cristian Gafton <gafton>
Severity: high Docs Contact:
Priority: high    
Version: 6.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-07-09 21:33:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description brownb 1999-06-25 23:17:49 UTC
The pthread library has changed the size of some data
structures, such as sem_t, but the major version number on
the shared library was not incremented.  Hence, old RH 5.1
binaries that use semaphores segfault on RH 6.0.  Lack of
backward compatibility is a disaster, since it makes
upgrading machines much harder.

Comment 1 Cristian Gafton 1999-07-02 21:19:59 UTC
Do you have example code that breaks between glibc 2.0 and glibc 2.1?

Comment 2 Cristian Gafton 1999-07-09 02:37:59 UTC
Reply from the e-mail message:

Here is the sem_t structure definition from the include files of Red
Hat 5.1.
It's defined in /usr/include/semaphorebits.h.

        typedef struct {
          long int sem_status;
          int sem_spinlock;
        } sem_t;

Here is the Red Hat 6.0 version, from file /usr/include/semaphore.h.

        typedef struct
            long int status;
            int spinlock;
          } __sem_lock;
          int __sem_value;
          _pthread_descr __sem_waiting;
        } sem_t;

You'll notice that the second structure is larger than the first.
When a Red
Hat 5.1 program runs on Red Hat 6.0 and calls sem_init, the function
memory off the end of the space the program allocated for the sem_t

Since the size of the data structure changed, the shared object should
been versioned, so that old programs got the older version of

Is this enough explanation?  All of the real applications that break
in my
environment are GUI tools.  If needed I could write a test program
demonstrating the problem.


Comment 3 Cristian Gafton 1999-07-09 21:33:59 UTC
Fixed in glibc-2.1.2-1