]> Cypherpunks repositories - gostls13.git/commitdiff
segment fault
authorKen Thompson <ken@golang.org>
Thu, 9 Jul 2009 18:41:06 +0000 (11:41 -0700)
committerKen Thompson <ken@golang.org>
Thu, 9 Jul 2009 18:41:06 +0000 (11:41 -0700)
R=rsc
OCL=31396
CL=31396

src/cmd/gc/walk.c

index 08be5bfcb4bc8fbd14faf7134a291a4fe958e8dd..65313bcbcee64bc8224b6fb36cca35dc5099a96d 100644 (file)
@@ -790,6 +790,10 @@ loop:
                if(top != Erv)
                        goto nottop;
                walktype(n->left, Erv);
+               if(n->left == N) {
+                       yyerror("missing argument to len");
+                       goto ret;
+               }
                defaultlit(n->left, T);
                implicitstar(&n->left);
                t = n->left->type;