mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	opt_ffinv: Fix use after free.
This commit is contained in:
		
							parent
							
								
									ddc8044655
								
							
						
					
					
						commit
						1ff0e1a58a
					
				
					 1 changed files with 6 additions and 3 deletions
				
			
		| 
						 | 
					@ -201,10 +201,13 @@ struct OptFfInvWorker
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		log("Discovering LUTs.\n");
 | 
							log("Discovering LUTs.\n");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		for (Cell *cell : module->selected_cells()) {
 | 
							std::vector<Cell *> ffs;
 | 
				
			||||||
			if (!RTLIL::builtin_ff_cell_types().count(cell->type))
 | 
					 | 
				
			||||||
				continue;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							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);
 | 
								FfData ff(&initvals, cell);
 | 
				
			||||||
			if (ff.has_sr)
 | 
								if (ff.has_sr)
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue