aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/debug
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2015-10-15 11:29:06 -0700
committerMatthew Dempsky <mdempsky@google.com>2015-10-15 20:56:58 +0000
commit67722fea5015d43d8fc9a533533c9b580fa99fc8 (patch)
tree627200acb89f0f9e9e0f6ef3d46c763a11002a54 /src/runtime/debug
parent7eb94db44c6ebaaf5f94629f66fddb4a78ebd34a (diff)
downloadgo-67722fea5015d43d8fc9a533533c9b580fa99fc8.tar.xz
cmd/compile/internal/gc: reject invalid unsafe.Sizeof([0]byte{}[0])
Apply static bounds checking logic during type checking even to zero-element arrays, but skip synthesized OINDEX nodes that the compiler has asserted are within bounds (such as the ones generated while desugaring ORANGE nodes). This matches the logic in walkexpr that also skips static bounds checking when Bounded is true. Passes toolstash/buildall. Fixes #12944. Change-Id: I14ba03d71c002bf969d69783bec8d1a8e10e7d75 Reviewed-on: https://go-review.googlesource.com/15902 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/debug')
0 files changed, 0 insertions, 0 deletions