1
0
mirror of synced 2026-05-03 14:50:26 +00:00
Files
YosysHQ.yosys/passes/cmds/design.cc
Krystine Sherwin af75dce660 Fix Crashes with GCC 15 #5088
When building `WITH_PYTHON`, where a global list of modules is maintained, deleting a module also erases the entry in said global list.  This can lead to memory corruption if the global list is destructed before the module.
Using `on_shutdown()` instead means the module destructor is explicitly called before the global list can be destructed, preventing the issue.
Also add a comment to `Pass::~Pass()` to suggest the same for future passes that might try to use that (and see this commit in the blame if they need a reason why).
2025-05-10 09:59:13 +12:00

12 KiB