From edb4a07d4ddf01c7f4d589b0f427ba6b9e03134b Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 18 Apr 2022 06:54:46 -0700 Subject: [PATCH] Sema: fix not reserving enough memory for comptime shl --- src/value.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/value.zig b/src/value.zig index 713cacb7b0..ff2c0c271b 100644 --- a/src/value.zig +++ b/src/value.zig @@ -3987,7 +3987,7 @@ pub const Value = extern union { const shift = @intCast(usize, rhs.toUnsignedInt(target)); const limbs = try arena.alloc( std.math.big.Limb, - std.math.big.int.calcTwosCompLimbCount(info.bits), + std.math.big.int.calcTwosCompLimbCount(info.bits) + 1, ); var result_bigint = BigIntMutable{ .limbs = limbs,