Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:1761 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80095 invoked by uid 1007); 20 May 2003 06:21:43 -0000 Message-ID: <20030520062143.80094.qmail@pb1.pair.com> To: internals@lists.php.net Reply-To: "l0t3k" Date: Tue, 20 May 2003 02:20:32 -0400 Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Posted-By: 68.19.25.36 Subject: Segfault in CVS : Namespace related. From: cshmoove@bellsouth.net ("l0t3k") im sorry i dont have a diff (my build environment is sensitive at the moment), but there is a segfault initializing an internal namespace. simplest reproducing C code is : #define MODULE_NAMESPACE "I18N" zend_namespace *i18n_ns = NULL; void php_I18N_register_namespace(TSRMLS_DC) { zend_namespace temp_ns; temp_ns.name = MODULE_NAMESPACE; temp_ns.name_length = strlen(MODULE_NAMESPACE); i18n_ns = zend_register_internal_namespace(&temp_ns TSRMLS_CC); } the problem is that the ns->builtin_functions table is not properly initialized in zend_init_namespace, so a subsequent call to if (ns->builtin_functions) { zend_register_functions(ns, ns->builtin_functions, &ns->function_table, MODULE_PERSISTENT TSRMLS_CC); } causes the code to crash. l0t3k