php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79064 When under certain conditions, returncode = 1
Submitted: 2020-01-04 18:05 UTC Modified: 2020-01-19 04:22 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: qiqizjlq at gmail dot com Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 7.4.1 OS: Linux 3c491427cc78 4.9.184-linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: qiqizjlq at gmail dot com
New email:
PHP Version: OS:

 

 [2020-01-04 18:05 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-01-06 09:45 UTC] nikic@php.net
-Package: Semaphore related +Package: Scripting Engine problem
 [2020-01-06 12:01 UTC] cmb@php.net
Wouldn't you need to update EG(persistent_functions_count)
accordingly?
 [2020-01-06 12:50 UTC] 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:57 UTC] nikic@php.net
-Status: Open +Status: Feedback
 [2020-01-06 12:57 UTC] nikic@php.net
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.)
 [2020-01-19 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 10:01:29 2024 UTC