You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Henry Zongaro (JIRA)" <xa...@xml.apache.org> on 2005/06/15 16:38:46 UTC

[jira] Created: (XALANJ-2146) Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack

Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack
--------------------------------------------------------------------------------------------

         Key: XALANJ-2146
         URL: http://issues.apache.org/jira/browse/XALANJ-2146
     Project: XalanJ2
        Type: Bug
  Components: XSLTC  
    Versions: CurrentCVS    
    Reporter: Henry Zongaro
 Assigned to: Henry Zongaro 
    Priority: Critical
     Fix For: 2.7.0-future-release


Section 4.3.4 of the Java Virtual Machine Specification, 2nd Edition, places the following restriction on Java byte code:

«A valid instruction sequence must not have an uninitialized object on the operand stack or in a local variable during a backwards branch, or in a local variable in code protected by an exception handler or a finally clause. Otherwise, a devious piece of code might fool the verifier into thinking it had initialized a class instance when it had, in fact, initialized a class instance created in a previous pass through a loop.»

There are a number of places where XSLTC generates code that violates this requirement; a strict implementation of the verification process described by the JVM specification would detect the invalid byte code.  Most popular JVMs do not seem to detect this problem - presumably because their verification is less stringent - but this is a problem that needs to be fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2146) Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANJ-2146?page=comments#action_12319265 ] 

Brian Minchau commented on XALANJ-2146:
---------------------------------------

Henry, as the reporter of this issue, would you please close it, it is in the 2.7 release.

> Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack
> --------------------------------------------------------------------------------------------
>
>          Key: XALANJ-2146
>          URL: http://issues.apache.org/jira/browse/XALANJ-2146
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: Latest Development Code
>     Reporter: Henry Zongaro
>     Assignee: Henry Zongaro
>     Priority: Critical
>      Fix For: 2.7
>  Attachments: patch.j2146.txt
>
> Section 4.3.4 of the Java Virtual Machine Specification, 2nd Edition, places the following restriction on Java byte code:
> «A valid instruction sequence must not have an uninitialized object on the operand stack or in a local variable during a backwards branch, or in a local variable in code protected by an exception handler or a finally clause. Otherwise, a devious piece of code might fool the verifier into thinking it had initialized a class instance when it had, in fact, initialized a class instance created in a previous pass through a loop.»
> There are a number of places where XSLTC generates code that violates this requirement; a strict implementation of the verification process described by the JVM specification would detect the invalid byte code.  Most popular JVMs do not seem to detect this problem - presumably because their verification is less stringent - but this is a problem that needs to be fixed.
> See copy16.xsl for an example of the offending code sequence.  The id function seems to be involved in all cases that pose a problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Updated: (XALANJ-2146) Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack

Posted by "Henry Zongaro (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2146?page=all ]

Henry Zongaro updated XALANJ-2146:
----------------------------------

    Description: 
Section 4.3.4 of the Java Virtual Machine Specification, 2nd Edition, places the following restriction on Java byte code:

«A valid instruction sequence must not have an uninitialized object on the operand stack or in a local variable during a backwards branch, or in a local variable in code protected by an exception handler or a finally clause. Otherwise, a devious piece of code might fool the verifier into thinking it had initialized a class instance when it had, in fact, initialized a class instance created in a previous pass through a loop.»

There are a number of places where XSLTC generates code that violates this requirement; a strict implementation of the verification process described by the JVM specification would detect the invalid byte code.  Most popular JVMs do not seem to detect this problem - presumably because their verification is less stringent - but this is a problem that needs to be fixed.

See copy16.xsl for an example of the offending code sequence.  The id function seems to be involved in all cases that pose a problem.

  was:
Section 4.3.4 of the Java Virtual Machine Specification, 2nd Edition, places the following restriction on Java byte code:

«A valid instruction sequence must not have an uninitialized object on the operand stack or in a local variable during a backwards branch, or in a local variable in code protected by an exception handler or a finally clause. Otherwise, a devious piece of code might fool the verifier into thinking it had initialized a class instance when it had, in fact, initialized a class instance created in a previous pass through a loop.»

There are a number of places where XSLTC generates code that violates this requirement; a strict implementation of the verification process described by the JVM specification would detect the invalid byte code.  Most popular JVMs do not seem to detect this problem - presumably because their verification is less stringent - but this is a problem that needs to be fixed.


> Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack
> --------------------------------------------------------------------------------------------
>
>          Key: XALANJ-2146
>          URL: http://issues.apache.org/jira/browse/XALANJ-2146
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: CurrentCVS
>     Reporter: Henry Zongaro
>     Assignee: Henry Zongaro
>     Priority: Critical
>      Fix For: 2.7.0-future-release

>
> Section 4.3.4 of the Java Virtual Machine Specification, 2nd Edition, places the following restriction on Java byte code:
> «A valid instruction sequence must not have an uninitialized object on the operand stack or in a local variable during a backwards branch, or in a local variable in code protected by an exception handler or a finally clause. Otherwise, a devious piece of code might fool the verifier into thinking it had initialized a class instance when it had, in fact, initialized a class instance created in a previous pass through a loop.»
> There are a number of places where XSLTC generates code that violates this requirement; a strict implementation of the verification process described by the JVM specification would detect the invalid byte code.  Most popular JVMs do not seem to detect this problem - presumably because their verification is less stringent - but this is a problem that needs to be fixed.
> See copy16.xsl for an example of the offending code sequence.  The id function seems to be involved in all cases that pose a problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2146) Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack

Posted by "Henry Zongaro (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANJ-2146?page=comments#action_12314232 ] 

Henry Zongaro commented on XALANJ-2146:
---------------------------------------

Attached patch [1] which I believe resolves this issue.

[1] http://issues.apache.org/jira/secure/attachment/12310903/patch.j2146.txt

> Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack
> --------------------------------------------------------------------------------------------
>
>          Key: XALANJ-2146
>          URL: http://issues.apache.org/jira/browse/XALANJ-2146
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: CurrentCVS
>     Reporter: Henry Zongaro
>     Assignee: Henry Zongaro
>     Priority: Critical
>      Fix For: 2.7.0-future-release
>  Attachments: patch.j2146.txt
>
> Section 4.3.4 of the Java Virtual Machine Specification, 2nd Edition, places the following restriction on Java byte code:
> «A valid instruction sequence must not have an uninitialized object on the operand stack or in a local variable during a backwards branch, or in a local variable in code protected by an exception handler or a finally clause. Otherwise, a devious piece of code might fool the verifier into thinking it had initialized a class instance when it had, in fact, initialized a class instance created in a previous pass through a loop.»
> There are a number of places where XSLTC generates code that violates this requirement; a strict implementation of the verification process described by the JVM specification would detect the invalid byte code.  Most popular JVMs do not seem to detect this problem - presumably because their verification is less stringent - but this is a problem that needs to be fixed.
> See copy16.xsl for an example of the offending code sequence.  The id function seems to be involved in all cases that pose a problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Updated: (XALANJ-2146) Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2146?page=all ]

Brian Minchau updated XALANJ-2146:
----------------------------------

    Fix Version: 2.7
                     (was: CurrentCVS)

> Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack
> --------------------------------------------------------------------------------------------
>
>          Key: XALANJ-2146
>          URL: http://issues.apache.org/jira/browse/XALANJ-2146
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: CurrentCVS
>     Reporter: Henry Zongaro
>     Assignee: Henry Zongaro
>     Priority: Critical
>      Fix For: 2.7
>  Attachments: patch.j2146.txt
>
> Section 4.3.4 of the Java Virtual Machine Specification, 2nd Edition, places the following restriction on Java byte code:
> «A valid instruction sequence must not have an uninitialized object on the operand stack or in a local variable during a backwards branch, or in a local variable in code protected by an exception handler or a finally clause. Otherwise, a devious piece of code might fool the verifier into thinking it had initialized a class instance when it had, in fact, initialized a class instance created in a previous pass through a loop.»
> There are a number of places where XSLTC generates code that violates this requirement; a strict implementation of the verification process described by the JVM specification would detect the invalid byte code.  Most popular JVMs do not seem to detect this problem - presumably because their verification is less stringent - but this is a problem that needs to be fixed.
> See copy16.xsl for an example of the offending code sequence.  The id function seems to be involved in all cases that pose a problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2146) Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack

Posted by "Henry Zongaro (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANJ-2146?page=comments#action_12313700 ] 

Henry Zongaro commented on XALANJ-2146:
---------------------------------------

I've scanned classes of XSLTC that generated byte code and found the following have the potential to generate the offending sequence of code:

  AbsoluteLocationPath.java
  FilterExpr.java
  FilterParentPath.java
  FilteredAbsoluteLocationPath
  FunctionCall.java
  KeyCall.java
  ParentLocationPath.java
  Sort.java

These classes create an object on the stack and then generate byte code for arguments to the constructor for that object.  In all of these classes, the generated byte code could contain a backwards branch.  The fix will be to first generate the byte code for the arguments that could contain backwards branches, store their values in temporary variables, create the object, load the values of the relevant arguments to the constructor from their temporaries and finally invoke the constructor.

> Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack
> --------------------------------------------------------------------------------------------
>
>          Key: XALANJ-2146
>          URL: http://issues.apache.org/jira/browse/XALANJ-2146
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: CurrentCVS
>     Reporter: Henry Zongaro
>     Assignee: Henry Zongaro
>     Priority: Critical
>      Fix For: 2.7.0-future-release

>
> Section 4.3.4 of the Java Virtual Machine Specification, 2nd Edition, places the following restriction on Java byte code:
> «A valid instruction sequence must not have an uninitialized object on the operand stack or in a local variable during a backwards branch, or in a local variable in code protected by an exception handler or a finally clause. Otherwise, a devious piece of code might fool the verifier into thinking it had initialized a class instance when it had, in fact, initialized a class instance created in a previous pass through a loop.»
> There are a number of places where XSLTC generates code that violates this requirement; a strict implementation of the verification process described by the JVM specification would detect the invalid byte code.  Most popular JVMs do not seem to detect this problem - presumably because their verification is less stringent - but this is a problem that needs to be fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Updated: (XALANJ-2146) Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack

Posted by "Henry Zongaro (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2146?page=all ]

Henry Zongaro updated XALANJ-2146:
----------------------------------

    reviewer: jycli@ca.ibm.com

> Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack
> --------------------------------------------------------------------------------------------
>
>          Key: XALANJ-2146
>          URL: http://issues.apache.org/jira/browse/XALANJ-2146
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: CurrentCVS
>     Reporter: Henry Zongaro
>     Assignee: Henry Zongaro
>     Priority: Critical
>      Fix For: 2.7.0-future-release
>  Attachments: patch.j2146.txt
>
> Section 4.3.4 of the Java Virtual Machine Specification, 2nd Edition, places the following restriction on Java byte code:
> «A valid instruction sequence must not have an uninitialized object on the operand stack or in a local variable during a backwards branch, or in a local variable in code protected by an exception handler or a finally clause. Otherwise, a devious piece of code might fool the verifier into thinking it had initialized a class instance when it had, in fact, initialized a class instance created in a previous pass through a loop.»
> There are a number of places where XSLTC generates code that violates this requirement; a strict implementation of the verification process described by the JVM specification would detect the invalid byte code.  Most popular JVMs do not seem to detect this problem - presumably because their verification is less stringent - but this is a problem that needs to be fixed.
> See copy16.xsl for an example of the offending code sequence.  The id function seems to be involved in all cases that pose a problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Resolved: (XALANJ-2146) Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack

Posted by "Henry Zongaro (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2146?page=all ]
     
Henry Zongaro resolved XALANJ-2146:
-----------------------------------

    Fix Version: CurrentCVS
                     (was: 2.7.0-future-release)
     Resolution: Fixed

Applied patch in CVS.

> Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack
> --------------------------------------------------------------------------------------------
>
>          Key: XALANJ-2146
>          URL: http://issues.apache.org/jira/browse/XALANJ-2146
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: CurrentCVS
>     Reporter: Henry Zongaro
>     Assignee: Henry Zongaro
>     Priority: Critical
>      Fix For: CurrentCVS
>  Attachments: patch.j2146.txt
>
> Section 4.3.4 of the Java Virtual Machine Specification, 2nd Edition, places the following restriction on Java byte code:
> «A valid instruction sequence must not have an uninitialized object on the operand stack or in a local variable during a backwards branch, or in a local variable in code protected by an exception handler or a finally clause. Otherwise, a devious piece of code might fool the verifier into thinking it had initialized a class instance when it had, in fact, initialized a class instance created in a previous pass through a loop.»
> There are a number of places where XSLTC generates code that violates this requirement; a strict implementation of the verification process described by the JVM specification would detect the invalid byte code.  Most popular JVMs do not seem to detect this problem - presumably because their verification is less stringent - but this is a problem that needs to be fixed.
> See copy16.xsl for an example of the offending code sequence.  The id function seems to be involved in all cases that pose a problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Updated: (XALANJ-2146) Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack

Posted by "Henry Zongaro (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2146?page=all ]

Henry Zongaro updated XALANJ-2146:
----------------------------------

    Attachment: patch.j2146.txt

> Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack
> --------------------------------------------------------------------------------------------
>
>          Key: XALANJ-2146
>          URL: http://issues.apache.org/jira/browse/XALANJ-2146
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: CurrentCVS
>     Reporter: Henry Zongaro
>     Assignee: Henry Zongaro
>     Priority: Critical
>      Fix For: 2.7.0-future-release
>  Attachments: patch.j2146.txt
>
> Section 4.3.4 of the Java Virtual Machine Specification, 2nd Edition, places the following restriction on Java byte code:
> «A valid instruction sequence must not have an uninitialized object on the operand stack or in a local variable during a backwards branch, or in a local variable in code protected by an exception handler or a finally clause. Otherwise, a devious piece of code might fool the verifier into thinking it had initialized a class instance when it had, in fact, initialized a class instance created in a previous pass through a loop.»
> There are a number of places where XSLTC generates code that violates this requirement; a strict implementation of the verification process described by the JVM specification would detect the invalid byte code.  Most popular JVMs do not seem to detect this problem - presumably because their verification is less stringent - but this is a problem that needs to be fixed.
> See copy16.xsl for an example of the offending code sequence.  The id function seems to be involved in all cases that pose a problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2146) Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack

Posted by "Christine Li (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANJ-2146?page=comments#action_12314816 ] 

Christine Li commented on XALANJ-2146:
--------------------------------------

I've reviewed the patch. It corrected the problem specified in JVM spec 2.9.4.  This patch covered all classes that generate byte code to construct an instance of a class. I've tested with J9, it does fix the test case copy16. 


> Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack
> --------------------------------------------------------------------------------------------
>
>          Key: XALANJ-2146
>          URL: http://issues.apache.org/jira/browse/XALANJ-2146
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: CurrentCVS
>     Reporter: Henry Zongaro
>     Assignee: Henry Zongaro
>     Priority: Critical
>      Fix For: 2.7.0-future-release
>  Attachments: patch.j2146.txt
>
> Section 4.3.4 of the Java Virtual Machine Specification, 2nd Edition, places the following restriction on Java byte code:
> «A valid instruction sequence must not have an uninitialized object on the operand stack or in a local variable during a backwards branch, or in a local variable in code protected by an exception handler or a finally clause. Otherwise, a devious piece of code might fool the verifier into thinking it had initialized a class instance when it had, in fact, initialized a class instance created in a previous pass through a loop.»
> There are a number of places where XSLTC generates code that violates this requirement; a strict implementation of the verification process described by the JVM specification would detect the invalid byte code.  Most popular JVMs do not seem to detect this problem - presumably because their verification is less stringent - but this is a problem that needs to be fixed.
> See copy16.xsl for an example of the offending code sequence.  The id function seems to be involved in all cases that pose a problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Updated: (XALANJ-2146) Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack

Posted by "Henry Zongaro (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2146?page=all ]

Henry Zongaro updated XALANJ-2146:
----------------------------------

    Xalan info: [PatchAvailable]

> Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack
> --------------------------------------------------------------------------------------------
>
>          Key: XALANJ-2146
>          URL: http://issues.apache.org/jira/browse/XALANJ-2146
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: CurrentCVS
>     Reporter: Henry Zongaro
>     Assignee: Henry Zongaro
>     Priority: Critical
>      Fix For: 2.7.0-future-release
>  Attachments: patch.j2146.txt
>
> Section 4.3.4 of the Java Virtual Machine Specification, 2nd Edition, places the following restriction on Java byte code:
> «A valid instruction sequence must not have an uninitialized object on the operand stack or in a local variable during a backwards branch, or in a local variable in code protected by an exception handler or a finally clause. Otherwise, a devious piece of code might fool the verifier into thinking it had initialized a class instance when it had, in fact, initialized a class instance created in a previous pass through a loop.»
> There are a number of places where XSLTC generates code that violates this requirement; a strict implementation of the verification process described by the JVM specification would detect the invalid byte code.  Most popular JVMs do not seem to detect this problem - presumably because their verification is less stringent - but this is a problem that needs to be fixed.
> See copy16.xsl for an example of the offending code sequence.  The id function seems to be involved in all cases that pose a problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Closed: (XALANJ-2146) Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack

Posted by "Henry Zongaro (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2146?page=all ]
     
Henry Zongaro closed XALANJ-2146:
---------------------------------


I have confirmed that this problem is resolved in Xalan-J 2.7.0.

> Byte code generated by XSLTC contains backwards branch when uninitialized object is on stack
> --------------------------------------------------------------------------------------------
>
>          Key: XALANJ-2146
>          URL: http://issues.apache.org/jira/browse/XALANJ-2146
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: Latest Development Code
>     Reporter: Henry Zongaro
>     Assignee: Henry Zongaro
>     Priority: Critical
>      Fix For: 2.7
>  Attachments: patch.j2146.txt
>
> Section 4.3.4 of the Java Virtual Machine Specification, 2nd Edition, places the following restriction on Java byte code:
> «A valid instruction sequence must not have an uninitialized object on the operand stack or in a local variable during a backwards branch, or in a local variable in code protected by an exception handler or a finally clause. Otherwise, a devious piece of code might fool the verifier into thinking it had initialized a class instance when it had, in fact, initialized a class instance created in a previous pass through a loop.»
> There are a number of places where XSLTC generates code that violates this requirement; a strict implementation of the verification process described by the JVM specification would detect the invalid byte code.  Most popular JVMs do not seem to detect this problem - presumably because their verification is less stringent - but this is a problem that needs to be fixed.
> See copy16.xsl for an example of the offending code sequence.  The id function seems to be involved in all cases that pose a problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org