Michał Łoś 138160fccd Fix exception in memory heavy QLatin1StringMatcher test
tst_QLatin1StringMatcher::haystacksWithMoreThan4GiBWork test requires a
lot of memory to run (over 12GiB total) when run on 64bit platform. This
is addressed in try-catch block starting in line 535, in which check for
std::bad_alloc is added, skipping the test when it occurs.

Unfortunately, this helps with scenario where system has 4GiB or less of
memory, because in line 567 conversion of 4GiB+ std::string to QString
occurs, which requires additional 8GiB+ of memory. This ends up with
std::bad_alloc exception happening when system has less than 12GiB
bytes, failing the test. This was found during tests of VxWorks for
Intel x64.

Fix this by extracting allocation and surrounding it with try-catch
bock, skipping test if std::bad_alloc occurs.

Task-number: QTBUG-115777
Change-Id: Ie6df4d702f061b1d17cb0eab84228819d294a379
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-12-09 08:47:43 +01:00
2024-11-05 14:36:16 +01:00
2024-11-05 14:36:16 +01:00
2024-06-25 11:44:00 +02:00
2024-11-05 14:36:16 +01:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%