Bug 3738 - pthread lib not compatible
pthread lib not compatible
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
i386 Linux
high Severity high
: ---
: ---
Assigned To: Cristian Gafton
Depends On:
  Show dependency treegraph
Reported: 1999-06-25 19:17 EDT by brownb
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1999-07-09 17:33:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description brownb 1999-06-25 19:17:49 EDT
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 17:19:59 EDT
Do you have example code that breaks between glibc 2.0 and glibc 2.1?
Comment 2 Cristian Gafton 1999-07-08 22:37:59 EDT
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 17:33:59 EDT
Fixed in glibc-2.1.2-1

Note You need to log in before you can comment on or make changes to this bug.