Bug #162

[apr] 1.4.6-1 check fails

mtjm - almost 9 years ago - . Updated about 5 years ago.

% Done:



A segmentation fault, needs debug symbols.



Updated by mtjm almost 9 years ago

GDB shows this:

mtjm@earendil:~/apr/src/apr-1.4.6/test$ gdb ./testall
GNU gdb (GDB) 7.4.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying" 
and "show warranty" for details.
This GDB was configured as "mips64el-unknown-linux-gnu".
For bug reporting instructions, please see:
/home/mtjm/.gdbinit:1: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
Reading symbols from /home/mtjm/apr/src/apr-1.4.6/test/testall...done.
(gdb) b mmap64
Function "mmap64" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (mmap64) pending.
(gdb) r testlfs
Starting program: /home/mtjm/apr/src/apr-1.4.6/test/testall testlfs
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/".
testlfs             : -
Breakpoint 1, 0x77e92a00 in mmap64 () from /lib/
(gdb) frame 1
#1  0x77f99ea8 in apr_mmap_create (new=0x7fff2c74, file=0x100b0528, offset=8589869056, size=65536, flag=1, cont=0x100b00a0) at mmap/unix/mmap.c:133
133         mm = mmap(NULL, size, native_flags, MAP_SHARED, file->filedes, offset);
(gdb) print size
$1 = 65536
(gdb) print offset
$2 = 8589869056
(gdb) n
Single stepping until exit from function mmap64,
which has no line number information.
apr_mmap_create (new=0x7fff2c74, file=0x100b0528, offset=8589869056, size=65536, flag=1, cont=0x100b00a0) at mmap/unix/mmap.c:135
135         if (mm == (void *)-1) {
(gdb) print mm
$3 = (void *) 0xffffffff
(gdb) print errno
$4 = 22

The thread of suggested this being caused by offset not divisible by page size, but it is divisible here (16K pages).

Changing the offset to 0 or 65536 makes the mmap succeed (and the test fail), so this is probably related to long filename support.


Updated by Anonymous about 5 years ago

  • Project changed from 3 to Ports

Also available in: Atom PDF