[Issue 233] New: Infinite loops with assembly crash DMD

Thomas Kuehne thomas-dloop at kuehne.cn
Sun Jul 2 08:50:05 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail at puremagic.com schrieb am 2006-07-01:
> http://d.puremagic.com/issues/show_bug.cgi?id=233

> (Note: v0.162 isn't yet in the list of versions you can pick in Bugzilla, so I
> selected 'unspecified'. But it's definitely 0.162)
>
> This issue turned up in v0.162. Code that worked fine in v0.161 suddenly didn't
> compile anymore.
> Tested on both Windows & Linux.
>
> No error is given by DMD itself.
> On Windows, it says `The instruction at "0x00485bb9" referenced memory at
> "0x00000030". The memory could not e "read".`
> Linux, of course, just mentions `Segmentation fault`.
>
> See comments for more details:
>
>
> import std.stdio;           // for the last cases
>
> void infiniteAsmLoops()
> {
>
>     /* This crashes DMD 0.162: */
>     for (;;) asm { hlt; }
>
>     /* This is a workaround: */
>     for (bool a = true; a;) asm { hlt; }                    // compiles

[snip]

Added to DStress as
http://dstress.kuehne.cn/compile/a/asm_01_A.d
http://dstress.kuehne.cn/compile/a/asm_01_B.d
http://dstress.kuehne.cn/compile/a/asm_01_C.d
http://dstress.kuehne.cn/compile/a/asm_01_D.d
http://dstress.kuehne.cn/compile/a/asm_01_E.d
http://dstress.kuehne.cn/compile/a/asm_01_F.d
http://dstress.kuehne.cn/compile/a/asm_01_G.d
http://dstress.kuehne.cn/compile/a/asm_01_H.d
http://dstress.kuehne.cn/compile/a/asm_01_I.d
http://dstress.kuehne.cn/compile/a/asm_01_J.d
http://dstress.kuehne.cn/compile/a/asm_01_K.d
http://dstress.kuehne.cn/compile/a/asm_01_L.d
http://dstress.kuehne.cn/compile/a/asm_01_M.d
http://dstress.kuehne.cn/compile/a/asm_01_N.d
http://dstress.kuehne.cn/compile/a/asm_01_O.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFEp/JaLK5blCcjpWoRAtdLAKCiI6x6WLXn5OLb78L8YM+WRUzw4ACfZJic
8OJd4P4aijSyjGY5dtJ8QRk=
=t+nF
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list