diff options
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/masm/assembler/ARM64Assembler.h | 2 | ||||
-rw-r--r-- | src/3rdparty/masm/wtf/OSAllocatorPosix.cpp | 18 |
2 files changed, 16 insertions, 4 deletions
diff --git a/src/3rdparty/masm/assembler/ARM64Assembler.h b/src/3rdparty/masm/assembler/ARM64Assembler.h index ca6b33d39a..3e988a277c 100644 --- a/src/3rdparty/masm/assembler/ARM64Assembler.h +++ b/src/3rdparty/masm/assembler/ARM64Assembler.h @@ -676,11 +676,11 @@ public: struct RealTypes { int64_t m_from : 48; int64_t m_to : 48; + RegisterID m_compareRegister; JumpType m_type : 8; JumpLinkType m_linkType : 8; Condition m_condition : 4; unsigned m_bitNumber : 6; - RegisterID m_compareRegister : 6; bool m_is64Bit : 1; } realTypes; } data; diff --git a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp index d59fdcd675..d54b7e9492 100644 --- a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp +++ b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp @@ -111,7 +111,11 @@ void* OSAllocator::reserveUncommitted(size_t bytes, Usage usage, bool writable, (fd == -1 ? MAP_ANON : 0), fd, 0); if (result == MAP_FAILED) CRASH(); - madvise(result, bytes, MADV_DONTNEED); + + while (madvise(result, bytes, MADV_DONTNEED)) { + if (errno != EAGAIN) + CRASH(); + } if (fd != -1) close(fd); @@ -218,7 +222,12 @@ void OSAllocator::commit(void* address, size_t bytes, bool writable, bool execut protection |= PROT_EXEC; if (mprotect(address, bytes, protection)) CRASH(); - madvise(address, bytes, MADV_WILLNEED); + + while (madvise(address, bytes, MADV_WILLNEED)) { + if (errno != EAGAIN) + CRASH(); + } + #elif HAVE(MADV_FREE_REUSE) UNUSED_PARAM(writable); UNUSED_PARAM(executable); @@ -238,7 +247,10 @@ void OSAllocator::decommit(void* address, size_t bytes) // Use PROT_NONE and MAP_LAZY to decommit the pages. mmap(address, bytes, PROT_NONE, MAP_FIXED | MAP_LAZY | MAP_PRIVATE | MAP_ANON, -1, 0); #elif OS(LINUX) - madvise(address, bytes, MADV_DONTNEED); + while (madvise(address, bytes, MADV_DONTNEED)) { + if (errno != EAGAIN) + CRASH(); + } if (mprotect(address, bytes, PROT_NONE)) CRASH(); #elif HAVE(MADV_FREE_REUSE) |