Commit d2204e6c authored by Keith Randall's avatar Keith Randall

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
parent fbfd32b8
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment