https://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2014-06-08T21:15:10ZSaxonica Developer CommunitySaxon-CE - Bug #2086: ArrayIndexOutOfBounds handling regular expressionhttps://saxonica.plan.io/issues/2086?journal_id=31992014-06-08T21:15:10ZMichael Kaymike@saxonica.com
<ul></ul><p>There's a special path in the code to handle the ranges a-z and A-Z in the code for case-independent matching, so the symptoms aren't quite as weird as they may seem. (See RECompiler lines 612-616)</p>
<p>However, the same code appears to be present in the 9.5 branch and the problem doesn't occur there.</p> Saxon-CE - Bug #2086: ArrayIndexOutOfBounds handling regular expressionhttps://saxonica.plan.io/issues/2086?journal_id=32002014-06-08T21:37:37ZMichael Kaymike@saxonica.com
<ul></ul><p>This is a bug which has at some stage been fixed in 9.5 but not in Saxon-CE. In class IntRangeSet, lines 342-343 read</p>
<pre><code> System.arraycopy(startPoints, i, startPoints, i+1, used-i);
System.arraycopy(endPoints, i, endPoints, i+1, used-i);
</code></pre>
<p>which on the 9.5 branch has been corrected to:</p>
<pre><code> System.arraycopy(startPoints, i, startPoints, i+1, used-i-1);
System.arraycopy(endPoints, i, endPoints, i+1, used-i-1);
</code></pre> Saxon-CE - Bug #2086: ArrayIndexOutOfBounds handling regular expressionhttps://saxonica.plan.io/issues/2086?journal_id=32012014-06-08T21:47:20ZMichael Kaymike@saxonica.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li><li><strong>Assignee</strong> set to <i>Michael Kay</i></li><li><strong>Priority</strong> changed from <i>Low</i> to <i>Normal</i></li><li><strong>Sprint/Milestone</strong> set to <i>Release 1.1</i></li><li><strong>Found in version</strong> set to <i>1.1</i></li></ul><p>Patch applied on the CE 1.1 and 2.0 branches.</p>