[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Aspell-user] libaspell-common-0.50.1.so erroneously closes stdin/stdout
From: |
Andreas Steinmetz |
Subject: |
[Aspell-user] libaspell-common-0.50.1.so erroneously closes stdin/stdout/stderr |
Date: |
Wed, 18 Sep 2002 14:16:11 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020828 |
Please CC me on replies as I'm not subscribed.
libaspell-common-0.50.1.so closes stdin/stdout/stderr on library close
which causes severe problems when dlopen()/dlclose() is used. In my case
Apache-SSL aborts with an assertion as stderr is closed when
/usr/lib/libpspell.so.15.0.1 is dlcose()d by php4 which implicitely
closes libaspell-common-0.50.1.so which in turn closes stdin/stdout/stderr.
System: Linux 2.4, gcc 3.2, binutils 2.13
Example Source Code:
---------------------------------------------
#include <stdio.h>
#include <dlfcn.h>
int main()
{
void *p;
p=dlopen("/usr/lib/libaspell-common-0.50.1.so",RTLD_NOW);
write(1,"1\n",2);
dlclose(p);
write(1,"2\n",2);
return 0;
}
----------------------------------------------
Program Trace:
----------------------------------------------
SYS_uname(0xbffff0e4) = 0
SYS_brk(NULL) = 0x08049644
SYS_open("/etc/ld.so.preload", 0, 012) = -2
SYS_open("/etc/ld.so.cache", 0, 00) = 3
SYS_fstat64(3, 0xbfffe88c, 0, 3, 3) = 0
SYS_mmap2(0, 62978, 1, 2, 3) = 0x40016000
SYS_close(3) = 0
SYS_open("/lib/libdl.so.2", 0, 0112516) = 3
SYS_read(3, "\177ELF\001\001\001", 1024) = 1024
SYS_fstat64(3, 0xbfffe8d4, 0x40015680, 16, 3) = 0
SYS_mmap2(0, 11144, 5, 2, 3) = 0x40026000
SYS_mprotect(0x40028000, 2952, 0, 0xbfffe7e8, 2952) = 0
SYS_mmap2(0x40028000, 4096, 3, 18, 3) = 0x40028000
SYS_close(3) = 0
SYS_open("/lib/libc.so.6", 0, 035000) = 3
SYS_read(3, "\177ELF\001\001\001", 1024) = 1024
SYS_fstat64(3, 0xbfffe8c4, 0x40015680, 15, 3) = 0
SYS_mmap2(0, 0x00153de0, 5, 2, 3) = 0x40029000
SYS_mprotect(0x40170000, 52704, 0, 0xbfffe7d8, 52704) = 0
SYS_mmap2(0x40170000, 36864, 3, 18, 3) = 0x40170000
SYS_mmap2(0x40179000, 15840, 3, 50, -1) = 0x40179000
SYS_close(3) = 0
SYS_mmap2(0, 4096, 3, 34, -1) = 0x4017d000
SYS_munmap(0x40016000, 62978) = 0
__libc_start_main(0x08048410, 1, 0xbffff544, 0x080482c0, 0x080484b0
<unfinished ...>
dlopen("/usr/lib/libaspell-common-0.50.1.so", 2 <unfinished ...>
SYS_brk(NULL) = 0x08049644
SYS_brk(0x0804967c) = 0x0804967c
SYS_brk(0x0804a000) = 0x0804a000
SYS_open("/usr/lib/libaspell-common-0.50.1.so", 0, 00) = 3
SYS_read(3, "\177ELF\001\001\001", 1024) = 1024
SYS_fstat64(3, 0xbfffece8, 0, 36, 3) = 0
SYS_mmap2(0, 215240, 5, 2, 3) = 0x4017e000
SYS_mprotect(0x401ad000, 22728, 0, 0xbfffec2c, 22728) = 0
SYS_mmap2(0x401ad000, 24576, 3, 18, 3) = 0x401ad000
SYS_close(3) = 0
SYS_open("/etc/ld.so.cache", 0, 010000713063) = 3
SYS_fstat64(3, 0xbfffeac0, 0x40039633, 3, 3) = 0
SYS_mmap2(0, 62978, 1, 2, 3) = 0x40016000
SYS_close(3) = 0
SYS_open("/usr/lib/libstdc++.so.5", 0, 0112516) = 3
SYS_read(3, "\177ELF\001\001\001", 1024) = 1024
SYS_fstat64(3, 0xbfffeb08, 0x08049678, 24, 3) = 0
SYS_mmap2(0, 838656, 5, 2, 3) = 0x401b3000
SYS_mprotect(0x40265000, 109568, 0, 0xbfffea4c, 109568) = 0
SYS_mmap2(0x40265000, 90112, 3, 18, 3) = 0x40265000
SYS_mmap2(0x4027b000, 19456, 3, 50, -1) = 0x4027b000
SYS_close(3) = 0
SYS_open("/lib/libm.so.6", 0, 035002) = 3
SYS_read(3, "\177ELF\001\001\001", 1024) = 1024
SYS_fstat64(3, 0xbfffeaf8, 0x08049678, 15, 3) = 0
SYS_mmap2(0, 145536, 5, 2, 3) = 0x40280000
SYS_mprotect(0x402a3000, 2176, 0, 0xbfffea0c, 2176) = 0
SYS_mmap2(0x402a3000, 4096, 3, 18, 3) = 0x402a3000
SYS_close(3) = 0
SYS_open("/usr/lib/libgcc_s.so.1", 0, 0434200) = 3
SYS_read(3, "\177ELF\001\001\001", 1024) = 1024
SYS_fstat64(3, 0xbfffead8, 0x08049678, 23, 3) = 0
SYS_mmap2(0, 31500, 5, 2, 3) = 0x402a4000
SYS_mprotect(0x402ab000, 2828, 0, 0xbfffea1c, 2828) = 0
SYS_mmap2(0x402ab000, 4096, 3, 18, 3) = 0x402ab000
SYS_close(3) = 0
SYS_brk(0x0804b000) = 0x0804b000
SYS_munmap(0x40016000, 62978) = 0
<... dlopen resumed> ) = 0x08049678
write(1, "1\n", 2 <unfinished ...>
SYS_write(1, "1\n", 21
) = 2
<... write resumed> ) = 2
dlclose(0x08049678 <unfinished ...>
SYS_close(2) = 0
SYS_close(1) = 0
SYS_close(0) = 0
SYS_munmap(0x4017e000, 215240) = 0
SYS_munmap(0x401b3000, 838656) = 0
SYS_munmap(0x40280000, 145536) = 0
SYS_munmap(0x402a4000, 31500) = 0
<... dlclose resumed> ) = 0
write(1, "2\n", 2 <unfinished ...>
SYS_write(1, "2\n", 2) = -9
<... write resumed> ) = -1
SYS_exit(0 <unfinished ...>
+++ exited (status 0) +++
--
Andreas Steinmetz
D.O.M. Datenverarbeitung GmbH
- [Aspell-user] libaspell-common-0.50.1.so erroneously closes stdin/stdout/stderr,
Andreas Steinmetz <=