]> granicus.if.org Git - php/commitdiff
test for eval debug_backtrace bug
authorStanislav Malyshev <stas@php.net>
Tue, 1 Feb 2005 19:02:17 +0000 (19:02 +0000)
committerStanislav Malyshev <stas@php.net>
Tue, 1 Feb 2005 19:02:17 +0000 (19:02 +0000)
Zend/tests/bug_debug_backtrace.phpt [new file with mode: 0755]

diff --git a/Zend/tests/bug_debug_backtrace.phpt b/Zend/tests/bug_debug_backtrace.phpt
new file mode 100755 (executable)
index 0000000..3e4a0ec
--- /dev/null
@@ -0,0 +1,28 @@
+--TEST--
+Bug - crash in debug_backtrace when trace starts in eval
+--FILE--
+<?php
+function foo() {
+    bar();
+}
+                                                                                                            
+function bar() {
+    boo();
+}
+                                                                                                            
+function boo(){
+    debug_print_backtrace();
+}
+                                                                                                            
+eval("foo();");
+                                                                                                            
+echo "Done\n";
+?>
+===DONE===
+--EXPECTF--
+#0  boo() called at [%s:%d]
+#1  bar() called at [%s:%d]
+#2  foo() called at [%s(%d) : eval()'d code:1]
+#3  eval() called at [%s:%d]
+Done
+===DONE===