mirror of
https://github.com/golang/go
synced 2024-11-19 06:54:39 -07:00
cmd/gc: don't allow escaping arguments in the runtime package.
This is a case that was missed in https://golang.org/cl/105280047/ LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/120910043
This commit is contained in:
parent
fbfd32b80c
commit
d2204e6c0e
@ -2356,6 +2356,8 @@ paramstoheap(Type **argin, int out)
|
||||
continue;
|
||||
|
||||
// generate allocation & copying code
|
||||
if(compiling_runtime)
|
||||
fatal("%N escapes to heap, not allowed in runtime.", v);
|
||||
if(v->alloc == nil)
|
||||
v->alloc = callnew(v->type);
|
||||
nn = list(nn, nod(OAS, v->heapaddr, v->alloc));
|
||||
|
Loading…
Reference in New Issue
Block a user