Comment #0 by dlang-bugzilla — 2020-05-23T14:58:14Z
///////////// 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
Comment #1 by edi33416 — 2020-05-25T09:48:09Z
I think I'm missing something because this, to me, looks more like a `Thread` bug than an `core.exception.RangeError` bug.
I'm saying this because of the fact that using a stack size of 32MB leads to the correct behaviour.
Also, I don't see why throwing a `staticError!RangeError` would segfault, as the staticError's store is in TLS.
Comment #2 by robert.schadek — 2024-12-07T13:40:16Z