Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24275 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42529 invoked by uid 1010); 5 Jul 2006 12:02:38 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 42514 invoked from network); 5 Jul 2006 12:02:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jul 2006 12:02:38 -0000 X-PHP-List-Original-Sender: gwynne@skytag.com X-Host-Fingerprint: 208.97.132.61 sd-green-bigip-61.dreamhost.com Linux 2.4/2.6 Received: from ([208.97.132.61:52375] helo=spunkymail-a18.dreamhost.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id F6/8A-16663-D75ABA44 for ; Wed, 05 Jul 2006 07:41:50 -0400 Received: from [192.168.0.101] (c-66-31-91-125.hsd1.ma.comcast.net [66.31.91.125]) by spunkymail-a18.dreamhost.com (Postfix) with ESMTP id D85B35B51F for ; Wed, 5 Jul 2006 04:41:48 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.2) Content-Transfer-Encoding: 7bit Message-ID: <7D65229E-FB18-402B-BFD9-212B7A285C21@skytag.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: internals@lists.php.net Date: Wed, 5 Jul 2006 07:41:44 -0400 X-Mailer: Apple Mail (2.752.2) Subject: Making changes to PG() (php_core_globals) From: gwynne@skytag.com (Gwynne) The subject line gives a pretty good idea what this question is about. Yes, I'm well aware of the dangers of making core changes, and I'm only doing it to give myself a better idea what's going on inside :). In any case, here's the problem... One of the changes I tried to make is changing the type of the track_errors setting from zend_bool to long. It seems like a simple enough change: change the type in php_globals.h, update the INI setting in main.c, update the actual usage of the var in main.c, update my local INI file to use an integer value. But as soon as I did this, my test build started showing leaks from php_hash_environment() and a crash in php_module_shutdown()- >php_shutdown_ticks()->zend_llist_destroy(). My only guess as to why it was happening is that I didn't change a type or expected size somewhere, but for the life of me I can't figure out where my mistake was; I haven't seen a harcoded size where sizeof() should be or anything like that, after poring through main.c, php_variables.c, zend_globals.h, php_globals.h, and the like. I've reverted my source, but I'd still like to know: What did I miss? TSRM was on (--enable-maintainer-zts), as was --enable-debug, if that helps. I didn't try it without TSRM; if I can't do it thread-safely, then I'm not doing it right regardless. -- Gwynne, Daughter of the Code "This whole world is an asylum for the incurable."