Skip to content

Commit e3384ed

Browse files
nazarhussainclaude
andcommitted
test(fuzz): note getValueBigintWords overflow in rtBigIntWords
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 679f8f5 commit e3384ed

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎tests/fuzz/mod.zig‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ pub fn rtBigIntI128LowBits(b: js.BigInt) !js.BigInt {
9494
///
9595
/// Implementation notes:
9696
/// - We pass a 64-word buffer to `getValueBigintWords`. The `src/Value.zig`
97-
/// wrapper now clamps the returned slice to `@min(word_count, buffer.len)`,
98-
/// so oversized BigInts silently truncate. The 64-word cap covers all
99-
/// entries in `edgeBigInts` (the largest, `1n << 256n`, is 5 words).
97+
/// wrapper returns `error.Overflow` for BigInts needing more words, so
98+
/// oversized BigInts throw. The 64-word cap covers all entries in
99+
/// `edgeBigInts` (the largest, `1n << 256n`, is 5 words).
100100
/// - Sign bit and the populated word slice are forwarded to `fromWords`.
101101
pub fn rtBigIntWords(b: js.BigInt) !js.BigInt {
102102
var sign_bit: u1 = 0;

0 commit comments

Comments
 (0)