[Issue 18996] Inserting a struct into an std.container Array causes SIGILL(4). Illegal Instruction.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 18 05:32:18 UTC 2018


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

--- Comment #2 from Paul Crane <viserion.thrall at gmail.com> ---
After even more testing it looks like only Array's with strings are causing
this issue:

struct Test
{
    string value;
}

void main(string[] arguments)
{
    //Cause SIGILL
    Array!string str;
    str.insert("hello");

    //Works
    Array!bool boolValues;
    boolValues.insert(true);

    //Works
    Array!int intValues;
    intValues.insert(10);

    //Causes SIGILL if struct contains a string. Works otherwise.
    Test value;
    Array!Test test;
    test.insert(value);

}

All string types(wstring, dstring, string) will fail.

--


More information about the Digitalmars-d-bugs mailing list