From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#47125: 28.0.50; pdumper assumes compile time page size remains valid Date: Sat, 13 Mar 2021 21:38:16 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21617"; mail-complaints-to="usenet@ciao.gmane.io" To: 47125@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 13 22:39:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lLByZ-0005WW-9r for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Mar 2021 22:39:11 +0100 Original-Received: from localhost ([::1]:44192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLByY-0003Qm-BG for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Mar 2021 16:39:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLByQ-0003QL-U1 for bug-gnu-emacs@gnu.org; Sat, 13 Mar 2021 16:39:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49271) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLByQ-0007RT-M1 for bug-gnu-emacs@gnu.org; Sat, 13 Mar 2021 16:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lLByQ-0000XW-JQ for bug-gnu-emacs@gnu.org; Sat, 13 Mar 2021 16:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Mar 2021 21:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47125 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16156715372061 (code B ref -1); Sat, 13 Mar 2021 21:39:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Mar 2021 21:38:57 +0000 Original-Received: from localhost ([127.0.0.1]:60817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLByL-0000XB-6G for submit@debbugs.gnu.org; Sat, 13 Mar 2021 16:38:57 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:45792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLByJ-0000X3-09 for submit@debbugs.gnu.org; Sat, 13 Mar 2021 16:38:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLByI-0003OQ-PY for bug-gnu-emacs@gnu.org; Sat, 13 Mar 2021 16:38:54 -0500 Original-Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]:38450) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLByH-0007Mj-B1 for bug-gnu-emacs@gnu.org; Sat, 13 Mar 2021 16:38:54 -0500 Original-Received: by mail-oi1-x22c.google.com with SMTP id v192so23115093oia.5 for ; Sat, 13 Mar 2021 13:38:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=vqyp7+c5ZlS0w9lwJxeRkpF79xrNZMYTT25VCDs/b84=; b=lcf62bb/fERoZR57a6dz5NaIgnWB7lpdRlP40tpvYRsoyxkn7jdVNeL7yvUzmlyOWj ojlBYumREbwaQIhan5/hrL2e39TYdzH4+7tcud+dB69d9foSQ4xd2VxdHduX4Li36l39 qcC9Xtzo5ei+hdy9LLaU01tNEoBV1NQF3OwWyQUcHmWjRqOiEB1G3XTp4cXZVHiYnqtS kawh1I+Ehvc4JcPd2lCMEbJNoPiRtUvIK4X+XssgCc6A5E0pVJiSuKr73ND4X88J3p2O uVyPVlNc//3x9wXt4YbGMowooGMVBbsuS1dNGe8+HxrBEWtTrvqV0kX98g6GClWD5JhJ ipiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=vqyp7+c5ZlS0w9lwJxeRkpF79xrNZMYTT25VCDs/b84=; b=LeX63Anzid4Lrtl2k9+dIunynovzsDJl4Y3uJU17UKN99J9VDhp84vebEHAitfYFRI NlURuwxInS9P94vMLNZV3WHA3mBIQZzEiCBgefUPkc8is2ubrdBTnSmkbL59UgtlKT0r jp/bV0lldduHdW5vzztb/PtsaEKAjGt8U0Rx67ihL3qH/jWz9mp7Jj44uiUmlRcrYFfP 0lL2zwtc6SxRGvJV4hrz+ZEfASvneoB9OFA+6HiLA1ZaE0uFbuBeC0jshGF9GSE74a5J GTzzlwkWxA7dBt3xZmgIJu71l/ZWRocCy7wHHL8bDbQ19xIk2pzedycK+Gkrj3SmS41o 1/2g== X-Gm-Message-State: AOAM532SzBIJNinU63GQPATidRvSbKJEnAgAV+EvvUewatnzscE0jHNA oeGjzA5X4OHaiFn5YfKgZ80+j6556I+KOkDXfpS4kJRz4LQ= X-Google-Smtp-Source: ABdhPJyADEcf85yo8wGvEe66zeKSEQHY1yt5ICxEM6NUcn5qk3R9zmlnVheIqBM0pC6dHQC89IK5nDlVpRGQtPFAtts= X-Received: by 2002:aca:4c0f:: with SMTP id z15mr14255294oia.44.1615671532335; Sat, 13 Mar 2021 13:38:52 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::22c; envelope-from=pipcet@gmail.com; helo=mail-oi1-x22c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:202311 Archived-At: 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.