Mercurial > projects > dstress
changeset 1470:86c8a8d4694b
[Issue 929] Resizing array of associative arrays (uint[char[]][]) causes infinite loop / hang
Nick Atamas <nick.atamas@gmail.com>
2007-02-04
http://d.puremagic.com/issues/show_bug.cgi?id=929
author | thomask |
---|---|
date | Thu, 05 Apr 2007 16:35:45 +0000 |
parents | 0767a3cee5f2 |
children | 44d9b47ed060 |
files | reporter.txt run/l/length_10_A.d run/l/length_10_B.d |
diffstat | 3 files changed, 14 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/reporter.txt Thu Apr 05 16:35:18 2007 +0000 +++ b/reporter.txt Thu Apr 05 16:35:45 2007 +0000 @@ -123,6 +123,7 @@ ndove http://www.dsource.org/forums/profile.php?mode=viewprofile&u=142 Neil Santos Nick <korslund@gmail.com> +Nick Atamas <nick.atamas@gmail.com> Nick Sabalausky Oskar Linde <d98-oliRE.MO.VE@nada.kth.se>, <oskar.linde@gmail.com> Patrick Down
--- a/run/l/length_10_A.d Thu Apr 05 16:35:18 2007 +0000 +++ b/run/l/length_10_A.d Thu Apr 05 16:35:45 2007 +0000 @@ -2,23 +2,17 @@ // $Date$ // $Author$ -// @author@ <CppCoder@gmail.com> -// @date@ 2006-05-02 -// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=123 -// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1031 +// @author@ Nick Atamas <nick.atamas@gmail.com> +// @date@ 2007-02-04 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=929 +// @desc@ [Issue 929] Resizing array of associative arrays (uint[char[]][]) causes infinite loop / hang module dstress.run.l.length_10_A; -size_t intRes(){ - return 4; -} - -static const char[] foo = "abc123"; - int main(){ - char c = foo[intRes() % $]; - - if(c != '2'){ + uint[char[]][] fractal; + fractal.length = 10; + if(10 != fractal.length){ assert(0); }
--- a/run/l/length_10_B.d Thu Apr 05 16:35:18 2007 +0000 +++ b/run/l/length_10_B.d Thu Apr 05 16:35:45 2007 +0000 @@ -2,23 +2,16 @@ // $Date$ // $Author$ -// @author@ <CppCoder@gmail.com> -// @date@ 2006-05-02 -// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=123 -// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1031 +// @author@ Nick Atamas <nick.atamas@gmail.com> +// @date@ 2007-02-04 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=929 +// @desc@ [Issue 929] Resizing array of associative arrays (uint[char[]][]) causes infinite loop / hang module dstress.run.l.length_10_B; -size_t intRes(){ - return 4; -} - -const char[] foo = "abc123"; - int main(){ - char c = foo[intRes() % $]; - - if(c != '2'){ + uint[char[]][10] fractal; + if(10 != fractal.length){ assert(0); }