Gabe Black has uploaded a new patch set (#2). ( https://gem5-review.googlesource.com/c/public/gem5/+/13289 )

Change subject: systemc: Change how errors are handled in some constructors slightly.
......................................................................

systemc: Change how errors are handled in some constructors slightly.

Because SC_REPORT_ERROR usually causes an exception to be thrown, it's
easy to assume it will be the last thing executed in a function. It
might, however, be set up to do nothing, in which case the function
will continue to execute.

This change makes sure sc_prim will be set up properly even if errors
about the time a channel can be set up are ignored.

Also, if an exception is thrown while sc_port is being set up, the
corresponding Port object needs to be cleaned up. Rather than try to
intercept exceptions in the constructor and clean up properly, we'll
just make the allocation of the Port object be the last thing it does.
If the function exits early, then the Port pointer will still be
nullptr and nothing will need to be done.

Change-Id: If8f6f6b7e6830235fee3cd75625240b99e87dfbe
---
M src/systemc/core/sc_port.cc
M src/systemc/core/sc_prim.cc
2 files changed, 8 insertions(+), 7 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/13289
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: If8f6f6b7e6830235fee3cd75625240b99e87dfbe
Gerrit-Change-Number: 13289
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newpatchset
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to