Commit 7b6bdfb7 authored by Russ Cox's avatar Russ Cox

two uses of uninitialized memory,

picked up by valgrind.
fixes test/escape.go on linux.

R=ken
OCL=23971
CL=23971
parent 25a2b362
......@@ -118,7 +118,7 @@ cgen(Node *n, Node *res)
p1 = gins(a, N, res);
p1->from = addr;
} else {
regalloc(&n2, n->type, &n1);
regalloc(&n2, n->type, N);
p1 = gins(a, N, &n2);
p1->from = addr;
gins(a, &n2, res);
......
......@@ -1006,7 +1006,8 @@ gins(int as, Node *f, Node *t)
void
naddr(Node *n, Addr *a)
{
a->scale = 0;
a->index = D_NONE;
a->type = D_NONE;
if(n == N)
return;
......
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