dl() is evil! This is a bug which most likely will never be resolved (except for nuking dl()). Andi
At 04:19 PM 10/22/2001 -0700, Rasmus Lerdorf wrote: >An update to this. It only happens if an extension is dl()'ed. If it is >loaded via an "extension=" in php.ini it works fine. > >-Rasmus > >On Mon, 22 Oct 2001, Rasmus Lerdorf wrote: > > > The leak notices and other --enable-debug messages seem to be brokwn right > > now. > > > > ie. > > > > stick a stray char *s = emalloc(20); somewhere and try running php > > script.php from the command line. I get a segfault that looks like this: > > > > #0 0x406ab75c in _IO_vfprintf (s=0xbfffeca0, format=0x8186e40 "%s(%d) : > > Freeing 0x%.8lX (%d bytes), script=%s\n", > > ap=0xbfffedd0) at ../sysdeps/i386/i486/bits/string.h:530 > > #1 0x406cc615 in _IO_vsnprintf (string=0xbffff010 "", maxlen=512, > > format=0x8186e40 "%s(%d) : Freeing 0x%.8lX (%d bytes), > script=%s\n", args=0xbfffedcc) at vsnprintf.c:131 > > #2 0x406b3afb in __snprintf (s=0xbffff010 "", maxlen=512, > > format=0x8186e40 "%s(%d) : Freeing 0x%.8lX (%d bytes), > script=%s\n") at snprintf.c:37 > > #3 0x0806f0b3 in php_message_handler_for_zend (message=4, > data=0x827b560) at main.c:582 > > #4 0x08145fab in zend_message_dispatcher (message=4, data=0x827b560) > at zend.c:616 > > #5 0x08135fd5 in shutdown_memory_manager (silent=0, clean_cache=0) at > zend_alloc.c:502 > > #6 0x0806f75e in php_request_shutdown (dummy=0x0) at main.c:743 > > #7 0x0806e096 in main (argc=2, argv=0xbffff934) at cgi_main.c:775 > > #8 0x406706b7 in __libc_start_main (main=0x806d62c <main>, argc=2, > ubp_av=0xbffff934, init=0x8069ee4 <_init>, > > fini=0x8185db0 <_fini>, rtld_fini=0x4000db64 <_dl_fini>, > stack_end=0xbffff92c) > > at ../sysdeps/generic/libc-start.c:129 > > > > (gdb) up > > #3 0x0806f0b3 in php_message_handler_for_zend (message=4, data=0x827b560) > > at main.c:582 > > 582 snprintf(memory_leak_buf, 512, "%s(%d) : > > Freeing 0x%.8lX (%d bytes), script=%s\n", t->filename, t->lineno, > (unsigned long)ptr, t->size, SAFE_FILENAME(SG(request_info).path_translated)); > > (gdb) p *t > > $2 = {magic = 1930623196, filename = 0x40017cab <Address 0x40017cab out > of bounds>, lineno = 123, reported = 0, > > orig_filename = 0x0, orig_lineno = 0, pNext = 0x827b4e0, pLast = 0x0, > size = 20, persistent = 0, cached = 0} > > > > That mem_header looks a bit messed up. I could of course be stepping on > > memory elsewhere. Anybody else seeing this? > > > > -Rasmus > > > > > > > > >-- >PHP Development Mailing List <http://www.php.net/> >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]