From ba53b42a6d2f92a68e402686d541b0b6dabd9f03 Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Sun, 17 Apr 2016 23:02:41 +1200 Subject: [PATCH] Bug 4493: theObject->sharedMemorySize() == theSegment.size() exception We should not expect the exact match because, as discovered during bug 3805 (r13947) fix, shared Segment::size() may exceed the originally requested RAM amount due to stat() page rounding done by OSes like OS X. Unfortunately, this rounding weakens the failed consistency check a lot. TODO: Store the exact requested size and check against that as well. --- src/ipc/mem/Pointer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipc/mem/Pointer.h b/src/ipc/mem/Pointer.h index da183b158b..ec0fe149fb 100644 --- a/src/ipc/mem/Pointer.h +++ b/src/ipc/mem/Pointer.h @@ -165,7 +165,7 @@ Object::Object(const char *const id): theSegment(id) theSegment.open(); Must(theSegment.mem()); theObject = reinterpret_cast(theSegment.mem()); - Must(static_cast(theObject->sharedMemorySize()) == theSegment.size()); + Must(static_cast(theObject->sharedMemorySize()) <= theSegment.size()); } template -- 2.47.2