This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

mmap broken in glibc 2.2?



I configured glibc 2.2 CVS with kernel headers from 2.3.39 - but run a
2.2.13 kernel.  tst-mmap fails:
LD_LIBRARY_PATH=. elf/ld-linux.so.2 posix/tst-mmap 
Segmentation fault

strace reports:
mmap(NULL, 1000, PROT_READ, MAP_SHARED, 3, 0xfff) = -1 EINVAL (Invalid argument)
mmap(NULL, 1000, PROT_READ, MAP_PRIVATE, 3, 0xfff) = -1 EINVAL (Invalid argument)
brk(0x8001a000)                         = 0x8001a000
mmap(0x80016171, 1000, PROT_READ, MAP_SHARED|MAP_FIXED, 3, 0x1000) = -1 EINVAL (Invalid argument)
SYS_192(0x80016171, 0x3e8, 0x1, 0x11, 0x3) = -1 ENOSYS (Function not implemented)
mmap(0x80016171, 1000, PROT_READ, MAP_SHARED|MAP_FIXED, 3, 0x1000) = -1 EINVAL (Invalid argument)
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++



gdb shows:
(gdb) 
113           ptr = mmap64 (mem + 1, 1000, PROT_READ, MAP_SHARED | MAP_FIXED, fd, ps);
(gdb) n

Program received signal SIGSEGV, Segmentation fault.
0x11 in ?? ()

Is the mmap64 emulation broken?  This might affect glibc 2.1.3 also
(2.1.3 doesn't have tst-mmap but the same mmap64 code AFAIK).

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]