go/src/cmd/cgo
Russ Cox 397ba2cb4a cmd/cgo: replace C.malloc with our own wrapper
This allows us to make two changes:

1. Force the argument type to be size_t, even on broken
   systems that declare malloc to take a ulong.

2. Call runtime.throw if malloc fails.
   (That is, the program crashes; it does not panic.)

Fixes #3403.
Fixes #5926.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/13413047
2013-09-11 11:30:08 -04:00
..
ast.go cmd/cgo: replace C.malloc with our own wrapper 2013-09-11 11:30:08 -04:00
doc.go cmd/cgo: document command line options 2013-09-03 21:23:52 -07:00
gcc.go cmd/cgo: don't say "gcc produced no output" if we ran clang 2013-09-11 09:56:51 -04:00
godefs.go cmd/cgo: Fix issue with cgo cdefs 2013-07-24 17:27:42 -07:00
main.go cmd/cgo: replace C.malloc with our own wrapper 2013-09-11 11:30:08 -04:00
out.go cmd/cgo: replace C.malloc with our own wrapper 2013-09-11 11:30:08 -04:00
util.go cmd/cgo: don't reimplement os/exec in util.go. 2013-03-01 15:04:14 -05:00