]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix crash on write barrier insertion
authorKeith Randall <keithr@alum.mit.edu>
Fri, 2 Aug 2019 17:36:03 +0000 (10:36 -0700)
committerKeith Randall <khr@golang.org>
Fri, 2 Aug 2019 19:35:37 +0000 (19:35 +0000)
commit316ac4f33061653871c0dff7f282d1c4de9388de
tree6489f76f5f09fa218f2708afef774a8646a2a557
parentbdea352b96c6934ee49920b18c3b8aedffd27d08
cmd/compile: fix crash on write barrier insertion

The compiler can crash if the compiled code tries to
unconditionally read from a nil pointer. This should cause
the generated binary to panic, not the compiler.

Fixes #33438

Change-Id: Ic8fa89646d6968e2cc4e27da0ad9286662f8bc49
Reviewed-on: https://go-review.googlesource.com/c/go/+/188760
Reviewed-by: Austin Clements <austin@google.com>
src/cmd/compile/internal/ssa/writebarrier.go
test/fixedbugs/issue33438.go [new file with mode: 0644]