Bug 41641

Summary: Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms other than x86-64
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: JavaScriptCoreAssignee: Gavin Barraclough <barraclough>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, ossy, webkit.review.bot, xan.lopez, zherczeg
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on: 41679, 41686    
Bug Blocks:    
Attachments:
Description Flags
The patch sam: review+

Gavin Barraclough
Reported 2010-07-05 15:00:19 PDT
This may be useful on 32-bit platforms, too.
Attachments
The patch (8.96 KB, patch)
2010-07-05 15:06 PDT, Gavin Barraclough
sam: review+
Gavin Barraclough
Comment 1 2010-07-05 15:06:55 PDT
Created attachment 60570 [details] The patch The constants VM_POOL_SIZE & COALESCE_LIMIT will require some tuning, have put in some hopefully sensible starting points. This patch is a cleanup that should not change the behaviour on any platform.
WebKit Review Bot
Comment 2 2010-07-05 18:21:51 PDT
http://trac.webkit.org/changeset/62511 might have broken SnowLeopard Intel Release (Tests)
Gavin Barraclough
Comment 3 2010-07-05 22:55:07 PDT
fixed in r62511
Xan Lopez
Comment 4 2010-07-06 04:36:21 PDT
I rolled this out because it breaks Linux/64bit. I'm unsure of what we are supposed to do, since ExecutableAllocatorPosix.cpp is now defined only for 32bit, and ExecutableAllocatorFixedVMPool.cpp is Darwin-only atm.
Mark Rowe (bdash)
Comment 5 2010-07-06 04:43:00 PDT
Xan, if this was rolled out you need to do two things: 1) Mention the revision number in which it was rolled out. 2) Reopen the bug. If the change is no longer in the tree then the bug clearly isn’t “fixed”.
Xan Lopez
Comment 6 2010-07-06 05:10:35 PDT
Sorry, for some reason thought the bot had reopened it. The bug is linked in the 'Depends on' list though, revision where this was rolled out is r62544.
Gavin Barraclough
Comment 7 2010-07-07 11:11:26 PDT
I hadn't realized the JIT had been enabled on x86-64 Linux using the posix allocator - this is terribly unsafe, we should only be using the fixed pool allocator on 64bit (due to a branch range issue). However this is also implemented in terms of posix mmap/munmap, so should work on Linux too. Do you know what the problem is here? - is it just missing arc4random? - if so, we can just disable the ASLR on !OS(DARWIN) platforms.
Xan Lopez
Comment 8 2010-07-07 16:45:40 PDT
(In reply to comment #7) > I hadn't realized the JIT had been enabled on x86-64 Linux using the posix allocator - this is terribly unsafe, we should only be using the fixed pool allocator on 64bit (due to a branch range issue). However this is also implemented in terms of posix mmap/munmap, so should work on Linux too. Do you know what the problem is here? - is it just missing arc4random? - if so, we can just disable the ASLR on !OS(DARWIN) platforms. Oh, I haven't tried to actually compile the file. Just saw that it used to be guarded by OS(DARWIN) and has mach headers, so it won't compile on Linux out of the box. If the right thing to do is use this I can try to get it into shape.
Zoltan Herczeg
Comment 9 2010-07-07 23:17:51 PDT
Exactly, arc4random is missing. In Qt-Linux 64, mmap with 0 address works fine, and not sure what is the advantage of forcing a custom address space (anyway an idea: since the random address space may collide with something else, you could encolse it in a loop, and could try 3 or 4 times with different random values before crash with out of memory) Anyway, that patch was rolled out, so you can incorporate this fix into that patch before landing again.
Gavin Barraclough
Comment 10 2010-07-08 11:55:22 PDT
*** Bug 41679 has been marked as a duplicate of this bug. ***
Gavin Barraclough
Comment 11 2010-07-08 11:58:53 PDT
Relanded in 62799, GTK fixes in 62806, 62811.
Note You need to log in before you can comment on or make changes to this bug.