Project

Profile

Help

Bug #2085

closed

Exception java.lang.AssertionError: Internal error: invalid slot number for local variable (0)

Added by O'Neil Delpratt almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Internals
Sprint/Milestone:
-
Start date:
2014-06-03
Due date:
% Done:

100%

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

Description

Bug issue reported by Gerrit Imsieke:

(Reproduced with HE and PE.)

Given this document:

<A/>

and this stylesheet:

<xsl:stylesheet
  version="2.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:my="my"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  exclude-result-prefixes="xs my">

  <xsl:template match="A[. = key('my:k', 'bar')]"/>

  <xsl:key name="my:k" match="*[my:f(current())]" use="'foo'" />

  <xsl:function name="my:f" as="xs:boolean">
    <xsl:param name="ancestor-elt" as="element(*)" />
    <xsl:sequence select="false()" />
  </xsl:function>

</xsl:stylesheet>

The following exception is thrown:

Exception in thread "main" java.lang.AssertionError: Internal error: 
invalid slot number for local variable (0)
        at 
net.sf.saxon.expr.XPathContextMinor.setLocalVariable(XPathContextMinor.java:288)
        at 
net.sf.saxon.pattern.PatternThatSetsCurrent.matches(PatternThatSetsCurrent.java:88)
        at net.sf.saxon.pattern.Pattern$3.mapItem(Pattern.java:345)
        at 
net.sf.saxon.expr.ItemMappingIterator.next(ItemMappingIterator.java:97)
        at 
net.sf.saxon.trans.KeyManager.constructIndex(KeyManager.java:258)
        at net.sf.saxon.trans.KeyManager.buildIndex(KeyManager.java:215)
        at net.sf.saxon.trans.KeyManager.obtainIndex(KeyManager.java:583)
        at net.sf.saxon.trans.KeyManager.selectByKey(KeyManager.java:504)
        at net.sf.saxon.functions.KeyFn.iterate(KeyFn.java:324)
        at net.sf.saxon.expr.Atomizer.iterate(Atomizer.java:294)
        at 
net.sf.saxon.expr.GeneralComparison.effectiveBooleanValue(GeneralComparison.java:616)
        at 
net.sf.saxon.pattern.PatternWithPredicate.matches(PatternWithPredicate.java:141)
        at net.sf.saxon.trans.Mode.searchRuleChain(Mode.java:570)
        at net.sf.saxon.trans.Mode.getRule(Mode.java:476)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1041)
        at 
net.sf.saxon.trans.TextOnlyCopyRuleSet.process(TextOnlyCopyRuleSet.java:65)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1045)
        at net.sf.saxon.Controller.transformDocument(Controller.java:2080)
        at net.sf.saxon.Controller.transform(Controller.java:1903)
        at net.sf.saxon.Transform.processFile(Transform.java:998)
        at net.sf.saxon.Transform.doTransform(Transform.java:625)
        at net.sf.saxon.Transform.main(Transform.java:82) 
Actions #1

Updated by O'Neil Delpratt almost 10 years ago

  • Status changed from New to Resolved
  • Assignee set to O'Neil Delpratt
  • % Done changed from 0 to 100

Bug fixed and committed to subversion. Available for next maintenance release.

There was no allocation of the slot number, when used in the key instruction that has a match pattern which uses the current() function.

Actions #2

Updated by O'Neil Delpratt over 9 years ago

  • Status changed from Resolved to Closed
  • Fixed in version set to 9.5.1.6

Bug fix applied in Saxon maintenance release 9.5.1.6

Please register to edit this issue

Also available in: Atom PDF