Bug #3217
closed
Warning: bytecode generation fails for try/catch
Fix Committed on Branch:
9.7
Fixed in Maintenance Release:
Description
Warning seen while running the following expression in the latest saxon-ee 9.7.0.18:
let $x := try {
1
}
catch *
{
2
}
return xs:int($x)
Warning: Bytecode generation failed for main: (class: EE_main_01607683033, method: process signature: (Lnet/sf/saxon/expr/XPathContext;)V) Inconsistent stack height 1 != 2
See attached bytecode.
For 9.5, 9.6 warning is not returned but also fails bytecode generation (can be seen by adding debugByteCode="true")
Files
let $x := try{
1
}
catch *
{
$err:code
}
return xs:int($x)
Warning: Bytecode generation failed for main: (class: EE_main_01259652483, method: iterate signature: (Lnet/sf/saxon/expr/XPathContext;)Lnet/sf/saxon/om/SequenceIterator;) Inconsistent stack height 1 != 3
- Status changed from New to In Progress
- Assignee set to O'Neil Delpratt
- Priority changed from Low to Normal
Thank you for reporting the issue you have found.
Yes there is a bug in the bytecode generation which I am now investigating. The failure is detected which results in a warning message and the the compiler switching back to interpreted mode.
- Status changed from In Progress to Resolved
- Fix Committed on Branch 9.7 added
Bug fix applied in the TryCatch class. Here we call the the general InterpretedExpressionCompiler instead TryCatchExpressionCompiler. The TryCatchExpressonCompiler is not yet able to properly generate bytecode for try-catch.
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.7.0.19 added
Bug fix applied in the 9.7.0.19 maintenance release.
Please register to edit this issue
Also available in: Atom
PDF