Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002922 [Quercus] major always 09-11-08 09:41 09-11-08 14:16
Reporter koreth View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.2.1
Summary 0002922: "(variable name) is not analyzed" error
Description The following is from our (open-source) Thrift communication library:

<?php
$GLOBALS['THRIFT_AUTOLOAD'] = array();
$GLOBALS['AUTOLOAD_HOOKS'] = array();

if (!function_exists('__autoload')) {
  function __autoload($class) {
    global $THRIFT_AUTOLOAD;
    $classl = strtolower($class);
    if (isset($THRIFT_AUTOLOAD[$classl])) {
      include_once $GLOBALS['THRIFT_ROOT'].'/packages'.$THRIFT_AUTOLOAD[$classl];
    } else if (!empty($GLOBALS['AUTOLOAD_HOOKS'])) {
      foreach ($GLOBALS['AUTOLOAD_HOOKS'] as $hook) {
        $hook($class);
      }
    }
  }
}

It fails to compile with the following exception:

[09:38:44.624] {resin-15} java.lang.IllegalStateException: Location[null:0]'$classl' is not analyzed.
[09:38:44.624] {resin-15} at com.caucho.quercus.expr.ProVarExpr$1.generateAssign(ProVarExpr.java:469)
[09:38:44.624] {resin-15} at com.caucho.quercus.expr.ProAssignExpr$1.generateTop(ProAssignExpr.java:90)
[09:38:44.624] {resin-15} at com.caucho.quercus.expr.GenerateExpr.generateStatement(GenerateExpr.java:338)
[09:38:44.624] {resin-15} at com.caucho.quercus.statement.ProExprStatement$1.generateImpl(ProExprStatement.java:92)
[09:38:44.624] {resin-15} at com.caucho.quercus.statement.StatementGenerator.generate(StatementGenerator.java:92)
[09:38:44.624] {resin-15} at com.caucho.quercus.statement.ProBlockStatement$1.generateImpl(ProBlockStatement.java:106)
[09:38:44.624] {resin-15} at com.caucho.quercus.statement.StatementGenerator.generate(StatementGenerator.java:92)
[09:38:44.624] {resin-15} at com.caucho.quercus.program.ProFunction$1.generateBody(ProFunction.java:472)
[09:38:44.624] {resin-15} at com.caucho.quercus.program.ProFunction$1.generateFixedArgs(ProFunction.java:268)
[09:38:44.624] {resin-15} at com.caucho.quercus.program.ProFunction$1.generate(ProFunction.java:205)
[09:38:44.624] {resin-15} at com.caucho.quercus.gen.QuercusMain.generate(QuercusMain.java:142)
[09:38:44.624] {resin-15} at com.caucho.java.gen.BaseClass.generateComponents(BaseClass.java:253)
[09:38:44.624] {resin-15} at com.caucho.java.gen.BaseClass.generateClassContent(BaseClass.java:240)
[09:38:44.624] {resin-15} at com.caucho.java.gen.BaseClass.generate(BaseClass.java:228)
[09:38:44.624] {resin-15} at com.caucho.java.gen.GenClass.generate(GenClass.java:123)
[09:38:44.624] {resin-15} at com.caucho.java.gen.JavaClassGenerator.generate(JavaClassGenerator.java:286)
[09:38:44.624] {resin-15} at com.caucho.quercus.gen.QuercusGenerator.generate(QuercusGenerator.java:117)
[09:38:44.624] {resin-15} at com.caucho.quercus.page.ProPageManager$CompileThread.run(ProPageManager.java:271)
[09:38:44.624] {resin-15} at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:759)
[09:38:44.624] {resin-15} at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:681)
[09:38:44.624] {resin-15} at java.lang.Thread.run(Thread.java:619)
Additional Information
Attached Files

- Relationships

- Notes
(0003421)
ferg
09-11-08 11:42

I can't reproduce this as well. Is this the full example that reproduces the problem?
 
(0003422)
koreth
09-11-08 11:56

Yes, that's the entirety of the source file. I am running with the latest Pro and non-Pro code from svn. Just tried doing a clean build of all the Resin code and blowing away the Quercus work directory, then restarting Resin; I still see the exception.

Anything I can do to help diagnose? I'm happy to put debug messages in the Resin code if that'll help.
 
(0003427)
koreth
09-11-08 13:53

Updated Resin with latest changes from svn and the problem went away.
 
(0003429)
ferg
09-11-08 14:16

php/37f8
 

- Issue History
Date Modified Username Field Change
09-11-08 09:41 koreth New Issue
09-11-08 11:42 ferg Note Added: 0003421
09-11-08 11:56 koreth Note Added: 0003422
09-11-08 13:53 koreth Note Added: 0003427
09-11-08 14:16 ferg Note Added: 0003429
09-11-08 14:16 ferg Assigned To  => ferg
09-11-08 14:16 ferg Status new => closed
09-11-08 14:16 ferg Resolution open => fixed
09-11-08 14:16 ferg Fixed in Version  => 3.2.1


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