Thread overview
[Issue 14038] [REG2.067a] Non-mutable AA initialization segfaults in runtime
Jan 24, 2015
Kenji Hara
Jan 24, 2015
Kenji Hara
Jan 24, 2015
Kenji Hara
January 24, 2015
https://issues.dlang.org/show_bug.cgi?id=14038

--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> ---
More better test case:

class C
{
    immutable ubyte[string] wordsAA;
    this()
    {
        wordsAA["zero"] = 0;  // segfaults
    }
}
void main()
{
    auto c = new C();
}

The original code is initializing immutable AA inside foreach loop. I think it would be a multiple variable initialization and essentially should be disallowed.

--
January 24, 2015
https://issues.dlang.org/show_bug.cgi?id=14038

--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> ---
(In reply to Kenji Hara from comment #1)
More close to the original:

static immutable ubyte[string] wordsAA;
static this()
{
    wordsAA["zero"] = 0;
}

void main() {}

--
January 24, 2015
https://issues.dlang.org/show_bug.cgi?id=14038

Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #3 from Kenji Hara <k.hara.pg@gmail.com> ---
https://github.com/D-Programming-Language/dmd/pull/4334

--
January 25, 2015
https://issues.dlang.org/show_bug.cgi?id=14038

--- Comment #4 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/0044e35b0e4d24435bebb15461dd170ccd59fe78 fix Issue 14038 - Non-mutable AA initialization segfaults in runtime

https://github.com/D-Programming-Language/dmd/commit/47ff8276ab022b7846dc493e838e5a0703a71937 Merge pull request #4334 from 9rnsr/fix14038

[REG2.067a] Issue 14038 - Non-mutable AA initialization segfaults in runtime

--
January 25, 2015
https://issues.dlang.org/show_bug.cgi?id=14038

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--