WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
28926
Should crash if JIT code buffer allocation fails.
https://bugs.webkit.org/show_bug.cgi?id=28926
Summary
Should crash if JIT code buffer allocation fails.
Gavin Barraclough
Reported
2009-09-02 17:06:37 PDT
<
rdar://problem/7031922
>
Attachments
The patch
(2.27 KB, patch)
2009-09-02 17:08 PDT
,
Gavin Barraclough
sam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
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.
Top of Page
Format For Printing
XML
Clone This Bug