Skip to content

Commit 84c51c7

Browse files
committed
[Odin]: - fixing netlist identifier mem leak if blif file is empty
- regenerating _BLIF/syntax expectation results Signed-off-by: Seyed Alireza Damghani <[email protected]>
1 parent f26cefd commit 84c51c7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ODIN_II/SRC/BLIFReader.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,11 @@ void BLIF::Reader::find_top_module() {
195195
my_location.line += 1;
196196

197197
// not sure if this is needed
198-
if (feof(file))
198+
if (feof(file)) {
199+
/* clean up */
200+
vtr::free(buffer);
199201
break;
202+
}
200203

201204
char* token = vtr::strtok(buffer, TOKENS, file, buffer);
202205
if (token && !strcmp(token, ".model")) {

ODIN_II/regression_test/benchmark/task/_BLIF/syntax/techmap_result.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,7 @@
933933
"test_name": "syntax/cf_fft_1024_16/k6_frac_N10_frac_chain_mem32K_40nm",
934934
"architecture": "k6_frac_N10_frac_chain_mem32K_40nm.xml",
935935
"input_blif": "cf_fft_1024_16.blif",
936+
"exec_time(ms)": 156646.4,
936937
"Latch Drivers": 1,
937938
"Pi": 67,
938939
"Po": 65,

0 commit comments

Comments
 (0)