Project

Profile

Help

Bug #3217

closed

Warning: bytecode generation fails for try/catch

Added by Taras Chervinka over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
2017-05-11
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.7
Fix Committed on Branch:
9.7
Fixed in Maintenance Release:
Platforms:

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

ByteCodeOutput.txt (13.7 KB) ByteCodeOutput.txt Taras Chervinka, 2017-05-11 13:54
EE_main_0526903503.txt (8.27 KB) EE_main_0526903503.txt Taras Chervinka, 2017-05-11 13:54
Actions #1

Updated by Taras Chervinka over 7 years ago

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

Actions #2

Updated by O'Neil Delpratt over 7 years ago

  • 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.

Actions #3

Updated by O'Neil Delpratt over 7 years ago

  • 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.

Actions #4

Updated by O'Neil Delpratt over 7 years ago

  • 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