unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#47125: 28.0.50; pdumper assumes compile time page size remains valid
@ 2021-03-13 21:38 Pip Cet
  2021-03-14  5:37 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Pip Cet @ 2021-03-13 21:38 UTC (permalink / raw)
  To: 47125

I'm running Debian GNU/Linux (the Linux part is not provided by
Debian) on an Apple M1-based machine. This currently involves running
a kernel compiled with a 16 KB page size (the only fully functional
kernel is currently available as a binary as recompilation of the
alleged source fails to produce a fully working kernel).

The Debian-packaged Emacs version does not start. Compiling from
scratch works fine.

After some investigation, this is because pdumper assumes that an
address aligned according to the page size at build time is
sufficiently aligned for mmap to work with the MAP_FIXED flag, when it
comes to loading the dump. That's not true because the Debian Emacs
was apparently built with a 4 KB page size, so it will not run on a
system with a 16 KB page size.

I've confirmed that I get the same error on current master if I modify
getpagesize to return 4096 rather than the correct value.

I think it would be best to handle this case gracefully, and I thought
pdumper already did that, but it appears to simply fail.

There are good reasons for increasing the page size, so this is likely
to happen more often and on other architectures with varying page
sizes. We're currently enforcing a page size of 64 KB on Windows, so
maybe it already has.





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-03-28 17:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-13 21:38 bug#47125: 28.0.50; pdumper assumes compile time page size remains valid Pip Cet
2021-03-14  5:37 ` Eli Zaretskii
2021-03-14  5:43   ` Daniel Colascione
2021-03-14  7:34     ` Andreas Schwab
2021-03-14  7:36       ` Daniel Colascione
2021-03-14  8:16     ` Pip Cet
2021-03-28 15:46       ` Lars Ingebrigtsen
2021-03-28 16:16         ` Eli Zaretskii
2021-03-28 17:13           ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).