March 21, 2005
Using DMD 0.118, Windows 98SE.

----------
import std.stdio;

void main() {
    try {
    } catch (Exception e) {
        debug writefln("Exception happened");
    }
}
----------
DMD caused an invalid page fault in
module DMD.EXE at 0167:0042b473.
Registers:
EAX=00000001 CS=0167 EIP=0042b473 EFLGS=00010202
EBX=00000000 SS=016f ESP=0070fba8 EBP=00000001
ECX=0072a0e4 DS=016f ESI=00729998 FS=42b7
EDX=00000000 ES=016f EDI=00724cb4 GS=0000
Bytes at CS:EIP:
8b 12 8b 4f 18 ff 52 3c 8b 4e 10 09 c5 43 39 59
Stack dump:
0072fac0 0072fac0 007207cc 0072a03c 00729998 0041e0d1 0072a03c 007297cc 00000002 0049358a 00000000 00000000 0049ecb2 00a1d59c 009fbb30 00933c38
----------

The same happens if:
- the debug body is a compound statement
- I use a specific debug identifier
- I use version instead of debug
- the braces are removed from the catch body

The problem disappears if:
- I compile with the specified debug/version switch
- I add another statement before or after the debug statement (even if it's another debug statement)

Stewart.

-- 
My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.
March 22, 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stewart Gordon schrieb am Mon, 21 Mar 2005 11:40:16 +0000:
> Using DMD 0.118, Windows 98SE.
>
> ----------
> import std.stdio;
>
> void main() {
>      try {
>      } catch (Exception e) {
>          debug writefln("Exception happened");
>      }
> }
> ----------
> DMD caused an invalid page fault in
> module DMD.EXE at 0167:0042b473.
> Registers:
> EAX=00000001 CS=0167 EIP=0042b473 EFLGS=00010202
> EBX=00000000 SS=016f ESP=0070fba8 EBP=00000001
> ECX=0072a0e4 DS=016f ESI=00729998 FS=42b7
> EDX=00000000 ES=016f EDI=00724cb4 GS=0000
> Bytes at CS:EIP:
> 8b 12 8b 4f 18 ff 52 3c 8b 4e 10 09 c5 43 39 59
> Stack dump:
> 0072fac0 0072fac0 007207cc 0072a03c 00729998 0041e0d1 0072a03c 007297cc
> 00000002 0049358a 00000000 00000000 0049ecb2 00a1d59c 009fbb30 00933c38
> ----------
>
> The same happens if:
> - the debug body is a compound statement
> - I use a specific debug identifier
> - I use version instead of debug
> - the braces are removed from the catch body
>
> The problem disappears if:
> - I compile with the specified debug/version switch
> - I add another statement before or after the debug statement (even if
> it's another debug statement)

Added to DStress as
http://dstress.kuehne.cn/run/catch_01.d
http://dstress.kuehne.cn/run/catch_02.d
http://dstress.kuehne.cn/run/catch_03.d
http://dstress.kuehne.cn/run/catch_04.d

Thomas


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

iD8DBQFCP8Es3w+/yD4P9tIRAiBQAJ9vTzThR6UV8cJk/kN4W6fC4D3ZMwCgu9Y2
Nnx4kq+H2by3TZarsjk4rBE=
=dZzN
-----END PGP SIGNATURE-----