Go version
go 1.26.1 + tip
Output of go env in your module/workspace:
What did you do?
package p
const (
a = "x"
b = a + a
c = b + b
d = c + c
e = d + d
f = e + e
g = f + f
h = g + g
i = h + h
j = i + i
k = j + j
l = k + k
m = l + l
n = m + m
o = n + n
p = o + o
q = p + p
r = q + q
s = r + r
t = s + s
u = t + t
v = u + u
w = v + v
x = w + w
y = x + x
z = y + y
A = z + z
B = A + A
C = B + B
D = C + C
E = D + D
F = E + E
G = F + F
H = G + G
I = H + H
J = I + I
K = J + J
L = K + K
M = L + L
N = M + M
O = N + N
P = O + O
Q = P + P
R = Q + Q
S = R + R
T = S + S
U = T + T
V = U + U
W = V + V
X = W + W
Y = X + X
Z = Y + Y
)
var _ = []rune(Z[:])
Ran go build on the above.
What did you see happen?
Extensive memory allocation and OOM.
What did you expect to see?
Low memory usage.
Go version
go 1.26.1 + tip
Output of
go envin your module/workspace:What did you do?
Ran
go buildon the above.What did you see happen?
Extensive memory allocation and OOM.
What did you expect to see?
Low memory usage.