From: Clifford Wolf Date: Tue, 30 Apr 2019 20:20:45 +0000 (+0200) Subject: Fix segfault in wreduce X-Git-Tag: yosys-0.9~142^2~6 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=32ff37bb5a8cec79e8cbcfac4075cc553fa9a394;p=yosys.git Fix segfault in wreduce Signed-off-by: Clifford Wolf --- diff --git a/passes/opt/wreduce.cc b/passes/opt/wreduce.cc index 68e077cf9..41de8aad1 100644 --- a/passes/opt/wreduce.cc +++ b/passes/opt/wreduce.cc @@ -180,6 +180,8 @@ struct WreduceWorker } auto info = mi.query(sig_q[i]); + if (info == nullptr) + return; if (!info->is_output && GetSize(info->ports) == 1 && !keep_bits.count(mi.sigmap(sig_q[i]))) { remove_init_bits.insert(sig_q[i]); sig_d.remove(i);