May 05, 2021
https://issues.dlang.org/show_bug.cgi?id=21893

--- Comment #1 from Richard Cattermole <alphaglosined@gmail.com> ---
cas also appears to suffer from this issue:

https://github.com/dlang/druntime/blob/master/src/core/atomic.d#L386

return atomicCompareExchangeStrongNoResult!(succ, fail)(cast(T*)here,
*cast(Thunk1*)&ifThis, *cast(Thunk2*)&writeThis);

Since this was asked by Herringway on IRC, this was patched live and after patching it no longer appears to call itself recursively.

I don't know how valid these proposed fixes are, only it seems to resolve it for my use case (Struct*[2]).

--
January 01
https://issues.dlang.org/show_bug.cgi?id=21893

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@avaxar created dlang/dmd pull request #15973 "Fix issue 21893 - Fix `std.atomic.atomicStore` infinitely and recursively calling itself" mentioning this issue:

- Do changes from issue #21893

https://github.com/dlang/dmd/pull/15973

--