https://bugs.kde.org/show_bug.cgi?id=477018

Milian Wolff <m...@milianw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|REPORTED                    |RESOLVED

--- Comment #6 from Milian Wolff <m...@milianw.de> ---
Thank you for this report and investigation, quite the nasty corner case!

commit f1f59da06211632da92d77fce461bc8ccee7b4c2 (HEAD -> master, origin/master,
origin/HEAD)
Author: Milian Wolff <m...@milianw.de>
Date:   Wed Nov 15 07:56:08 2023 +0100

    Use boost::hash_combine to prevent collisions in tsl pointermap

    Apparently the hash combine I copied from stackoverflow all these
    years ago is simply broken - it can trigger a worst-case scenario
    in the tsl::set leading to excessive memory consumption.

    Using boost::hash_combine the example given at [1] we get back to
    a load factor of ~0.25 at the end, instead of going all the way to
    0.00... and gigabytes of memory consumed for the buckets.

    We use boost already elsewhere so it's fine to use it here too.

    [1]: https://github.com/Tessil/robin-map/issues/71

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to