Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/14400 )
Change subject: sim: Deschedule existing events when destructing an event
queue.
......................................................................
sim: Deschedule existing events when destructing an event queue.
Other objects in the simulation may try to deschedule their events when
destructed, and if they're cleaned up after the event queue is then
they might try to deschedule events on an event queue that no longer
exists.
Change-Id: I9452ce52fba78297ce3dc4b3884289b5e2f2574d
Reviewed-on: https://gem5-review.googlesource.com/c/14400
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/sim/eventq.hh
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved
Gabe Black: Looks good to me, approved
diff --git a/src/sim/eventq.hh b/src/sim/eventq.hh
index 781bcdb..6e8e633 100644
--- a/src/sim/eventq.hh
+++ b/src/sim/eventq.hh
@@ -711,7 +711,11 @@
*/
void checkpointReschedule(Event *event);
- virtual ~EventQueue() { }
+ virtual ~EventQueue()
+ {
+ while (!empty())
+ deschedule(getHead());
+ }
};
void dumpMainQueue();
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/14400
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: I9452ce52fba78297ce3dc4b3884289b5e2f2574d
Gerrit-Change-Number: 14400
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Srikant Bharadwaj <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev