From 72b3dae6aa936e9eabf4c22e5602c572a9756cbe Mon Sep 17 00:00:00 2001 From: Robert Iannucci Date: Mon, 18 Mar 2013 09:53:53 -0700 Subject: Fix duplicate edge Pool crash in the minimally invasive way --- src/build.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/build.cc b/src/build.cc index 701fa92..2910385 100644 --- a/src/build.cc +++ b/src/build.cc @@ -418,6 +418,12 @@ Edge* Plan::FindWork() { void Plan::ScheduleWork(Edge* edge) { Pool* pool = edge->pool(); if (pool->ShouldDelayEdge()) { + // The graph is not completely clean. Some Nodes have duplicate Out edges. + // We need to explicitly ignore these here, otherwise their work will get + // scheduled twice (see https://github.com/martine/ninja/pull/519) + if (ready_.count(edge)) { + return; + } pool->DelayEdge(edge); pool->RetrieveReadyEdges(&ready_); } else { -- cgit v0.12