bug74084.phpt 715 B

12345678910111213141516171819202122232425262728293031323334353637
  1. --TEST--
  2. Bug #74084 (Out of bound read - zend_mm_alloc_small)
  3. --INI--
  4. error_reporting=0
  5. --FILE--
  6. <?php
  7. $$A += $$B['a'] = &$$C;
  8. unset($$A);
  9. try {
  10. $$A -= $$B['a'] = &$$C;
  11. } catch (Error $e) {
  12. echo $e->getMessage(), "\n";
  13. }
  14. unset($$A);
  15. try {
  16. $$A *= $$B['a'] = &$$C;
  17. } catch (Error $e) {
  18. echo $e->getMessage(), "\n";
  19. }
  20. unset($$A);
  21. try {
  22. $$A /= $$B['a'] = &$$C;
  23. } catch (Error $e) {
  24. echo $e->getMessage(), "\n";
  25. }
  26. unset($$A);
  27. try {
  28. $$A **= $$B['a'] = &$$C;
  29. } catch (Error $e) {
  30. echo $e->getMessage(), "\n";
  31. }
  32. ?>
  33. --EXPECT--
  34. Unsupported operand types: array - array
  35. Unsupported operand types: array * array
  36. Unsupported operand types: array / array
  37. Unsupported operand types: array ** array