Bug 116015

Summary: [Win] REGRESSION(r149944): mmap is not available on Windows
Product: WebKit Reporter: Zoltan Arvai <zarvai>
Component: New BugsAssignee: Jocelyn Turcotte <jturcotte>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue, hausmann, jturcotte, kadam, ossy, rakuco, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 115970    
Attachments:
Description Flags
Patch
none
Patch
andersca: review-, andersca: commit-queue-
Patch
none
Patch none

Description Zoltan Arvai 2013-05-13 01:08:45 PDT
After r149944 Qt Win build is failing:

C:\buildslave\qt-windows-32bit-release\build\Source\WebKit2\Platform\CoreIPC\ArgumentEncoder.cpp(51) : error C3861: 'munmap': identifier not found
C:\buildslave\qt-windows-32bit-release\build\Source\WebKit2\Platform\CoreIPC\ArgumentEncoder.cpp(75) : error C2065: 'PROT_READ' : undeclared identifier
C:\buildslave\qt-windows-32bit-release\build\Source\WebKit2\Platform\CoreIPC\ArgumentEncoder.cpp(75) : error C2065: 'PROT_WRITE' : undeclared identifier
C:\buildslave\qt-windows-32bit-release\build\Source\WebKit2\Platform\CoreIPC\ArgumentEncoder.cpp(75) : error C2065: 'MAP_ANON' : undeclared identifier
C:\buildslave\qt-windows-32bit-release\build\Source\WebKit2\Platform\CoreIPC\ArgumentEncoder.cpp(75) : error C2065: 'MAP_PRIVATE' : undeclared identifier
C:\buildslave\qt-windows-32bit-release\build\Source\WebKit2\Platform\CoreIPC\ArgumentEncoder.cpp(75) : error C3861: 'mmap': identifier not found
C:\buildslave\qt-windows-32bit-release\build\Source\WebKit2\Platform\CoreIPC\ArgumentEncoder.cpp(82) : error C3861: 'munmap': identifier not found

And after r149945:

C:\buildslave\qt-windows-32bit-release\build\Source\WebKit2\Platform\CoreIPC\ArgumentEncoder.cpp(32) : fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory

Can you check it, please?
Comment 1 Csaba Osztrogonác 2013-05-13 01:16:52 PDT
(In reply to comment #0)
> After r149944 Qt Win build is failing:
> Can you check it, please?

Zoltán, Apple isn't responsible to fix any Qt-WK2 related build 
breakages. So it would be great if you can check and fix it yourself 
instead of asking others to do it. ;-)
Comment 2 Zoltan Arvai 2013-05-13 06:21:31 PDT
I found similar things in WTF/wtf/TCSystemAlloc.cpp where #if guards are used for MMAP and VIRTUALALLOC capable ports.
Comment 3 Jocelyn Turcotte 2013-05-13 08:57:33 PDT
Created attachment 201572 [details]
Patch
Comment 4 WebKit Commit Bot 2013-05-13 09:00:29 PDT
Attachment 201572 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.cpp']" exit_code: 1
Source/WebKit2/ChangeLog:8:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Jocelyn Turcotte 2013-05-13 09:20:34 PDT
Created attachment 201575 [details]
Patch

Fix the style.
Comment 6 Anders Carlsson 2013-05-13 10:12:05 PDT
Comment on attachment 201575 [details]
Patch

There’s no reason to call VirtualAlloc/VirtualFree on Windows; you can keep calling malloc/free.
Comment 7 Jocelyn Turcotte 2013-05-13 11:42:20 PDT
Created attachment 201586 [details]
Patch

Use fastAlloc instead of VirtualAlloc and use mmap only on OS(DARWIN).
Comment 8 Jocelyn Turcotte 2013-05-13 11:50:35 PDT
Created attachment 201587 [details]
Patch

Reword the ChangeLog.
Comment 9 WebKit Commit Bot 2013-05-14 10:55:12 PDT
Comment on attachment 201587 [details]
Patch

Clearing flags on attachment: 201587

Committed r150079: <http://trac.webkit.org/changeset/150079>
Comment 10 WebKit Commit Bot 2013-05-14 10:55:15 PDT
All reviewed patches have been landed.  Closing bug.