]> Cypherpunks repositories - gostls13.git/commit
runtime: don't crash in SetFinalizer if sizeof *x is zero
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 17 Dec 2013 22:18:58 +0000 (14:18 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 17 Dec 2013 22:18:58 +0000 (14:18 -0800)
commit4b76a31c6d9fd9dd0c58b46a71c10d5061ed39eb
tree1663c5bf814aec2517a62bbc4ce2cc3f84b084bb
parenta1a3d213559861f407a9f5bc7db3c3ae0d7fe5c5
runtime: don't crash in SetFinalizer if sizeof *x is zero

And document it explicitly, even though it already said
it wasn't guaranteed.

Fixes #6857

R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/43580043
src/pkg/runtime/extern.go
src/pkg/runtime/malloc.goc
src/pkg/runtime/mfinal_test.go