Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45927 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30396 invoked from network); 1 Nov 2009 21:10:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Nov 2009 21:10:01 -0000 X-Host-Fingerprint: 86.137.226.219 host86-137-226-219.range86-137.btcentralplus.com Received: from [86.137.226.219] ([86.137.226.219:19507] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/F1-17998-729FDEA4 for ; Sun, 01 Nov 2009 16:10:00 -0500 Message-ID: <61.F1.17998.729FDEA4@pb1.pair.com> To: internals@lists.php.net Date: Sun, 01 Nov 2009 21:09:51 +0000 User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 86.137.226.219 Subject: Seg fault when using active_symbol_table called from userspace function. From: markskilbeck@gmail.com (Mark Skilbeck) Can you explain to me why the following causes a segfault: [code] PHP_FUNCTION(sample_var_a_exists) { if (!zend_hash_exists(EG(active_symbol_table), "a", sizeof("a"))) { RETURN_BOOL(0); } RETURN_BOOL(1); } [/code] Note: the segfault only occurs when the sample_var_a_exists function is called from within a userspace function: [code] $a = ''; var_dump(sample_var_a_exists()); // bool(true) function x() { var_dump(sample_var_a_exists()); // segmentation fault } x(); [/code] Thanks.