mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +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"); | ||||
| 
 | ||||
| 		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…
	
	Add table
		Add a link
		
	
		Reference in a new issue