Bug #79064 [Opn->Fbk]: When under certain conditions, returncode = 1
| From: | nikic@php.net | Date: | Mon, 06 Jan 2020 12:57:14 +0000 |
| Subject: | Bug #79064 [Opn->Fbk]: When under certain conditions, returncode = 1 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-224733@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79064&edit=1
ID: 79064
Updated by: nikic@php.net
Reported by: qiqizjlq at gmail dot com
Summary: When under certain conditions, returncode = 1
-Status: Open
+Status: Feedback
Type: Bug
Package: Scripting Engine problem
Operating System: Linux 3c491427cc78 4.9.184-linux
PHP Version: 7.4.1
Block user comment: N
Private report: N
New Comment:
You need to set EG(full_table_cleanup) = 1 if you modify the function/class tables in a way that
allows internal and user classes to be mixed.
Alternatively, doing a call to zend_hash_rehash() *might* also work. But in the general case,
EG(full_table_cleanup) exists exactly for this kind of case (most commonly when "dl" is
used.)
Previous Comments:
------------------------------------------------------------------------
[2020-01-06 12:50:51] qiqizjlq at gmail dot com
I tried updating persistent_functions_count. But the problem is not resolved
https://github.com/qiqizjl/php73-return-code-1/blob/master/php-ext/test.c#L54
------------------------------------------------------------------------
[2020-01-06 12:01:38] cmb@php.net
Wouldn't you need to update EG(persistent_functions_count)
accordingly?
------------------------------------------------------------------------
[2020-01-04 18:05:01] qiqizjlq at gmail dot com
Description:
------------
When the extension uses zend_hash_str_del to delete functions, and there are more than 875 functions
defined in the PHP file (this number has system differences. Some have encountered more than 600,
and some encountered more than 1,000). Executing the shell will return returncode = 1
This problem currently occurs after confirming this commit: https://github.com/php/php-src/commit/3b6e1ee4ee05678b5d717cd926a35ffdc1335929
Test script:
---------------
https://github.com/qiqizjl/php73-return-code-1
Expected result:
----------------
/work/git # php test.php
/work/git # echo $?
0
Actual result:
--------------
/work/git # php test.php
/work/git # echo $?
1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79064&edit=1