This is an automated email from the ASF dual-hosted git repository.
zuston pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new 32f4ac6c5 [#2575] fix(spark): Fix java.lang.IndexOutOfBoundsException:
len is negative (#2589)
32f4ac6c5 is described below
commit 32f4ac6c530058f7342dc17f6e707dad428f74b1
Author: Neo Chien <[email protected]>
AuthorDate: Tue Aug 26 14:15:46 2025 +0800
[#2575] fix(spark): Fix java.lang.IndexOutOfBoundsException: len is
negative (#2589)
### What changes were proposed in this pull request?
Fix java.lang.IndexOutOfBoundsException: len is negative
### Why are the changes needed?
for https://github.com/apache/uniffle/issues/2575
### Does this PR introduce any user-facing change?
No.
### How was this patch tested?
UT
---
.../java/org/apache/spark/shuffle/reader/RssShuffleDataIterator.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git
a/client-spark/common/src/main/java/org/apache/spark/shuffle/reader/RssShuffleDataIterator.java
b/client-spark/common/src/main/java/org/apache/spark/shuffle/reader/RssShuffleDataIterator.java
index 4f9900ce7..bd0ae0ccb 100644
---
a/client-spark/common/src/main/java/org/apache/spark/shuffle/reader/RssShuffleDataIterator.java
+++
b/client-spark/common/src/main/java/org/apache/spark/shuffle/reader/RssShuffleDataIterator.java
@@ -161,6 +161,10 @@ public class RssShuffleDataIterator<K, C> extends
AbstractIterator<Product2<K, C
shuffleReadMetrics.incRemoteBytesRead(rawDataLength);
int uncompressedLen = rawBlock.getUncompressLength();
+ if (uncompressedLen < 0) {
+ LOG.error("Uncompressed length is negative: {}", uncompressedLen);
+ throw new IllegalArgumentException("Uncompressed length is negative: " +
uncompressedLen);
+ }
if (codec.isPresent()) {
if (uncompressedData == null
|| uncompressedData.capacity() < uncompressedLen