Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on a specific file #176

Closed
snosov1 opened this issue Nov 26, 2014 · 1 comment
Closed

Crash on a specific file #176

snosov1 opened this issue Nov 26, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@snosov1
Copy link
Contributor

snosov1 commented Nov 26, 2014

Hi! The call dcd-client -c 1021 digger.d crashes the dcd-server.

file digger.d (trying to autocomplete when typing the spec. line):

module digger;

import std.exception;
import std.getopt;

version(Windows) static import ae.sys.net.wininet;

import bisect;
import cache;
import common;
import custom;
import repo;

// http://d.puremagic.com/issues/show_bug.cgi?id=7016
version(Windows) static import ae.sys.windows;

int doMain()
{
    auto args = opts.args.dup;
    enforce(args.length, "No command specified");
    auto command = args[0];
    switch (command)
    {
    case "bisect":
        return doBisect();
    case "show":
    {
        enforce(args.length == 2, "Specify revision");
        auto rev = parseRev(args[1]);
        d.repo.run("log", "-n1", rev);
        d.repo.run("log", "-n1", "--pretty=format:t=%ct", rev);
        return 0;
    }
    case "build":
    case "build-all":
    {
        BuildConfig buildConfig;
        bool model64;
        int step = 1;
        getopt(args,
               "64", &model64,
               "step", &step,
               "update", &buildConfig.updateRepos
            );
        buildConfig.updateRepos = false;
        if (model64)
            buildConfig.model = "64";
        string spec = args.length > 1 ? args[1] : "master";

        spec.

            if (command == "build")
                buildCustom(spec, buildConfig);
            else
                buildAll(spec, buildConfig, step);
        return 0;
    }
    case "compact":
        optimizeCache();
        return 0;
    case "delve":
        return doDelve();
    case "do":
        return handleWebTask(args[1..$]);

    default:
        throw new Exception("Unknown command: " ~ args[0]);
    }
}

int main()
{
    debug
        return doMain();
    else
    {
        try
            return doMain();
        catch (Exception e)
        {
            import std.stdio : stderr;
            stderr.writefln("Fatal error: %s", e.msg);
            return 1;
        }
    }
}
@Hackerpilot Hackerpilot self-assigned this Nov 30, 2014
@Hackerpilot Hackerpilot added this to the 0.4.1 milestone Nov 30, 2014
@Hackerpilot
Copy link
Collaborator

I tracked this down to a bug in libdparse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants