Bug #77466 [Com]: random segfault after fatal error

From: Date: Fri, 16 Dec 2022 06:26:25 +0000
Subject: Bug #77466 [Com]: random segfault after fatal error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243161@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77466&edit=1

 ID:                 77466
 Comment by:         operbl0088 at gmail dot com
 Reported by:        webox955 at gmail dot com
 Summary:            random segfault after fatal error
 Status:             Wont fix
 Type:               Bug
 Package:            FPM related
 Operating System:   Centos 7
 PHP Version:        5.6.40
 Block user comment: N
 Private report:     N

 New Comment:

(https://rebrand.ly/daftar-togel-2a8716)github.com


Previous Comments:
------------------------------------------------------------------------
[2022-11-16 09:35:37] bhatihistory3045 at gmail dot com

do you want to know the latest rathore itihas history visit our site 
(rathore itihas : https://rathoreitihas.blogspot.com)gist.github.com
(prabath satta matka result : https://rathoreitihas.blogspot.com/2022/11/prabhat-satta-matka.html)gist.github.com

------------------------------------------------------------------------
[2022-11-16 09:29:26] bossdpnew at gmail dot com

dp boss new is the latest chart and result website you can see the latest result
(old Mumbai chart: https://dpbossnew.net/old-main-mumbai-jodi-chart)gist.github.com

------------------------------------------------------------------------
[2022-11-16 09:25:21] ommseowork at gmail dot com

play Satta Matka online with the latest chart and result 
(play Matka online: https://www.oldmainmumbai.com)gist.github.com

------------------------------------------------------------------------
[2020-11-14 02:33:30] nsetak at gmail dot com

PHP 5.6 is no longer supported. Some issues related to memory limit errors have been fixed in later
versions.

thanks.

 
https://www.elso7ba.com
https://www.mtba5i.com
https://www.el7lwa.com
http://banatmasr.net

------------------------------------------------------------------------
[2019-01-17 13:38:03] webox955 at gmail dot com

test script:
#!/bin/bash

echo "Zend/tests/bug47353.phpt"
REQUEST_METHOD=GET SCRIPT_FILENAME="/flush.php" SCRIPT_NAME="flush.php" cgi-fcgi
-bind -connect /var/run/php-fpm/listen.sock
exit 0
<?php
echo memory_get_usage(true);

ini_set('memory_limit','40M');
echo ":".ini_get('memory_limit')."\n";
sleep(4);

register_shutdown_function(function() {
    new stdClass;
});
$ary = [];
while (true) {
    echo memory_get_usage()."\n";
    $ary[] = new stdClass;
   echo memory_get_usage(true);
}

?>

patch:
diff -up ./Zend/zend_objects_API.c.old ./Zend/zend_objects_API.c
--- ./Zend/zend_objects_API.c.old       2019-01-16 15:05:03.487365313 +0300
+++ ./Zend/zend_objects_API.c   2019-01-16 15:06:31.750081871 +0300
@@ -114,8 +114,10 @@ ZEND_API zend_object_handle zend_objects
                EG(objects_store).free_list_head =
EG(objects_store).object_buckets[handle].bucket.free_list.next;
        } else {
                if (EG(objects_store).top == EG(objects_store).size) {
-                       EG(objects_store).size <<= 1;
-                       EG(objects_store).object_buckets = (zend_object_store_bucket *)
erealloc(EG(objects_store).object_buckets, EG(objects_store).size *
sizeof(zend_object_store_bucket));                                                                  
             
+                       zend_uint new_size = 2 * EG(objects_store).size;
+                       EG(objects_store).object_buckets = (zend_object_store_bucket *)
erealloc(EG(objects_store).object_buckets, new_size * sizeof(zend_object_store_bucket));            
                                                                                 
+                       /* Assign size after realloc, in case it fails */
+                       EG(objects_store).size = new_size;
                }
                handle = EG(objects_store).top++;
        }

backport from https://bugs.php.net/bug.php?id=76846&edit=3
original commit:
https://github.com/php/php-src/commit/45cdcb2d0be89fe7bc404dd150240ec83f5de401

no diff in autotest betwein original 5.6.40 & patched version.
test script on original version generate segfault, after this patch working fine

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=77466


--
Edit this bug report at https://bugs.php.net/bug.php?id=77466&edit=1


Thread (1 message)

  • operbl0088 at gmail dot com
  • Unknown Message
    • operbl0088 at gmail dot com
« previous php.bugs (#243161) next »