golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.08k stars 17.68k forks source link

runtime: lack of checking of pointer returned by sysAlloc #41827

Open michalderkacz opened 4 years ago

michalderkacz commented 4 years ago

Lack of checking of pointer returned by sysAlloc at src/runtime/mpagealloc.go:395.

Consider move nil checking into sysAlloc function itself. Currently almost all checks simply throw "runtime: cannot allocate memory".

ianlancetaylor commented 4 years ago

CC @mknyszek