Skip to content

Commit

Permalink
Avoid seg fault when the range for a module/gate is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
caryr committed Dec 29, 2024
1 parent 47cf370 commit d484cb6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pform_dump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ void PGate::dump_delays(ostream&out) const

void PGate::dump_ranges(ostream&out) const
{
if (ranges_ == 0) return;
for (list<pform_range_t>::iterator cur = ranges_->begin()
; cur != ranges_->end() ; ++cur) {
out << "[";
Expand Down Expand Up @@ -1681,7 +1682,7 @@ void Module::dump_specparams_(ostream&out, unsigned indent) const

void Module::dump_timingchecks_(ostream&out, unsigned indent) const
{
cout << "dump_timingchecks_" << endl;
out << " PFORM DUMP TIMINGCHECKS" << endl;

for (const auto cur : timing_checks) {
cur->dump(out, indent);
Expand Down

0 comments on commit d484cb6

Please sign in to comment.