]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: allow C.malloc(0) always
authorRuss Cox <rsc@golang.org>
Mon, 16 Sep 2013 18:04:55 +0000 (14:04 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 16 Sep 2013 18:04:55 +0000 (14:04 -0400)
commit647eaed93b2aba07d4d4d032d5f58bf6dbc06e5a
treee2cbd94e66668dea4773f4edb2f5cddeb154035e
parentb2794a1c2ed8c74563cf28d9e4a9b3f1db43ef1f
cmd/cgo: allow C.malloc(0) always

Because we can, and because it otherwise might crash
the program if we think we're out of memory.

Fixes #6390.

R=golang-dev, iant, minux.ma
CC=golang-dev
https://golang.org/cl/13345048
misc/cgo/test/cgo_test.go
src/cmd/cgo/out.go
src/pkg/runtime/cgo/gcc_util.c