Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001731 [Quercus] crash always 05-11-07 08:48 05-15-07 09:20
Reporter obaltz View Status public  
Assigned To nam
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.1.2 Product Version 3.1.1
  Product Build
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() );
?>
Attached Files

- Relationships

- Notes
(0001915)
nam
05-15-07 09:20

php/3626
php/3627
 

- Issue History
Date Modified Username Field Change
05-11-07 08:48 obaltz New Issue
05-15-07 02:13 nam Status new => assigned
05-15-07 02:14 nam Assigned To  => nam
05-15-07 09:20 nam Status assigned => closed
05-15-07 09:20 nam Note Added: 0001915
05-15-07 09:20 nam Resolution open => fixed
05-15-07 09:20 nam Fixed in Version  => 3.1.2


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker