digitalmars.D.bugs - [Issue 21893] New: core.atomic calls itself recursively
- d-bugmail puremagic.com (24/24) May 05 2021 https://issues.dlang.org/show_bug.cgi?id=21893
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 puremagic.com Reporter: alphaglosined 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. --
May 05 2021