Bug 236670
| Summary: | OSAllocatorPosix::tryReserveUncommittedAligned() should not use PROT_NONE on non-linux platforms | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Yoshiaki Jitsukawa <yoshiaki.jitsukawa> |
| Component: | Platform | Assignee: | Basuke Suzuki <basuke> |
| Status: | NEW | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=236625 | ||
Yoshiaki Jitsukawa
OSAllocatorPosix::tryReserveUncommittedAligned() should not use PROT_NONE on non-linux platforms.
Only on linux PROT_NONE is used for deccommitted pages. That is, protection flags are set on commit() only on Linux.
https://github.com/WebKit/WebKit/blob/9067a50/Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp#L228
However in tryReserveUncommittedAligned() PROT_NONE is used for platforms other than
#if PLATFORM(MAC) || USE(APPLE_INTERNAL_SDK),
which may result in protection faults because appropriate flags won't be set on commit().
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Basuke Suzuki
(In reply to Yoshiaki Jitsukawa from comment #0)
> OSAllocatorPosix::tryReserveUncommittedAligned() should not use PROT_NONE on
> non-linux platforms.
>
> Only on linux PROT_NONE is used for deccommitted pages. That is, protection
> flags are set on commit() only on Linux.
> https://github.com/WebKit/WebKit/blob/9067a50/Source/WTF/wtf/posix/
> OSAllocatorPOSIX.cpp#L228
>
> However in tryReserveUncommittedAligned() PROT_NONE is used for platforms
> other than
> #if PLATFORM(MAC) || USE(APPLE_INTERNAL_SDK),
> which may result in protection faults because appropriate flags won't be set
> on commit().
Linux implementation is so much depends on Linux memory management way and very different from other port.
Radar WebKit Bug Importer
<rdar://problem/89317522>