[Bro-Dev] #667: Non-deterministic behavior when deleting current set element during iteration
Bro Tracker
bro at tracker.bro-ids.org
Tue Nov 8 14:16:26 PST 2011
#667: Non-deterministic behavior when deleting current set element during
iteration
---------------------------+----------------------
Reporter: david.bianco | Owner:
Type: Problem | Status: new
Priority: Normal | Milestone:
Component: Bro | Version: 2.0 Beta
Resolution: | Keywords:
---------------------------+----------------------
Comment (by vallenti):
That's an interesting bug, which probably boils down to the following
issue:
{{{
global s: set[T];
for (i in s)
{
delete s[i];
# ...
}
}}}
Here, we delete the very element of the current iteration in the for loop.
This probably invalidates C++ iterators and is causing the non-
deterministic behavior.
--
Ticket URL: <http://tracker.bro-ids.org/bro/ticket/667#comment:1>
Bro Tracker <http://tracker.bro-ids.org/bro>
Bro Issue Tracker
More information about the bro-dev
mailing list