From da398e77fddf3f935ed88cf16394b05040163cfe Mon Sep 17 00:00:00 2001 From: klayoutmatthias Date: Mon, 25 Jul 2022 22:03:01 +0200 Subject: [PATCH] [Consider merging] avoid a memory corruption issue in Netlist::flatten --- src/db/db/dbNetlist.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/db/db/dbNetlist.cc b/src/db/db/dbNetlist.cc index 7f0a04077..3cc519076 100644 --- a/src/db/db/dbNetlist.cc +++ b/src/db/db/dbNetlist.cc @@ -505,6 +505,8 @@ void Netlist::flatten_circuit (Circuit *circuit) void Netlist::flatten () { + db::NetlistLocker locker (this); + std::set top_circuits; size_t ntop = top_circuit_count (); for (db::Netlist::top_down_circuit_iterator tc = begin_top_down (); tc != end_top_down () && ntop > 0; ++tc) {