[webkit-reviews] review granted: [Bug 28926] Should crash if JIT code buffer allocation fails. : [Attachment 38948] The patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 2 17:10:56 PDT 2009
Sam Weinig <sam at webkit.org> has granted Gavin Barraclough
<barraclough at apple.com>'s request for review:
Bug 28926: Should crash if JIT code buffer allocation fails.
https://bugs.webkit.org/show_bug.cgi?id=28926
Attachment 38948: The patch
https://bugs.webkit.org/attachment.cgi?id=38948&action=review
------- Additional Comments from Sam Weinig <sam at webkit.org>
> Index: JavaScriptCore/jit/ExecutableAllocatorPosix.cpp
> ===================================================================
> --- JavaScriptCore/jit/ExecutableAllocatorPosix.cpp (revision 47901)
> +++ JavaScriptCore/jit/ExecutableAllocatorPosix.cpp (working copy)
> @@ -44,7 +44,10 @@ void ExecutableAllocator::intializePageS
>
> ExecutablePool::Allocation ExecutablePool::systemAlloc(size_t n)
> {
> - ExecutablePool::Allocation alloc = { reinterpret_cast<char*>(mmap(NULL,
n, INITIAL_PROTECTION_FLAGS, MAP_PRIVATE | MAP_ANON,
VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY, 0)), n };
> + void* allocation = mmap(NULL, n, INITIAL_PROTECTION_FLAGS, MAP_PRIVATE |
MAP_ANON, VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY, 0);
> + if (allocation == (void*)-1)
Can we use the MAP_FAILED constant here?
Otherwise, r=me
More information about the webkit-reviews
mailing list