Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
1731 | crash | always | 05-11-07 08:48 | 05-15-07 09:20 | |
|
|||||
Reporter: | obaltz | Platform: | |||
Assigned To: | nam | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.1.1 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.1.2 | ||
|
|||||
Summary: | 0001731: Quercus produces invalid Java code | ||||
Description: |
Given a function performing an indefinite loop which runs until stopped by external conditions or timeout (e.g. networking stuff ). Quercus generates some "return null" stuff right after the loop. If all ways out of the loop are return (rather than break) statements, the generated "return null" is not reachable. Unreachable code leads to: 500 Servlet Exception unreachable statement return com.caucho.quercus.env.NullValue.NULL; ^ 1 error See additional info for a demo script. |
||||
Steps To Reproduce: | |||||
Additional Information: |
<?php function testloop() { for( ; ; ) { if ( rand( 1, 10 ) > 5 ) { return 1; } return 2; } } print( testloop() ); ?> |
||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|