Title: [291456] trunk/Source/WTF
Revision
291456
Author
[email protected]
Date
2022-03-17 17:48:31 -0700 (Thu, 17 Mar 2022)

Log Message

tryReserveUncommittedAligned should round up to alignment not bytes requested
https://bugs.webkit.org/show_bug.cgi?id=238052

Reviewed by Yusuke Suzuki.

* wtf/posix/OSAllocatorPOSIX.cpp:
(WTF::OSAllocator::tryReserveUncommittedAligned):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (291455 => 291456)


--- trunk/Source/WTF/ChangeLog	2022-03-18 00:46:15 UTC (rev 291455)
+++ trunk/Source/WTF/ChangeLog	2022-03-18 00:48:31 UTC (rev 291456)
@@ -1,5 +1,15 @@
 2022-03-17  Keith Miller  <[email protected]>
 
+        tryReserveUncommittedAligned should round up to alignment not bytes requested
+        https://bugs.webkit.org/show_bug.cgi?id=238052
+
+        Reviewed by Yusuke Suzuki.
+
+        * wtf/posix/OSAllocatorPOSIX.cpp:
+        (WTF::OSAllocator::tryReserveUncommittedAligned):
+
+2022-03-17  Keith Miller  <[email protected]>
+
         Fix crash in Bleacher Report due to bad JSObjectRef passed to API
         https://bugs.webkit.org/show_bug.cgi?id=238048
         <rdar://88766464>

Modified: trunk/Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp (291455 => 291456)


--- trunk/Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp	2022-03-18 00:46:15 UTC (rev 291455)
+++ trunk/Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp	2022-03-18 00:48:31 UTC (rev 291456)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -200,7 +200,7 @@
     char* mapped = reinterpret_cast<char*>(tryReserveUncommitted(mappedSize, usage, writable, executable, jitCageEnabled, includesGuardPages));
     char* mappedEnd = mapped + mappedSize;
 
-    char* aligned = reinterpret_cast<char*>(roundUpToMultipleOf(bytes, reinterpret_cast<uintptr_t>(mapped)));
+    char* aligned = reinterpret_cast<char*>(roundUpToMultipleOf(alignment, reinterpret_cast<uintptr_t>(mapped)));
     char* alignedEnd = aligned + bytes;
 
     RELEASE_ASSERT(alignedEnd <= mappedEnd);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to