I don't know how common this algorithm is, given that it does N^2
operations to remove N elements.

But I don't see any container overflow here. Could you post the actual report?

Does this look relevant to your setup:
https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow#false-positives

On Tue, Aug 22, 2017 at 11:54 AM, Jennifer Liu <[email protected]> wrote:
> Is this false alarm of "container-overflow", it looks like very common way
> to remove elements by iterator in while loop.
>
>
>     std::vector<Packet>::iterator it = m_packets.begin();
>
>     while (it != m_packets.end()) {
>
>         if (it->header.GetSourceBlockNumber() <=
> rsrp.GetSourceBlockNumber()) {
>
>             if (it->repair.pData != NULL) {
>
>                 free(it->repair.pData);
>
>                 it->repair.pData = NULL;
>
>             }
>
>             it = m_packets.erase(it);
>
>         } else {
>
>             ++it;
>
>         }
>
>     }
>
>
> Thanks
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "address-sanitizer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to