Bug 79962

Summary: The JIT should not crash the entire process just because there is not enough executable memory, if the LLInt is enabled
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: loki, ossy, zecke, zherczeg
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 80055    
Attachments:
Description Flags
the patch
none
the patch for qt none

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.