]> Cypherpunks repositories - gostls13.git/commit
runtime: throw if the runtime panics with out of bounds index
authorIan Lance Taylor <iant@golang.org>
Thu, 28 Jun 2018 23:45:28 +0000 (16:45 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 29 Jun 2018 21:29:17 +0000 (21:29 +0000)
commitf43aa1df701d7190eeaf301d3a41e1714c516c45
tree452f2ee9d5e13b5de4c3a2de36d8dff850cf9488
parent955cc07dde70415489fb2096eb575654181e21fe
runtime: throw if the runtime panics with out of bounds index

If the runtime code panics due to a bad index or slice expression,
then throw instead of panicing. This will skip calls to recover and dump
the entire runtime stack trace. The runtime should never panic due to
an out of bounds index, and this will help with debugging if it does.

For #24991
Updates #25201

Change-Id: I85a9feded8f0de914ee1558425931853223c0514
Reviewed-on: https://go-review.googlesource.com/121515
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/crash_test.go
src/runtime/export_test.go
src/runtime/panic.go