mirror of
https://github.com/golang/go
synced 2024-11-22 04:34:39 -07:00
gc: Allow allow data types up to 1GB
R=rsc https://golang.org/cl/164095
This commit is contained in:
parent
6db683fe4d
commit
7e7008fa5e
@ -52,7 +52,7 @@ allocparams(void)
|
||||
continue;
|
||||
dowidth(n->type);
|
||||
w = n->type->width;
|
||||
if(w >= 100000000)
|
||||
if(w >= MAXWIDTH)
|
||||
fatal("bad width");
|
||||
stksize += w;
|
||||
stksize = rnd(stksize, w);
|
||||
|
@ -53,7 +53,8 @@ enum
|
||||
AINTER,
|
||||
ANILINTER,
|
||||
|
||||
BADWIDTH = -1000000000
|
||||
BADWIDTH = -1000000000,
|
||||
MAXWIDTH = 1<<30
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -2431,7 +2431,7 @@ setmaxarg(Type *t)
|
||||
|
||||
dowidth(t);
|
||||
w = t->argwid;
|
||||
if(t->argwid >= 100000000)
|
||||
if(t->argwid >= MAXWIDTH)
|
||||
fatal("bad argwid %T", t);
|
||||
if(w > maxarg)
|
||||
maxarg = w;
|
||||
|
Loading…
Reference in New Issue
Block a user