From 7cab0a31de5ab67bbe1add88ea6aa27e7bbc4ddc Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 8 Feb 2017 10:25:24 +0100 Subject: Fix crash when generating cache files Make sure that the allocator in bootstrap builds really just allocates memory for the generated code and otherwise doesn't try to allocate executable memory. Change-Id: Ic40724903706ae98ef272a028e7d8299400e232b Reviewed-by: Lars Knoll --- tools/qmlcachegen/qmlcachegen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/qmlcachegen') diff --git a/tools/qmlcachegen/qmlcachegen.cpp b/tools/qmlcachegen/qmlcachegen.cpp index 4b902eda0f..10d9829520 100644 --- a/tools/qmlcachegen/qmlcachegen.cpp +++ b/tools/qmlcachegen/qmlcachegen.cpp @@ -141,7 +141,8 @@ static bool compileQmlFile(const QString &inputFileName, QV4::EvalISelFactory *i // ### translation binding simplification - QScopedPointer isel(iselFactory->create(/*engine*/nullptr, /*executable allocator*/nullptr, &irDocument.jsModule, &irDocument.jsGenerator)); + QV4::ExecutableAllocator allocator; + QScopedPointer isel(iselFactory->create(/*engine*/nullptr, &allocator, &irDocument.jsModule, &irDocument.jsGenerator)); // Disable lookups in non-standalone (aka QML) mode isel->setUseFastLookups(false); irDocument.javaScriptCompilationUnit = isel->compile(/*generate unit*/false); -- cgit v1.2.3