Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.2.4, 6.3.0 RC
-
None
-
-
5
-
d11941db41 (qt/qtbase/dev) cd7eb2f429 (qt/qtbase/6.3) c097807ebf (qt/qtbase/6.2) c097807ebf (qt/tqtc-qtbase/6.2) cd7eb2f429 (qt/tqtc-qtbase/6.3) d11941db41 (qt/tqtc-qtbase/dev)
-
Team A Foundation Sprint 55
Description
This code loops infinitely or crashs:
QHash<int, int> test; for (int i = 0; i < 1000; ++i) test.insert(i, i); test.reserve(1);
Found in my real life project
https://invent.kde.org/frameworks/ktexteditor/-/commit/fc5dfb9f3545ee394dfd00e8bc92c9c1f9f536c5
I assume the trivial fix would be to internally just use the max of the current size and the passed value.