[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 13:53:01 UTC 2018


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

Steven Schveighoffer <schveiguy at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |schveiguy at yahoo.com
          Component|phobos                      |druntime
           Assignee|nobody at puremagic.com        |schveiguy at yahoo.com
                 OS|Linux                       |All

--- Comment #7 from Steven Schveighoffer <schveiguy at yahoo.com> ---
The issue is that Array!string (or Array!T where T has indirections) is going
to add its array as a range to the GC whenever it allocates one.

What it does AFTER though is remove it's previous array as a range. When the
Array has not been initialized yet, this is effectively calling
GC.removeRange(null).

The ProtoGC was asserting on that, generating the illegal instruction. However,
the normal GC handled it just fine, which is why initializing the GC solved the
problem.

The ProtoGC should act exactly like the normal GC until the normal GC takes
over, so this was a bug in the ProtoGC.

PR: https://github.com/dlang/druntime/pull/2220

--


More information about the Digitalmars-d-bugs mailing list