[Issue 9099] segfault while returning an atomicLoad value

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 26 02:52:33 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=9099


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com
          Component|DMD                         |druntime


--- Comment #2 from Walter Bright <bugzilla at digitalmars.com> 2012-12-26 02:52:19 PST ---
The problem is that atomicLoad() only works with POD (Plain Old Data) types.
Structs with constructors are not POD. Non-POD structs are returned with a
different calling convention than POD, hence the crash.

The fix is for atomicLoad() to reject attempts to instantiate it with non-POD
types.

The test case here should fail to compile.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list