Anonymous | Login | Signup for a new account | 11-21-2024 21:30 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Advanced Details [ Jump to Notes ] | [ View Simple ] [ Issue History ] [ Print ] | |||||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
0003611 | [Quercus] | minor | always | 07-27-09 10:43 | 07-27-09 10:47 | |||||||
Reporter | tlandmann | View Status | public | |||||||||
Assigned To | ||||||||||||
Priority | normal | Resolution | open | Platform | ||||||||
Status | new | OS | ||||||||||
Projection | none | OS Version | ||||||||||
ETA | none | Fixed in Version | Product Version | 4.0.0 | ||||||||
Product Build | ||||||||||||
Summary | 0003611: Call Stack getting broken (apparently) | |||||||||||
Description |
The script below prints an impossible result in Quercus: Suddenly the bottom of the call stack (invocation of some_function() from the end of the script) is gone. However it seems that the bug is only limited to debug_backtrace(), so there're no negative effect on programs that don't rely on this PHP function. I didn't prove that though. -------------------- <?php function dump_trace() { foreach (debug_backtrace() as $cur_stack_element) { echo "# {$cur_stack_element['function']}() from {$cur_stack_element['file']}:{$cur_stack_element['line']}\n"; } echo "\n"; } function some_function($depth=0, $max_depth=5) { if ($depth<$max_depth) { dump_trace(); if ($depth==2) { $function_name='some_function'; $function_name($depth+1, $max_depth); // this syntax, although valid PHP, causes the problem } else { some_function($depth+1, $max_depth); // works // call_user_func_array($function_name, array($depth+1, $max_depth)); // may also want to try this one -> it also works } } } some_function(); dump_trace(); ?> ---------------- |
|||||||||||
Steps To Reproduce | ||||||||||||
Additional Information | ||||||||||||
Attached Files | ||||||||||||
|
Issue History | |||
Date Modified | Username | Field | Change |
07-27-09 10:43 | tlandmann | New Issue | |
07-27-09 10:47 | tlandmann | Note Added: 0004101 |
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed. 25 unique queries executed. |