https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102144

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This was fixed with the merge from upstream in April, r14-263-gd53b3d94aaf2 .

Specifically:
@@ -87,19 +85,26 @@ void *MmapAlignedOrDieOnFatalError(uptr size, uptr
alignment,
   CHECK(IsPowerOfTwo(size));
   CHECK(IsPowerOfTwo(alignment));
   uptr map_size = size + alignment;
+  // mmap maps entire pages and rounds up map_size needs to be a an integral
+  // number of pages.
+  // We need to be aware of this size for calculating end and for unmapping
+  // fragments before and after the alignment region.
+  map_size = RoundUpTo(map_size, GetPageSizeCached());


https://github.com/llvm/llvm-project/commit/1293e93ee3da0d53665975499a909a45c5b90423
was the upstream commit. Funny how it was recorded for Mac OS due to 16k page
size rather than my report which was filed before hand.

Reply via email to