Bug 111353

Summary: Make fastmalloc use guardpages
Product: WebKit Reporter: Oliver Hunt <oliver>
Component: New BugsAssignee: Oliver Hunt <oliver>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, ojan.autocc, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch andersca: review+

Description Oliver Hunt 2013-03-04 12:05:27 PST
Make fastmalloc use guardpages
Comment 1 Oliver Hunt 2013-03-04 12:07:06 PST
Created attachment 191285 [details]
Patch
Comment 2 WebKit Review Bot 2013-03-04 12:08:57 PST
Attachment 191285 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WTF/ChangeLog', u'Source/WTF/wtf/TCSystemAlloc.cpp']" exit_code: 1
Source/WTF/wtf/TCSystemAlloc.cpp:169:  Use 0 instead of NULL.  [readability/null] [5]
Source/WTF/wtf/TCSystemAlloc.cpp:169:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WTF/wtf/TCSystemAlloc.cpp:177:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WTF/wtf/TCSystemAlloc.cpp:178:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WTF/wtf/TCSystemAlloc.cpp:179:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 5 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Oliver Hunt 2013-03-06 12:54:57 PST
Created attachment 191813 [details]
Patch
Comment 4 WebKit Review Bot 2013-03-06 12:57:41 PST
Attachment 191813 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WTF/ChangeLog', u'Source/WTF/wtf/TCSystemAlloc.cpp']" exit_code: 1
Source/WTF/wtf/TCSystemAlloc.cpp:170:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WTF/wtf/TCSystemAlloc.cpp:171:  Use 0 instead of NULL.  [readability/null] [5]
Source/WTF/wtf/TCSystemAlloc.cpp:171:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WTF/wtf/TCSystemAlloc.cpp:179:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WTF/wtf/TCSystemAlloc.cpp:180:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WTF/wtf/TCSystemAlloc.cpp:181:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 6 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Michael Saboff 2013-03-06 13:17:30 PST
Comment on attachment 191813 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=191813&action=review

>> Source/WTF/wtf/TCSystemAlloc.cpp:179
>> +  mmap(result, pagesize, PROT_NONE, MAP_FIXED | MAP_PRIVATE | MAP_ANON, VM_TAG_FOR_TCMALLOC_MEMORY, 0);
> 
> Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]

Shouldn't this be an mprotect() call.

>> Source/WTF/wtf/TCSystemAlloc.cpp:180
>> +  mmap(static_cast<char*>(result) + (mapSize - pagesize).unsafeGet(), pagesize, PROT_NONE, MAP_FIXED | MAP_PRIVATE | MAP_ANON, VM_TAG_FOR_TCMALLOC_MEMORY, 0);
> 
> Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]

Ditto.
Comment 6 Oliver Hunt 2013-03-06 18:43:32 PST
Committed r144971: <http://trac.webkit.org/changeset/144971>