mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-12 04:03:45 +00:00
opt_ffinv: Fix use after free.
This commit is contained in:
parent
ddc8044655
commit
1ff0e1a58a
|
@ -201,10 +201,13 @@ struct OptFfInvWorker
|
|||
{
|
||||
log("Discovering LUTs.\n");
|
||||
|
||||
for (Cell *cell : module->selected_cells()) {
|
||||
if (!RTLIL::builtin_ff_cell_types().count(cell->type))
|
||||
continue;
|
||||
std::vector<Cell *> ffs;
|
||||
|
||||
for (Cell *cell : module->selected_cells())
|
||||
if (RTLIL::builtin_ff_cell_types().count(cell->type))
|
||||
ffs.push_back(cell);
|
||||
|
||||
for (Cell *cell : ffs) {
|
||||
FfData ff(&initvals, cell);
|
||||
if (ff.has_sr)
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue