summaryrefslogtreecommitdiff
path: root/Zend/tests/bug79783.phpt
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-07-07 09:55:28 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-07-07 09:56:14 +0200
commit971e5c5186a2a2339b0dbad4f2a057a9deed5aa2 (patch)
tree366cc9ef7b8d26080acfc8b2af269020260740aa /Zend/tests/bug79783.phpt
parenta58d865f65acba6b876a6ed1960aaa7b28685e34 (diff)
downloadphp-git-971e5c5186a2a2339b0dbad4f2a057a9deed5aa2.tar.gz
Fixed bug #79783
Make sure we don't drop the by-reference check when passing the result of a VM builtin function.
Diffstat (limited to 'Zend/tests/bug79783.phpt')
-rw-r--r--Zend/tests/bug79783.phpt11
1 files changed, 11 insertions, 0 deletions
diff --git a/Zend/tests/bug79783.phpt b/Zend/tests/bug79783.phpt
new file mode 100644
index 0000000000..959e90b06d
--- /dev/null
+++ b/Zend/tests/bug79783.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #79783: Segfault in php_str_replace_common
+--FILE--
+<?php
+str_replace("a", "b", "c", strlen("d"));
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: Cannot pass parameter 4 by reference in %s:%d
+Stack trace:
+#0 {main}
+ thrown in %s on line %d