The Addr might be a stack variable with uninitialized fields.
Fixes #9777.
Change-Id: I799786e3d8b2e17e069725bc66a076cf9ca11f93
Signed-off-by: Shenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/3932
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-by: Keith Randall <khr@golang.org>
if(n->type == T)
return 0;
+ memset(a, 0, sizeof *a);
+
switch(n->op) {
case OLITERAL:
if(!isconst(n, CTINT))
if(n->type == T)
return 0;
+ memset(a, 0, sizeof *a);
+
switch(n->op) {
case OLITERAL:
if(!isconst(n, CTINT))
{
USED(as);
USED(n);
- USED(a);
+ memset(a, 0, sizeof *a);
return 0;
}
sudoaddable(int as, Node *n, Addr *a)
{
// TODO(minux)
- USED(as); USED(n); USED(a);
+ USED(as); USED(n);
+ memset(a, 0, sizeof *a);
return 0;
}