Summary: [GSoC] Catching exceptions in fibers broken on Windows
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: critical
          Priority: P2
         Component: druntime

--- Comment #0 from klickverbot <> 2011-08-06 12:23:46 PDT 
The following program crashes on Windows for me, while working as expected on
Linux and OS X:

import core.thread;
import std.stdio;

void main() {
  (new Fiber({
    try {
      throw new Exception("Foo!");
    } catch (Exception e) {
      stderr.writefln("Caught: %s", e);

DMD/druntime from Git master, running on Windows Server 2008 R2 x86_64 (inside
a VirtualBox VM, but that shouldn't matter). When building/debugging with
Visual D, I get a stack overflow in release mode (somewhere inside
KernelBase.dll), and a �Unhandled exception at 0x7547b9bc in ConsoleApp1.exe:
0xE0440001: 0xe0440001� in debug mode.

Since 0xe044001 is STATUS_DIGITAL_MARS_D_EXCEPTION, the obvious guess would be
that the fiber context switching code is somehow messing with SEH, so that the
exception is never actually caught. Unfortunately, I don't know enough about
the Win32 internals to be able to efficiently track this down.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to