f6e6ae092d
We were allowing up to 1 million elements for each array, which meant 16 MB (32 for maps), and we considered that sufficient. However, because we do allow up to 1024 levels of recursion, the memory consumption was actually limited to 16 GB (32 for maps), which is a bit too high for 64-bit applications, and definitely too high for 32-bit ones. So further clamp down, to a mere 16k elements on 32-bit and 64k on 64- bit, which limits the memory use to 256 MB on 32-bit and 1 GB on 64-bit. And additionally apply this exact limit to maps, instead of allowing them to double the size. As before, this does not limit the size of non-corrupt streams. This only limits the initial memory pre-allocation. Pick-to: 6.2 6.3 6.4 Fixes: QTBUG-104718 Change-Id: I89c4eb48af38408daa7cfffd16fdcb34f08c1949 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
LICENSES | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
conanfile.py | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake | ||
sync.profile |