This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 20997 - Symbol version problem in libpthread
Symbol version problem in libpthread
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
7.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-11-16 23:39 EST by Red Hat Bugzilla
Modified: 2008-03-13 15:18 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-11-18 21:13:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
The testcase (802 bytes, application/octet-stream)
2000-11-16 23:39 EST, Red Hat Bugzilla
no flags Details
A patch (3.03 KB, patch)
2000-11-18 03:43 EST, Red Hat Bugzilla
no flags Details | Diff

  None (edit)
Description Red Hat Bugzilla 2000-11-16 23:39:09 EST
Symbols, pread, __pread64, pread64, pwrite, __pwrite64, pwrite64, lseek64
and open64, have
version name GLIBC_2.2 in libpthread. But they have version name GLIBC_2.1
in libc. Their
version names are different. As the result, the wrong functions can be
called in a thread
application. I will attach a testcase here.

# make
cc -g -O   -c -o test.o test.c
cc -o foo.o -c -g -O -fPIC foo.c
ar rv libfoo.a foo.o
a - foo.o
cc -o test1 test.o libfoo.a -lpthread
cc -shared -o libfoo.so foo.o
cc -o test2 test.o libfoo.so -lpthread -Wl,-rpath,.
test1:
        `__pwrite64' is bound to /lib/libc.so
test2:
        `pread' is bound to /lib/libc.so
        `__pread64' is bound to /lib/libc.so
        `pread64' is bound to /lib/libc.so
        `pwrite' is bound to /lib/libc.so
        `__pwrite64' is bound to /lib/libc.so
        `pwrite64' is bound to /lib/libc.so
        `lseek64' is bound to /lib/libc.so
        `open64' is bound to /lib/libc.so

They all are supposed to be bound to libpthread, but they are bound to libc
instead.
Comment 1 Red Hat Bugzilla 2000-11-16 23:39:42 EST
Created attachment 5480 [details]
The testcase
Comment 2 Red Hat Bugzilla 2000-11-18 03:43:03 EST
Created attachment 5500 [details]
A patch
Comment 3 Red Hat Bugzilla 2000-11-18 03:44:23 EST
I submitted a patch. It seems to work for me.
Comment 4 Red Hat Bugzilla 2000-11-18 15:40:48 EST
Unless Ulrich accepts this into CVS, I don't want to put this in,
since it would just cause us to be incompatible with everyone else
(binaries compiled with -lpthread on systems with your patch
would not use the cancelation wrappers on systems without it).
Comment 5 Red Hat Bugzilla 2000-11-18 21:13:52 EST
As it stands today, glibc 2.2 is broken with thread applications. So far, Ulrich
hasn't
acknowledged it is a bug. If he doesn't see it as bug, which I believe it is, I
don't
know if he will accept it into CVS.

BTW, thread applications with glibc 2.2 may not use the cancelation wrappers
today.
At least, it won't happen on systems with my patch installed.

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