https://issues.dlang.org/show_bug.cgi?id=10108
Andrei Alexandrescu and...@erdani.com changed:
What|Removed |Added
Version|unspecified |D2
--
https://d.puremagic.com/issues/show_bug.cgi?id=10108
yebblies yebbl...@gmail.com changed:
What|Removed |Added
Status|REOPENED|RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=10108
Sean Kelly s...@invisibleduck.org changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=10108
--- Comment #15 from Simen Kjaeraas simen.kja...@gmail.com 2013-05-21
12:41:56 PDT ---
(In reply to comment #14)
import core.thread;
int[] arr = [1,2,3].dup;
void main() {
auto t = new Thread({arr[0] = 3;});
http://d.puremagic.com/issues/show_bug.cgi?id=10108
--- Comment #13 from Igor Stepanov wazar.leoll...@yahoo.com 2013-05-18
00:46:39 PDT ---
int[] x = [1,2,3]; // should not be compiled
It would be trivial to fix. As the initializer for static data must be a
compile time constant we'd
This is expected because the global is __gshared and there's therefore no type
protection from doing this. If you want safe sharing, make the global shared.
On May 17, 2013, at 9:38 AM, d-bugm...@puremagic.com wrote:
http://d.puremagic.com/issues/show_bug.cgi?id=10108
--- Comment #2
On Sat, 18 May 2013 16:59:53 +0200, Sean Kelly s...@invisibleduck.org
wrote:
This is expected because the global is __gshared and there's therefore
no type protection from doing this. If you want safe sharing, make the
global shared.
[snip]
__gshared int[] gArr = [1,2,3];
int[] arr =
http://d.puremagic.com/issues/show_bug.cgi?id=10108
Alex R�nne Petersen a...@lycus.org changed:
What|Removed |Added
CC||a...@lycus.org
http://d.puremagic.com/issues/show_bug.cgi?id=10108
--- Comment #2 from Martin Nowak c...@dawg.eu 2013-05-17 09:38:22 PDT ---
When a thread local variable is a reference type to modifiable data, we must
make sure that it is initialized uniquely.
This is what the current implementation does
http://d.puremagic.com/issues/show_bug.cgi?id=10108
Steven Schveighoffer schvei...@yahoo.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=10108
--- Comment #4 from Alex R�nne Petersen a...@lycus.org 2013-05-17 20:12:27
CEST ---
(In reply to comment #2)
When a thread local variable is a reference type to modifiable data, we must
make sure that it is initialized uniquely.
This is
http://d.puremagic.com/issues/show_bug.cgi?id=10108
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=10108
Steven Schveighoffer schvei...@yahoo.com changed:
What|Removed |Added
Status|RESOLVED|REOPENED
http://d.puremagic.com/issues/show_bug.cgi?id=10108
Simen Kjaeraas simen.kja...@gmail.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=10108
Igor Stepanov wazar.leoll...@yahoo.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=10108
--- Comment #9 from Simen Kjaeraas simen.kja...@gmail.com 2013-05-17 15:26:26
PDT ---
I see. Once again, simplified:
import core.thread;
struct Foo {
int[] arr;
}
Foo[] arr = [Foo([1,2,3])]; // Should have failed? (1)
void main( ) {
http://d.puremagic.com/issues/show_bug.cgi?id=10108
--- Comment #10 from Igor Stepanov wazar.leoll...@yahoo.com 2013-05-17
16:25:34 PDT ---
(In reply to comment #9)
I see. Once again, simplified:
import core.thread;
struct Foo {
int[] arr;
}
Foo[] arr = [Foo([1,2,3])]; //
http://d.puremagic.com/issues/show_bug.cgi?id=10108
--- Comment #11 from Martin Nowak c...@dawg.eu 2013-05-17 17:10:43 PDT ---
Asserts are generally included to show what currently PASSES,
not what FAILS.
OK, I always write unittests that should pass but I'll be more explicit.
In other
http://d.puremagic.com/issues/show_bug.cgi?id=10108
--- Comment #12 from Martin Nowak c...@dawg.eu 2013-05-17 17:13:57 PDT ---
The simple fix is to only allow value types to have TLS initalizers and require
static this() for everything else.
--
Configure issuemail:
19 matches
Mail list logo