[Issue 10108] Thread local slice to array literal references the same data
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 17 11:29:08 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10108
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
--- Comment #6 from Steven Schveighoffer <schveiguy at yahoo.com> 2013-05-17 11:29:07 PDT ---
(In reply to comment #5)
> This is as designed - it's a bug in the code example.
No, it's not. It's a bug in the code generation. The __gshared variable just
demonstrates the bug.
What is happening is that each thread-local instance of arr is getting a
pointer to the SAME data.
The assert should have been written differently. as written, it fails, but
this is not noted.
--
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