[
https://issues.apache.org/jira/browse/LUCENE-10678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17578474#comment-17578474
]
ASF subversion and git services commented on LUCENE-10678:
----------------------------------------------------------
Commit 21f892d09698208ce146775e5b7641c554410002 in lucene's branch
refs/heads/branch_9_3 from Ignacio Vera
[ https://gitbox.apache.org/repos/asf?p=lucene.git;h=21f892d0969 ]
LUCENE-10678: Fix potential overflow when computing the partition point on the
BKD tree (#1065)
We currently compute the partition point for a set of points by multiplying the
number of nodes that needs to be on
the left of the BKD tree by the maxPointsInLeafNode. This multiplication is
done on the integer space so if the partition point is bigger than
Integer.MAX_VALUE it will overflow. This commit moves the multiplication to the
long space so it doesn't overflow.
# Conflicts:
# lucene/CHANGES.txt
> computing the partition point on a BKD tree merge can overflow
> --------------------------------------------------------------
>
> Key: LUCENE-10678
> URL: https://issues.apache.org/jira/browse/LUCENE-10678
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Ignacio Vera
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> I just discover a bad bug in the BKD tree when doing merges. Before calling
> the BKDTreeRadix selector we need to compute the partition point which is
> dome multiplying two integers. If the partition point is > Integer.MAX_VALUE
> then it will overflow.
> https://github.com/apache/lucene/blob/35ca2d79f73c6dfaf5e648fe241f7e0b37084a90/lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java#L2021
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]