Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information