|
Mantis - Quercus
|
|||||
| Viewing Issue Advanced Details | |||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 3611 | minor | always | 07-27-09 10:43 | 07-27-09 10:47 | |
|
|
|||||
| Reporter: | tlandmann | Platform: | |||
| Assigned To: | OS: | ||||
| Priority: | normal | OS Version: | |||
| Status: | new | Product Version: | 4.0.0 | ||
| Product Build: | Resolution: | open | |||
| Projection: | none | ||||
| ETA: | none | Fixed in Version: | |||
|
|
|||||
| 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: | |||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
|
|
|||||
|
|
||||