[Issue 21893] New: core.atomic calls itself recursively
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed May 5 17:04:12 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21893
Issue ID: 21893
Summary: core.atomic calls itself recursively
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: alphaglosined at gmail.com
Windows, ldc2 1.25.1 64bit, the source matches up for this in druntime ~master.
Known to happen in atomicLoad, atomicStore during testing. But I would expect
it to also apply to atomicFetchAdd and atomicFetchSub.
Making the function calls for the same name explicit to use
core.internal.atomic fixes the issue i.e.
atomicStore!ms(*cast(T*)&val, *cast(Thunk*)&newval);
becomes
core.internal.atomic.atomicStore!ms(cast(T*)&val, *cast(Thunk*)&newval);
Without these changes, the arguments line up with itself and will end in a
stack overflow.
--
More information about the Digitalmars-d-bugs
mailing list