www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - big array crashes dmd .121 and optlink

reply zwang <nehzgnaw gmail.com> writes:
void main(){
static char a[int.max/32];
//crashes dmd .121
}

------

void main(){
static char a[int.max/32] = [0];
//crashes optlink
}
Apr 16 2005
next sibling parent "Walter" <newshound digitalmars.com> writes:
"zwang" <nehzgnaw gmail.com> wrote in message
news:d3sq2j$1086$1 digitaldaemon.com...
 void main(){
 static char a[int.max/32] = [0];
 //crashes optlink
 }
This is a long known bug in optlink :-( Fortunately, the workaround is both trivial and better anyway, as it is inefficient to have a giant .exe file full of 0's.
Apr 17 2005
prev sibling parent Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

zwang schrieb am Sun, 17 Apr 2005 12:51:54 +0800:
 void main(){
 static char a[int.max/32];
 //crashes dmd .121
 }

 ------

 void main(){
 static char a[int.max/32] = [0];
 //crashes optlink
 }
Added to DStress as http://dstress.kuehne.cn/run/array_initialization_08.d http://dstress.kuehne.cn/nocompile/array_initialization_09.d http://dstress.kuehne.cn/run/array_initialization_10.d http://dstress.kuehne.cn/nocompile/array_initialization_11.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCY2Ih3w+/yD4P9tIRAjXPAJ4hvFw8XJLTBXICbJ4mymtCEbqeHwCdGcyX FxYjjBtNolA3qgou7DyQHrM= =wmdW -----END PGP SIGNATURE-----
Apr 18 2005