You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After moving a sparta::Counter, the StatisticSet isn't cleaned up -- it has two pointers -- one to the old counter (now deleted) and the new one. The TreeNode supports detaching from parent, but the method onDestroyingChild doesn't appear to be implemented in StatisticSet.
The text was updated successfully, but these errors were encountered:
ghost
pushed a commit
that referenced
this issue
May 7, 2021
Updated Statistic_test with an example of this and it's broken:
TreeNode dummy2(&root, "dummy2", "A second dummy node");
sparta::StatisticSet moved_stats_set(&dummy2);
sparta::Counter orig_counter(&moved_stats_set, "moved_stat", "A stat to be moved", Counter::COUNT_NORMAL);
EXPECT_EQUAL(moved_stats_set.getNumCounters(), 1);
sparta::Counter moved_counter(std::move(orig_counter));
EXPECT_EQUAL(moved_stats_set.getNumCounters(), 1); // <<--- ERROR: reports 2
After moving a sparta::Counter, the StatisticSet isn't cleaned up -- it has two pointers -- one to the old counter (now deleted) and the new one. The TreeNode supports detaching from parent, but the method
onDestroyingChild
doesn't appear to be implemented in StatisticSet.The text was updated successfully, but these errors were encountered: