[Issue 20857] New: Rethrowing range error from thread with large stack segfaults

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 23 14:58:14 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20857

          Issue ID: 20857
           Summary: Rethrowing range error from thread with large stack
                    segfaults
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: dlang-bugzilla at thecybershadow.net

///////////// test.d /////////////
import core.exception;
import core.thread;

void main()
{
    auto t = new Thread(delegate {
        int[] x;
        x[2] = 2;
    }, 64 * 1024 * 1024);
    t.start();
    t.join();
}
//////////////////////////////////

The RangeError should be rethrown, but the program simply segfaults.

Doesn't happen with a stack size of 32MB.

Introduced in https://github.com/dlang/druntime/pull/2395

--


More information about the Digitalmars-d-bugs mailing list