Bug 235940 - Revert OSAllocator behavior to pre-Structure-Allocator change one
Summary: Revert OSAllocator behavior to pre-Structure-Allocator change one
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-01-31 23:43 PST by Yusuke Suzuki
Modified: 2022-02-01 03:07 PST (History)
10 users (show)

See Also:


Attachments
Patch (14.34 KB, patch)
2022-01-31 23:53 PST, Yusuke Suzuki
mark.lam: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2022-01-31 23:43:02 PST
Revert OSAllocator behavior to pre-Structure-Allocator change one
Comment 1 Yusuke Suzuki 2022-01-31 23:53:20 PST
Created attachment 450504 [details]
Patch
Comment 2 Mark Lam 2022-02-01 00:53:15 PST
Comment on attachment 450504 [details]
Patch

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

r=me

> Source/WTF/ChangeLog:42
> +        We also fix that tryReserveUncommitted is not correctly handling MAP_FAILED. We should not return MAP_FAILED from OSAllocator, instead,

I suggest "fix that tryReserveUncommitted is not correctly handling MAP_FAILED" => "fix a bug in tryReserveUncommitted where it handles MAP_FAILED incorrectly".

> Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp:116
> +void* OSAllocator::tryReserveUncommitted(size_t bytes, Usage usage, bool writable, bool executable, bool jitCageEnabled, bool includesGuardPages)

Why remove the "OSAllocator::" qualifier for Usage?  You kept to for tryReserveAndCommit above.  I see that it is not used for functions below.  Maybe remove it also for tryReserveAndCommit above?
Comment 3 Yusuke Suzuki 2022-02-01 01:15:44 PST
Comment on attachment 450504 [details]
Patch

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

>> Source/WTF/ChangeLog:42
>> +        We also fix that tryReserveUncommitted is not correctly handling MAP_FAILED. We should not return MAP_FAILED from OSAllocator, instead,
> 
> I suggest "fix that tryReserveUncommitted is not correctly handling MAP_FAILED" => "fix a bug in tryReserveUncommitted where it handles MAP_FAILED incorrectly".

Changed.

>> Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp:116
>> +void* OSAllocator::tryReserveUncommitted(size_t bytes, Usage usage, bool writable, bool executable, bool jitCageEnabled, bool includesGuardPages)
> 
> Why remove the "OSAllocator::" qualifier for Usage?  You kept to for tryReserveAndCommit above.  I see that it is not used for functions below.  Maybe remove it also for tryReserveAndCommit above?

Because now it is static function of OSAllocator::. So, we don't need OSAllocator:: prefix to Usage.
Removed that of tryReserveAndCommit too.
Comment 4 Yusuke Suzuki 2022-02-01 02:26:42 PST
Committed r288870 (246622@trunk): <https://commits.webkit.org/246622@trunk>
Comment 5 Radar WebKit Bug Importer 2022-02-01 02:27:18 PST
<rdar://problem/88318960>