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 --- src/3rdparty/masm/stubs/ExecutableAllocator.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/3rdparty') diff --git a/src/3rdparty/masm/stubs/ExecutableAllocator.h b/src/3rdparty/masm/stubs/ExecutableAllocator.h index 9a2a9773b5..3b84b5c986 100644 --- a/src/3rdparty/masm/stubs/ExecutableAllocator.h +++ b/src/3rdparty/masm/stubs/ExecutableAllocator.h @@ -107,7 +107,7 @@ struct ExecutableAllocator { size = size + (iaddr - roundAddr); addr = reinterpret_cast(roundAddr); -#if ENABLE(ASSEMBLER_WX_EXCLUSIVE) +#if ENABLE(ASSEMBLER_WX_EXCLUSIVE) && !defined(V4_BOOTSTRAP) # if OS(WINDOWS) DWORD oldProtect; # if !OS(WINRT) @@ -140,6 +140,7 @@ struct ExecutableAllocator { size = size + (iaddr - roundAddr); addr = reinterpret_cast(roundAddr); +#if !defined(V4_BOOTSTRAP) #if ENABLE(ASSEMBLER_WX_EXCLUSIVE) # if OS(WINDOWS) DWORD oldProtect; @@ -160,6 +161,10 @@ struct ExecutableAllocator { # endif #else # error "Only W^X is supported" +#endif +#else + (void)addr; // suppress unused parameter warning + (void)size; // suppress unused parameter warning #endif } -- cgit v1.2.3