Bug 24846 – atomicLoad does not work for class arguments with -preview=nosharedaccess

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-11-07T10:12:13Z
Last change time
2024-11-16T23:27:18Z
Keywords
pull
Assigned to
No Owner
Creator
Sönke Ludwig

Comments

Comment #0 by sludwig — 2024-11-07T10:12:13Z
--- shared Object i; atomicLoad(i); --- When compiled on DMD 2.109.1, with `-preview=nosharedaccess`, results in: core/internal/atomic.d(155): Error: direct access to shared `*cast(shared(inout(Object))*)resultValuePtr` is not allowed, see `core.atomic` Note that, although the DRuntime implementation differs, LDC produces a similar error.
Comment #1 by alphaglosined — 2024-11-07T10:45:54Z
A quick look shows that core.* has no exception for this message. I'm going to try and add an exclusion specifically for core.internal.atomic as that is a compiler implementation detail of the platform.
Comment #2 by dlang-bot — 2024-11-07T10:59:32Z
@rikkimax created dlang/dmd pull request #17053 "Fix bugzilla issue 24846 - atomicLoad does not work for class arguments with -preview=nosharedaccess" fixing this issue: - Fix bugzilla issue 24846 - atomicLoad does not work for class arguments with -preview=nosharedaccess https://github.com/dlang/dmd/pull/17053
Comment #3 by dlang-bot — 2024-11-10T21:40:03Z
dlang/dmd pull request #17053 "Fix bugzilla issue 24846 - atomicLoad does not work for class arguments with -preview=nosharedaccess" was merged into stable: - ace7cea7731f493d11f906dde1fe5a7a793523a2 by Richard (Rikki) Andrew Cattermole: Fix bugzilla issue 24846 - atomicLoad does not work for class arguments with -preview=nosharedaccess https://github.com/dlang/dmd/pull/17053
Comment #4 by dlang-bot — 2024-11-16T23:27:18Z
dlang/dmd pull request #17069 "Merge stable" was merged into master: - a7c85ec3be036e87a6fd76e0d4cd0fba36dd1e07 by Richard (Rikki) Andrew Cattermole: Fix bugzilla issue 24846 - atomicLoad does not work for class arguments with -preview=nosharedaccess https://github.com/dlang/dmd/pull/17069