From 4746ffd7b2f5de0bc1f29f35e9044091a3c704e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marcelina=20Ko=C5=9Bcielnicka?= Date: Mon, 22 Feb 2021 22:02:48 +0100 Subject: [PATCH] assertpmux: Fix crash on unused $pmux output. Fixes #2595. --- passes/sat/assertpmux.cc | 2 +- tests/sat/bug2595.ys | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tests/sat/bug2595.ys diff --git a/passes/sat/assertpmux.cc b/passes/sat/assertpmux.cc index e9a10465e..f31b78804 100644 --- a/passes/sat/assertpmux.cc +++ b/passes/sat/assertpmux.cc @@ -88,7 +88,7 @@ struct AssertpmuxWorker { SigSpec output; - for (auto muxuser : sigbit_muxusers.at(bit)) + for (auto muxuser : sigbit_muxusers[bit]) { Cell *cell = std::get<0>(muxuser); int portidx = std::get<1>(muxuser); diff --git a/tests/sat/bug2595.ys b/tests/sat/bug2595.ys new file mode 100644 index 000000000..f668fd747 --- /dev/null +++ b/tests/sat/bug2595.ys @@ -0,0 +1,18 @@ +read_ilang <