Under Windows, using foreach to iterate over an uninitalized AA generates an Access Violation. ////////////////////////// import std.stdio; void main(){ uint[char[]] foobar; foreach(value; foobar){} // fails on foreach }
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 d-bugmail@puremagic.com schrieb am 2006-04-08: > http://d.puremagic.com/bugzilla/show_bug.cgi?id=95 > Under Windows, using foreach to iterate over an uninitalized AA generates an > Access Violation. > > ////////////////////////// > import std.stdio; > > void main(){ > uint[char[]] foobar; > foreach(value; foobar){} // fails on foreach > } Added to DStress as http://dstress.kuehne.cn/run/f/foreach_35_A.d http://dstress.kuehne.cn/run/f/foreach_35_B.d http://dstress.kuehne.cn/run/f/foreach_35_C.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFEOLO93w+/yD4P9tIRAne3AKCXwPswPGm1bsXzgT7M1nyWFEerBACfQew2 mr8hcIW+GAmLszLrEW5kwDM= =p/7L -----END PGP SIGNATURE-----
I experimented with this a bit after it broke a bit of SDWF. It happens only if the AA is actually uninitialised - if you've added something to the AA and then deleted it then it behaves correctly.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 d-bugmail@puremagic.com schrieb am 2006-04-09: > http://d.puremagic.com/bugzilla/show_bug.cgi?id=95 > ------- Comment #2 from smjg@iname.com 2006-04-09 06:52 ------- > I experimented with this a bit after it broke a bit of SDWF. It happens only > if the AA is actually uninitialised - if you've added something to the AA and > then deleted it then it behaves correctly. Added to DStress as http://dstress.kuehne.cn/run/f/foreach_35_D.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFEOWOQ3w+/yD4P9tIRAo6BAJ9QRbbynIICx23H8UY++fHYCrAhbwCdF7Px AegIgXpNCy/EssV8sNYqRVc= =43pG -----END PGP SIGNATURE-----
Fixed 0.153
dlang/dlang-bot pull request #271 "Fixes so far" was merged into master: - 284d4c4740655425ef1a98e29a7dd916dbd6f930 by Vladimir Panteleev: Tag Enhancement and Bug in the same pull request Fixes #95. https://github.com/dlang/dlang-bot/pull/271