Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionCoty Sutherland
2014-02-28 14:41:03 UTC
Description of problem:
When trying to fill an SplFixedArray object of length >= 9999 you get a segfault.
Version-Release number of selected component (if applicable):
6.5
How reproducible:
Every time when running with a PHP version < 5.3.8.
Steps to Reproduce:
1. Execute attached script.
2.
3.
Actual results:
With LENGTH < 9999: works fine.
With LENGTH >= 9999: Either a segfault or a 'zend_mm_heap_corrupted' error depending on whether the inner array is a regular array or a fixed array.
Output:
Array
*RECURSION*Array
....
*RECURSION*Array
(
Segmentation fault (core dumped)
Expected results:
Array
(
[0] => test
[1] => test2
)
.... // repeated about 9998 times
Additional info:
This seems to occur with PHP versions less than 5.3.8. I attached a bug report from years ago that was for this problem, but was closed because the problem disappeared in later versions. I was unable to find where it was fixed though.
I think this is related to upstream bug 54609.
Upstream fix:
http://git.php.net/?p=php-src.git;a=commit;h=0afd4bd18bef55d8bce4d0fe854a65781477029a
This is related to the garbage collector.
With the provided reproducer, and a regular array
$ php -d zend.enable_gc=1 /tmp/foo.php
Array
*RECURSION*Array
...
*RECURSION*Array
(
Segmentation fault (core dumped)
With gc disabled => no segfault
$ php -d zend.enable_gc=0 /tmp/foo.php
...
Array
(
[0] => test
[1] => test2
)
With the provided reproducer, and a fixed array
$ php -d zend.enable_gc=1 /tmp/foo.php
Segmentation fault (core dumped)
With gc disabled => no segfault
$ php -d zend.enable_gc=0 /tmp/foo.php
...
[8] =>
[9] =>
)
So can you please with test "zend.enable_gc=0" to confirm this.
Does the customer would be able to test a scratch build with this fix applied ?
Hi Remi,
That works for me in my environment. I will pass it on the customer and verify it works for them and also check to see if they can test a build with the fix applied.
Thanks!
> So can you please with test "zend.enable_gc=0" to confirm this.
"Yes -- disabling GC appears to make the segfault go away."
> Does the customer would be able to test a scratch build with this fix applied ?
They are willing to test a build if we get them one.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2016-0842.html
Description of problem: When trying to fill an SplFixedArray object of length >= 9999 you get a segfault. Version-Release number of selected component (if applicable): 6.5 How reproducible: Every time when running with a PHP version < 5.3.8. Steps to Reproduce: 1. Execute attached script. 2. 3. Actual results: With LENGTH < 9999: works fine. With LENGTH >= 9999: Either a segfault or a 'zend_mm_heap_corrupted' error depending on whether the inner array is a regular array or a fixed array. Output: Array *RECURSION*Array .... *RECURSION*Array ( Segmentation fault (core dumped) Expected results: Array ( [0] => test [1] => test2 ) .... // repeated about 9998 times Additional info: This seems to occur with PHP versions less than 5.3.8. I attached a bug report from years ago that was for this problem, but was closed because the problem disappeared in later versions. I was unable to find where it was fixed though.