Skip to content

Commit

Permalink
Fix a bug where a file descriptor isn't closed after allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
henrybear327 committed Feb 5, 2024
1 parent b787dc2 commit 77e5936
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1210,4 +1210,7 @@ void dump_registers(riscv_t *rv, char *out_file_path)
fprintf(f, " \"x%d\": %u%s\n", i, rv->X[i], comma);
}
fprintf(f, "}\n");

if (out_file_path[0] != '-')
fclose(f);
}

1 comment on commit 77e5936

@jserv
Copy link
Contributor

@jserv jserv commented on 77e5936 Feb 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmarks

Benchmark suite Current: 77e5936 Previous: cdb03cd Ratio
Dhrystone 1765.75 Average DMIPS over 10 runs 1619.2 Average DMIPS over 10 runs 0.92
Coremark 1501.069 Average iterations/sec over 10 runs 1489.654 Average iterations/sec over 10 runs 0.99

This comment was automatically generated by workflow using github-action-benchmark.

Please # to comment.