On Tuesday, 16 July 2019 at 11:20:49 UTC, Boris Carvajal wrote:

The debugger exposes a crash in memchr from C runtime.

In file messaging.d line 216 called from the unittest just below

if (emoteTarget.beginsWithOneOf(state.client.server.chantypes))

chantypes.ptr is null. However chantypes.length is 1 so you are assigning something invalid to it.

grep -nr "chantypes = " kameloso/

shows this place as something to care about
kameloso/source/kameloso/irc/parsing.d:1983: chantypes = value;

Again, thank you for your immense help!

This is weird, chantypes should refer to a slice of immutables (a string). Simplified:

void onISUPPORT(ref IRCParser parser, ref string slice)
{
    import std.algorithm.iteration : splitter;

    foreach (string value; slice.splitter(' '))
    {
        // ...
        parser.client.server.chantypes = value;
    }
}

IRCParser.init.chantypes even has a default value of "#".

I get the same error even if I try to work around it with .idup. The only thing that does seem to help is checking for .ptr !is null at the unittest location you mention.

if (state.client.server.chantypes.ptr && emoteTarget.beginsWithOneOf(state.client.server.chantypes))

I started a dustmite process, with some luck it should produce something smaller by tonight or tomorrow.

Reply via email to