Subject: bug#47125: 28.0.50; pdumper assumes compile time page size remains valid

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 28 Mar 2021 17:46:09 +0200

Pip Cet <[email-masked]> writes:

> Linux also offers 64KB pages, so I believe Andreas is correct, that
> would be better.
>
> Should we verify that getpagesize isn't problematic when loading the dump?

This was two weeks ago, and there was no followup here.  Everybody
seemed to agree that we should use 64K here...  So is the following
patch correct?

diff --git a/src/pdumper.c b/src/pdumper.c
index 337742fda4..bdaba0269f 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -162,11 +162,7 @@ ptrdiff_t_to_dump_off (ptrdiff_t value)
 static int
 dump_get_page_size (void)
 {
-#if defined (WINDOWSNT) || defined (CYGWIN)
   return 64 * 1024;  /* Worst-case allocation granularity.  */
-#else
-  return getpagesize ();
-#endif
 }
 
 #define dump_offsetof(type, member)                             \

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no