[Issue 17088] Access Violation on membership test with shared AA

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Feb 11 11:08:37 PST 2017


https://issues.dlang.org/show_bug.cgi?id=17088

savarga1 at asu.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |savarga1 at asu.edu

--- Comment #1 from savarga1 at asu.edu ---
I was able to replicate this bug on Arch Linux (64bit), dmd v2.073.0.
I get a segfault whenever I run this code:

void main() {
    shared int[int] ints = [6: 8];
    auto bla = (6 in ints);
}

However, when I compile and run it with ldc 1:1.0.0-1 I get 0 segfaults
and it runs correctly.


When I separated the declaration and the assignment like below
it worked in both compilers. 

void main() {
    shared int[int] ints;
        ints[6] = 8;
    auto bla = (6 in ints);
}

--


More information about the Digitalmars-d-bugs mailing list