Bug 58

Summary: Simulator::Remove and Simulator::IsExpired are not safe together
Product: ns-3 Reporter: Mathieu Lacage <mathieu.lacage>
Component: coreAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: blocker CC: gjcarneiro
Priority: P1    
Version: pre-release   
Hardware: PC   
OS: Linux   

Description Mathieu Lacage 2007-07-27 02:32:16 UTC
EventId ev = Simulator::Schedule (...)
EventId ev1 = ev;
Simulator::Remove (ev);
// following call buggy: undefined behavior.
Simulator::IsExpired (ev1);

If we want to make this work reliably, we need to make the EventImpl refcounted and we need to add a bool isRemoved in it. binding authors might be super happy with this change.
Comment 1 Mathieu Lacage 2007-07-27 11:57:31 UTC
Full patchset in http://code.nsnam.org/mathieu/ns-3-bug58
Comment 2 Gustavo J. A. M. Carneiro 2007-08-02 10:15:44 UTC
fix was merged recently