Commit 97b9646
Validate output buffer capacity in RapidsInputFile.readVectored default
Throw IllegalArgumentException when any CopyRange's outputOffset + length
exceeds output.getLength(), before opening the stream. This lets callers
rely on the default implementation instead of duplicating the check, and
gives a clearer error message than the lower-level failure surfaced by
HostMemoryBuffer.copyFromStream.
The CopyRange constructor already rejects negative inputOffset/outputOffset
and non-positive length, so those guards are not duplicated here.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Chong Gao <res_life@163.com>1 parent 315db02 commit 97b9646
2 files changed
Lines changed: 20 additions & 0 deletions
File tree
- src
- main/java/com/nvidia/spark/rapids/jni/fileio
- test/java/com/nvidia/spark/rapids/jni/fileio
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
77 | 83 | | |
78 | 84 | | |
79 | 85 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
69 | 83 | | |
70 | 84 | | |
71 | 85 | | |
| |||
0 commit comments