|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-03-10 07:53 UTC] hubbitus@php.net
Description: ------------ In PHP-5.3.0 from CVS 2008-02-26 (it is not in dropdown list of PHP versions in this form to BUG report) stable version 0.9 do not compiled with many errors, part of described in other bugs and partially fixed. So, trying CVS-version (checkout at 2008-03-10). Compiled successful, but not working due unresolved symbols with several errors (see Actual results). Reproduce code: --------------- Compile CVS, enable extension, and just run PHP: php -m | grep runkit Expected result: ---------------- Runkit enabled and working. Actual result: -------------- bash-3.2$ php -v PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/runkit.so' - /usr/lib/php/modules/runkit.so: undefined symbol: ZVAL_REFCOUNT in Unknown on line 0 bash-3.2$ php -v PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/runkit.so' - /usr/lib/php/modules/runkit.so: undefined symbol: ZVAL_ADDREF in Unknown on line 0 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 13:00:01 2025 UTC |
Hmm... I have not found possibility attach patch to the post, so, put here as plain text: Patch#0: diff -NaurEbBH php-pecl-runkit-0.9.orig/runkit-0.9/runkit.c php-pecl-runkit-0.9/runkit-0.9/runkit.c --- php-pecl-runkit-0.9.orig/runkit-0.9/runkit.c 2007-10-24 06:43:27.000000000 +0400 +++ php-pecl-runkit-0.9/runkit-0.9/runkit.c 2008-03-10 15:20:40.000000000 +0300 @@ -61,7 +61,8 @@ add_assoc_stringl(return_value, "address", addr, addr_len, 0); #if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3) || (PHP_MAJOR_VERSION >= 6) - add_assoc_long(return_value, "refcount", ZVAL_REFCOUNT(value)); +//*Hu add_assoc_long(return_value, "refcount", ZVAL_REFCOUNT(value)); + add_assoc_long(return_value, "refcount", Z_REFCOUNT_P(value)); add_assoc_bool(return_value, "is_ref", Z_ISREF_P(value)); #else add_assoc_long(return_value, "refcount", value->refcount); Patch#1: diff -NaurEbBH php-pecl-runkit-0.9.orig/runkit-0.9/runkit_constants.c php-pecl-runkit-0.9/runkit-0.9/runkit_constants.c --- php-pecl-runkit-0.9.orig/runkit-0.9/runkit_constants.c 2007-10-24 06:43:27.000000000 +0400 +++ php-pecl-runkit-0.9/runkit-0.9/runkit_constants.c 2008-03-10 15:30:44.000000000 +0300 @@ -71,7 +71,8 @@ zend_hash_apply_with_arguments(EG(class_table), (apply_func_args_t)php_runkit_update_children_consts, 4, ce, c, cname, cname_len); zend_hash_del(&ce->constants_table, cname, cname_len + 1); - ZVAL_ADDREF(c); +//*Hu ZVAL_ADDREF(c); + Z_ADDREF_P(c); if (zend_hash_add(&ce->constants_table, cname, cname_len + 1, c, sizeof(zval*), NULL) == FAILURE) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error updating child class"); return ZEND_HASH_APPLY_KEEP; diff -NaurEbBH php-pecl-runkit-0.9.orig/runkit-0.9/runkit_import.c php-pecl-runkit-0.9/runkit-0.9/runkit_import.c --- php-pecl-runkit-0.9.orig/runkit-0.9/runkit_import.c 2006-10-26 20:18:52.000000000 +0400 +++ php-pecl-runkit-0.9/runkit-0.9/runkit_import.c 2008-03-10 15:32:00.000000000 +0300 @@ -193,7 +193,8 @@ goto import_const_skip; } } - ZVAL_ADDREF(*c); +//*Hu ZVAL_ADDREF(*c); + Z_ADDREF_P(*c); if (zend_hash_add_or_update(&dce->constants_table, key, key_len, (void*)c, sizeof(zval*), NULL, action) == FAILURE) { zval_ptr_dtor(c); php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to import %s::%s", dce->name, key); @@ -241,7 +242,8 @@ goto import_prop_skip; } } - ZVAL_ADDREF(*p); +//*Hu ZVAL_ADDREF(*p); + Z_ADDREF_P(*p); if (zend_hash_add_or_update(&dce->default_properties, key, key_len, (void*)p, sizeof(zval*), NULL, action) == FAILURE) { zval_ptr_dtor(p); php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to import %s->%s", dce->name, pname); diff -NaurEbBH php-pecl-runkit-0.9.orig/runkit-0.9/runkit_props.c php-pecl-runkit-0.9/runkit-0.9/runkit_props.c --- php-pecl-runkit-0.9.orig/runkit-0.9/runkit_props.c 2007-10-24 06:43:27.000000000 +0400 +++ php-pecl-runkit-0.9/runkit-0.9/runkit_props.c 2008-03-10 15:32:16.000000000 +0300 @@ -45,7 +45,8 @@ zend_hash_apply_with_arguments(EG(class_table), (apply_func_args_t)php_runkit_update_children_def_props, 4, ce, p, pname, pname_len); zend_hash_del(&ce->default_properties, pname, pname_len + 1); - ZVAL_ADDREF(p); +//*Hu ZVAL_ADDREF(p); + Z_ADDREF_P(p); if (zend_hash_add(&ce->default_properties, pname, pname_len + 1, p, sizeof(zval*), NULL) == FAILURE) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error updating child class"); return ZEND_HASH_APPLY_KEEP;