Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 3738 - pthread lib not compatible
Summary: pthread lib not compatible
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 6.0
Hardware: i386
OS: Linux
high
high
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-06-25 23:17 UTC by brownb
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-07-09 21:33:46 UTC


Attachments (Terms of Use)

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
        {
          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
modifies
memory off the end of the space the program allocated for the sem_t
object.

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

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.

                                bob

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


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