bug34062.phpt 610 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Bug #34062 (Crash in catch block when many arguments are used)
  3. --FILE--
  4. <?php
  5. function f1() { throw new Exception; }
  6. function f2() { echo "here\n"; }
  7. try {
  8. // Currently it's the minimum required number of zeros
  9. // If you remove one, it won't crash
  10. max(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  11. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  12. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, f1());
  13. } catch (Exception $e) {
  14. echo "(((\n";
  15. f2(0, 0, 0); // Won't crash if less than 3 zeros here
  16. echo ")))\n";
  17. }
  18. ?>
  19. --EXPECT--
  20. (((
  21. here
  22. )))