bug76846.phpt 488 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. Bug #76846: Segfault in shutdown function after memory limit error
  3. --INI--
  4. memory_limit=33M
  5. --SKIPIF--
  6. <?php
  7. $zend_mm_enabled = getenv("USE_ZEND_ALLOC");
  8. if ($zend_mm_enabled === "0") {
  9. die("skip Zend MM disabled");
  10. }
  11. ?>
  12. --FILE--
  13. <?php
  14. register_shutdown_function(function() {
  15. new stdClass;
  16. });
  17. $ary = [];
  18. while (true) {
  19. $ary[] = new stdClass;
  20. }
  21. ?>
  22. --EXPECTF--
  23. Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %s on line %d%A