[Issue 6443] New: [GSoC] Catching exceptions in fibers broken on Windows

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 6 12:23:50 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6443

           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
        AssignedTo: nobody at puremagic.com
        ReportedBy: code at klickverbot.at


--- Comment #0 from klickverbot <code at klickverbot.at> 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);
    }
  })).call();
}
---

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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list