Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/cgo: make C.malloc(0) return non-nil #6390
Now that C.malloc is really C.__Cmalloc where __Cmalloc is our wrapper, we should make the wrapper change 0 to 1 before calling the standard malloc. The standard malloc(0) can return NULL, which will make the wrapper crash the program. Thanks to Ralph Corderoy for the reminder. (See issue #3403.)
This issue was closed.