Bug 79962 - The JIT should not crash the entire process just because there is not enough executable memory, if the LLInt is enabled
Summary: The JIT should not crash the entire process just because there is not enough ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 80055
  Show dependency treegraph
 
Reported: 2012-02-29 17:29 PST by Filip Pizlo
Modified: 2012-03-01 22:29 PST (History)
4 users (show)

See Also:


Attachments
the patch (42.92 KB, patch)
2012-02-29 17:33 PST, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch for qt (1.66 KB, patch)
2012-03-01 14:49 PST, Filip Pizlo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2012-02-29 17:29:49 PST
Patch forthcoming.

<rdar://problem/10922215>
Comment 1 Filip Pizlo 2012-02-29 17:33:26 PST
Created attachment 129562 [details]
the patch
Comment 2 Gavin Barraclough 2012-02-29 17:47:31 PST
Comment on attachment 129562 [details]
the patch

r=me, minus the debug settings.
Comment 4 Csaba Osztrogonác 2012-03-01 14:43:11 PST
Reopen, because it broke Qt-ARM and Qt-SH4 builds:

Qt-SH4 build error log:
-------------------------
../../../../Source/JavaScriptCore/assembler/SH4Assembler.h: In member function 'WTF::PassRefPtr<WTF::MetaAllocatorHandle> JSC::SH4Assembler::executableCopy(JSC::JSGlobalData&, void*, JSC::JITCompilationEffort)':
../../../../Source/JavaScriptCore/assembler/SH4Assembler.h:1520:68: error: no matching function for call to 'JSC::AssemblerBufferWithConstantPool<512, 4, 2, JSC::SH4Assembler>::executableCopy(JSC::JSGlobalData&, void*&, JSC::JITCompilationEffort&)'In file included from ../../../../Source/JavaScriptCore/assembler/MacroAssemblerSH4.h:32:0,

ARM build error log:
-----------------------
../../../../Source/JavaScriptCore/assembler/ARMAssembler.cpp: In member function 'WTF::PassRefPtr<WTF::MetaAllocatorHandle> JSC::ARMAssembler::executableCopy(JSC::JSGlobalData&, void*, JSC::JITCompilationEffort)':
../../../../Source/JavaScriptCore/assembler/ARMAssembler.cpp:354:97: error: no matching function for call to 'JSC::AssemblerBufferWithConstantPool<2048, 4, 4, JSC::ARMAssembler>::executableCopy(JSC::JSGlobalData&, void*&, JSC::JITCompilationEffort&)'
../../../../Source/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h:198:40: note: candidate is: WTF::PassRefPtr<WTF::MetaAllocatorHandle> JSC::AssemblerBufferWithConstantPool<maxPoolSize, barrierSize, maxInstructionSize, AssemblerType>::executableCopy(JSC::JSGlobalData&, void*) [with int maxPoolSize = 2048, int barrierSize = 4, int maxInstructionSize = 4, AssemblerType = JSC::ARMAssembler]
Comment 5 Filip Pizlo 2012-03-01 14:46:17 PST
(In reply to comment #4)
> Reopen, because it broke Qt-ARM and Qt-SH4 builds:
> 
> Qt-SH4 build error log:
> -------------------------
> ../../../../Source/JavaScriptCore/assembler/SH4Assembler.h: In member function 'WTF::PassRefPtr<WTF::MetaAllocatorHandle> JSC::SH4Assembler::executableCopy(JSC::JSGlobalData&, void*, JSC::JITCompilationEffort)':
> ../../../../Source/JavaScriptCore/assembler/SH4Assembler.h:1520:68: error: no matching function for call to 'JSC::AssemblerBufferWithConstantPool<512, 4, 2, JSC::SH4Assembler>::executableCopy(JSC::JSGlobalData&, void*&, JSC::JITCompilationEffort&)'In file included from ../../../../Source/JavaScriptCore/assembler/MacroAssemblerSH4.h:32:0,
> 
> ARM build error log:
> -----------------------
> ../../../../Source/JavaScriptCore/assembler/ARMAssembler.cpp: In member function 'WTF::PassRefPtr<WTF::MetaAllocatorHandle> JSC::ARMAssembler::executableCopy(JSC::JSGlobalData&, void*, JSC::JITCompilationEffort)':
> ../../../../Source/JavaScriptCore/assembler/ARMAssembler.cpp:354:97: error: no matching function for call to 'JSC::AssemblerBufferWithConstantPool<2048, 4, 4, JSC::ARMAssembler>::executableCopy(JSC::JSGlobalData&, void*&, JSC::JITCompilationEffort&)'
> ../../../../Source/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h:198:40: note: candidate is: WTF::PassRefPtr<WTF::MetaAllocatorHandle> JSC::AssemblerBufferWithConstantPool<maxPoolSize, barrierSize, maxInstructionSize, AssemblerType>::executableCopy(JSC::JSGlobalData&, void*) [with int maxPoolSize = 2048, int barrierSize = 4, int maxInstructionSize = 4, AssemblerType = JSC::ARMAssembler]

Looks like I forgot about threading JITCompilationEffort through AssemblerBufferWithConstantPool::executableCopy().
Comment 6 Filip Pizlo 2012-03-01 14:49:23 PST
Created attachment 129751 [details]
the patch for qt
Comment 7 Csaba Osztrogonác 2012-03-01 21:43:04 PST
Comment on attachment 129751 [details]
the patch for qt

rs=me, thanks for the fix.
Comment 8 Csaba Osztrogonác 2012-03-01 22:28:59 PST
Comment on attachment 129751 [details]
the patch for qt

Clearing flags on attachment: 129751

Committed r109511: <http://trac.webkit.org/changeset/109511>
Comment 9 Csaba Osztrogonác 2012-03-01 22:29:08 PST
All reviewed patches have been landed.  Closing bug.