Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14892 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28999 invoked by uid 1010); 13 Feb 2005 05:25:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 28984 invoked from network); 13 Feb 2005 05:25:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Feb 2005 05:25:27 -0000 X-Host-Fingerprint: 220.245.208.145 220-245-208-145-act.tpgi.com.au Received: from ([220.245.208.145:64481] helo=picard.newmillennium.net.au) by pb1.pair.com (ecelerity 1.2.11 (r4403)) with SMTP id 8F/8D-04303-2C4EE024 for ; Sun, 13 Feb 2005 00:25:27 -0500 Received: from riker (riker.nmn.cafn [10.0.1.2]) by picard.newmillennium.net.au (8.13.1/8.13.1) with ESMTP id j1D5PGnF037416 for ; Sun, 13 Feb 2005 16:25:16 +1100 (EST) (envelope-from alastair@newmillennium.net.au) Sender: "Alastair D'Silva" To: Date: Sun, 13 Feb 2005 16:24:42 +1100 Organization: New Millennium Networking Message-ID: <001701c5118c$523de990$0201000a@riker> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal Subject: Symbol clash between Recode and MySQL extensions From: php@newmillennium.net.au On FreeBSD, I was gettting the following error message when PHP exits: Php in free(): junk pointer, too high to make sense Further investigation showed that it stops showing when the MySQL module = is disabled. I rebuilt my MySQL client libraries with debugging symbols, = and forced a crash on invalid frees. Here is a backtrace: (gdb) bt #0 0x283fb404 in kill () from /usr/lib/libc.so.4 #1 0x28440810 in abort () from /usr/lib/libc.so.4 #2 0x2843f18a in isatty () from /usr/lib/libc.so.4 #3 0x2843f1bf in isatty () from /usr/lib/libc.so.4 #4 0x28440208 in isatty () from /usr/lib/libc.so.4 #5 0x28440485 in free () from /usr/lib/libc.so.4 #6 0x28487962 in my_no_flags_free (ptr=3D0x28d365e8 "U\211=E5\203=EC\024S=E8=F0=FF=FF=FF\201=C3Xo\017") at my_malloc.c:60 #7 0x2848c7a6 in delete_dynamic (array=3D0x824b798) at array.c:236 #8 0x2848ddad in hash_free (hash=3D0x824b780) at hash.c:116 #9 0x28d38b74 in recode_delete_outer () from = /usr/local/lib/librecode.so.3 #10 0x28ceed88 in zm_shutdown_recode () from /usr/local/lib/php/20041030/recode.so #11 0x81145be in module_destructor () #12 0x81170d7 in zend_hash_apply_deleter () #13 0x8117246 in zend_hash_graceful_reverse_destroy () #14 0x810faa2 in zend_shutdown () #15 0x80d8a10 in php_module_shutdown () #16 0x8157eea in main () #17 0x80632a1 in _start () It looks like the MySQL hash_free function is being called as the recode extension shuts down. I confirmed this by disabling the recode module = and noting that the problem went away (it also goes away if the MySQL module = is disabled). Any thoughts on how to scope the libraries to avoid this conflict? I was thinking dlfunc could be used to only import the functions we want, but = I don't really have time to play with this myself. --=20 Alastair D'Silva mob: 0413 485 733 Networking Consultant fax: 0413 181 661 New Millennium Networking web: http://www.newmillennium.net.au