This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
glibc-2.3.4 .so on glibc-2.6.1 system = mmap error
- From: "Michael B Allen" <ioplex at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Mon, 28 Apr 2008 20:36:20 -0400
- Subject: glibc-2.3.4 .so on glibc-2.6.1 system = mmap error
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=N68wjYNXGZ9WNhIx58GxrJq89BLasgQeahRBVy3gLGU=; b=o0WRuWFXVY75gez1Hic1PJYrh3drWs3/xVLlF7N0q4xcCDCDdSpaXVkYhENFA6O4B1UtX/t1mdWivh8EFswUq+IlYhip2MY28EpRmfgEgSNyauTEbWpo/aaqf6+/REz0eaAAUSmsUxKBR3bVc/LnIc0HyN7LbDHAxLHl+/VnWWM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=PS6mukCOy0xrWMLCy452PkQh0leKdhwIc0NGvnSqMZl4FpLht3RQVkBYRIDb+y9fdxkDyKUA2Py+noOaZbN+JplEb96sTXdKgJFoCi/MzRvIBZZvoyE6ieUw/RXFYqtOB4Ywp75xDWLsQSV0/BokM9UUvhvVpfO18NDUqu6aCa4=
Hi,
I'm glad to see the new list. Hopefully people are listening ...
I compiled a .so on a glibc-2.3.4 system (CentOS 4 - 2.6.9) cleanly
but when I try to run it on a glibc-2.6.1 system (OpenSUSE 10.3 -
2.6.22) mmap either returns MAP_FAILED w/ errno = ENOMEM or succeeds
but the memory isn't what it should be. It runs fine on a glibc-2.5
system (CentOS 5.0 - 2.6.18) and if I compile it on the same glibc-2.5
system it works on the glibc-2.6.1 system. It's only the 2.3 library
that blows up on 2.6.
Does anyone have any suggestions or diagnostics that might help
identify the problem?
I would like my code to work on a wide range of systems.
System and library details inlined below.
Mike
--8<-- CentOS 4
This is the system the library (libplexcel.so) was compiled on:
[root@ls6 ~]# uname -a
Linux ls6.foo.net 2.6.9-67.0.7.EL #1 Sat Mar 15 06:19:46 EDT 2008
x86_64 x86_64 x86_64 GNU/Linux
[root@ls6 ~]# rpm -qa | grep glibc
glibc-common-2.3.4-2.39
glibc-2.3.4-2.39
glibc-headers-2.3.4-2.39
glibc-2.3.4-2.39
glibc-kernheaders-2.4-9.1.100.EL
glibc-devel-2.3.4-2.39
[root@ls6 ~]# objdump -T /lib64/tls/libc.so.6 | grep mmap
00000036fa0c40c0 w DF .text 000000000000002b GLIBC_2.2.5 mmap
00000036fa0c40c0 w DF .text 000000000000002b GLIBC_2.2.5 mmap64
[root@ls6 ~]# objdump -T /usr/lib64/libplexcel.so | grep mmap
0000000000000000 DF *UND* 000000000000002a GLIBC_2.2.5 mmap
--8<-- OpenSUSE 10.3
This is the system on which libplexcel.so's call to mmap returns
MAP_FAILED or garbage:
ls4:~ # uname -a
Linux ls4 2.6.22.5-31-default #1 SMP 2007/09/21 22:29:00 UTC x86_64
x86_64 x86_64 GNU/Linux
ls4:~ # rpm -qa | grep glibc
glibc-i18ndata-2.6.1-18
glibc-locale-2.6.1-18
glibc-32bit-2.6.1-18
glibc-2.6.1-18
glibc-locale-32bit-2.6.1-18
ls4:~ # objdump -T /lib64/libc.so.6 | grep mmap
00000000000c22e0 w DF .text 0000000000000028 GLIBC_2.2.5 mmap64
00000000000c22e0 w DF .text 0000000000000028 GLIBC_2.2.5 mmap
ls4:~ # objdump -T /usr/lib64/libplexcel.so | grep mmap
0000000000000000 DF *UND* 000000000000002a GLIBC_2.2.5 mmap
--8<-- CentOS 5.0
This is the glibc-2.5 system on which the library runs fine. The
library runs fine on the glibc-2.6 system if I compile it on this
system.
[ioplex@s0 ~]$ uname -a
Linux s0.foo.net 2.6.18-8.1.14.el5 #1 SMP Thu Sep 27 19:05:32 EDT 2007
x86_64 x86_64 x86_64 GNU/Linux
[ioplex@s0 ~]$ rpm -qa | grep glibc
glibc-2.5-12
glibc-headers-2.5-12
glibc-2.5-12
glibc-devel-2.5-12
glibc-common-2.5-12
[ioplex@s0 ~]$ objdump -T /lib64/libc.so.6 | grep mmap
0000003a030ca250 w DF .text 0000000000000028 GLIBC_2.2.5 mmap64
0000003a030ca250 w DF .text 0000000000000028 GLIBC_2.2.5 mmap