Bug 20857 – Rethrowing range error from thread with large stack segfaults

Status
NEW
Severity
regression
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-05-23T14:58:14Z
Last change time
2024-12-07T13:40:16Z
Assigned to
No Owner
Creator
Vladimir Panteleev
Moved to GitHub: dmd#17187 →

Comments

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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17187 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB