--- Begin Message ---
Subject: |
Freetype2 Bug: does not work on some .gz files |
Date: |
Mon, 27 Jan 2003 11:56:42 +0100 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) XEmacs/21.4 (Native Windows TTY Support (RC1), x86_64-suse-linux) |
address@hidden:/tmp/ttt$ ls
No files there. Make an empty file with a name 3 letters long
and try to open it with ftdump (from freetype2):
address@hidden:/tmp/ttt$ touch 012; gzip 012; ftdump 012.gz
Could not open face.
error = 0x0055
address@hidden:/tmp/ttt$
I.e. this seems to work OK, ftdump correctly recognizes that this
is not a font file and exits.
But if I make an empty file with a long enough file name, for example
10 letters
address@hidden:/tmp/ttt$ touch 0123456789 ; gzip 0123456789; ftdump
0123456789.gz
ftdump never returns. strace looks like this:
address@hidden:/tmp/ttt$ strace ftdump 0123456789.gz
execve("/usr/bin/ftdump", ["ftdump", "0123456789.gz"], [/* 71 vars */]) = 0
uname({sys="Linux", node="magellan", ...}) = 0
brk(0) = 0x502000
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/lib64/x86_64/libfreetype.so.6", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat("/usr/lib64/x86_64", 0x7fbfffe860) = -1 ENOENT (No such file or
directory)
open("/usr/lib64/libfreetype.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\366"..., 1024)
= 1024
fstat(3, {st_mode=S_IFREG|0755, st_size=460474, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2a95569000
mmap(NULL, 1458456, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2a9566b000
mprotect(0x2a956bf000, 1114392, PROT_NONE) = 0
mmap(0x2a9576b000, 405504, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0) = 0x2a9576b000
mmap(0x2a957ce000, 4376, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2a957ce000
close(3) = 0
open("/usr/lib64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=79328, ...}) = 0
mmap(NULL, 79328, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2a9556a000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\327"..., 1024)
= 1024
fstat(3, {st_mode=S_IFREG|0755, st_size=1530318, ...}) = 0
mmap(NULL, 2362888, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2a957d0000
mprotect(0x2a958ed000, 1195528, PROT_NONE) = 0
mmap(0x2a959d0000, 249856, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x100000) = 0x2a959d0000
mmap(0x2a95a0d000, 15880, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2a95a0d000
close(3) = 0
munmap(0x2a9556a000, 79328) = 0
brk(0) = 0x502000
brk(0x503000) = 0x503000
brk(0) = 0x503000
brk(0) = 0x503000
brk(0x507000) = 0x507000
brk(0) = 0x507000
brk(0x508000) = 0x508000
brk(0) = 0x508000
brk(0x509000) = 0x509000
brk(0) = 0x509000
brk(0x50a000) = 0x50a000
open("0123456789.gz", O_RDONLY) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=31, ...}) = 0
mmap(NULL, 31, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2a9556a000
close(3) = 0
brk(0) = 0x50a000
brk(0x50b000) = 0x50b000
brk(0) = 0x50b000
brk(0x50c000) = 0x50c000
brk(0) = 0x50c000
brk(0x50f000) = 0x50f000
brk(0) = 0x50f000
brk(0x517000) = 0x517000
brk(0) = 0x517000
brk(0x518000) = 0x518000
and here it hangs, burning CPU time.
--
Mike Fabian <address@hidden> http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。
--- End Message ---