Bug 28926

Summary: Should crash if JIT code buffer allocation fails.
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: JavaScriptCoreAssignee: Gavin Barraclough <barraclough>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
The patch sam: review+

Gavin Barraclough
Reported 2009-09-02 17:06:37 PDT
Attachments
The patch (2.27 KB, patch)
2009-09-02 17:08 PDT, Gavin Barraclough
sam: review+
Gavin Barraclough
Comment 1 2009-09-02 17:08:02 PDT
Created attachment 38948 [details] The patch
Sam Weinig
Comment 2 2009-09-02 17:10:57 PDT
Comment on attachment 38948 [details] The patch > 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
Gavin Barraclough
Comment 3 2009-09-02 17:33:40 PDT
Sending JavaScriptCore/ChangeLog Sending JavaScriptCore/jit/ExecutableAllocatorPosix.cpp Sending JavaScriptCore/jit/ExecutableAllocatorWin.cpp Transmitting file data ... Committed revision 48000.
Note You need to log in before you can comment on or make changes to this bug.