[vlc-devel] [PATCH] dbus: Prevent dictionary from growing out of control

mirsal mirsal at mirsal.fr
Wed Feb 22 11:37:16 CET 2012

Hi, and thank you for your patches !

On Wed, 2012-02-22 at 10:33 +0200, Casian Andrei wrote:
> For each item that was appended or deleted, the ("Tracks", NULL) pair
> was inserted (duplicated over and over) in the tracklist_properties
> dictionary.

Actually, this is very unlikely to happen as the dbus main loop is woken
up as soon as an event occurs, which means that events are processed one
at a time in most cases.

> The dictionary was inserting it in the same position and
> it assumed it had hash collisions, triggering an expansion at every
> insertion of that pair.

Yes, though it happens only if the same event is triggered more than
three times during the same main loop iteration. (which should almost
never be the case in practice)

With that said, your patches look fine.

I will wait for more feedback on the first one before pushing anything,

Best regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120222/31da0b5c/attachment.sig>

More information about the vlc-devel mailing list