From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: MPS codegen Date: Sat, 15 Jun 2024 10:46:17 +0300 Message-ID: <868qz6wsvq.fsf@gnu.org> References: <87le3b43qi.fsf@gmail.com> <86r0d21tqj.fsf@gnu.org> <877cetgqiz.fsf_-_@gmail.com> <87wmmsg2e4.fsf@gmail.com> <878qz8ezn4.fsf@gmail.com> <8734pfgb51.fsf@gmail.com> <86ikybyd2h.fsf@gnu.org> <87v82bebc6.fsf@gmail.com> <86wmmrwf86.fsf@gnu.org> <86r0czwdmc.fsf@gnu.org> <87jzire36a.fsf@gmail.com> <86plsiwxag.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36590"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eller.helmut@gmail.com, acorallo@gnu.org, emacs-devel@gnu.org To: Gerd =?iso-8859-1?Q?M=F6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 15 09:46:50 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sIO7d-0009NF-QZ for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Jun 2024 09:46:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sIO7O-0006lr-46; Sat, 15 Jun 2024 03:46:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sIO7G-0006l5-Lg for emacs-devel@gnu.org; Sat, 15 Jun 2024 03:46:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sIO7B-0005u0-Eo; Sat, 15 Jun 2024 03:46:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=jB9K1Xhc3y+Vs4GVQidaSTwv7EiuDj/teFZwxh6Gvi0=; b=HK9JzFS6stOSOcne4cng //i+BmbOhXNGrHuuj7+zXNi1fQHmcEBRkGyGc8ibBlEJE2DKhUXrR01XGxaYyN0oSivjxeJRJWFGU 9x681WwPajIJJgRqDqbBBXAzl/c1p83LZEqGlvzel2Rl+j2aghtm1sfEUFBtfiGM4N74HCwYnxVlm EmdkLwkWxKfB/qlkW91QtzElgfqbzFWaxEizrpWSNPPnZ8l4oAktOya+WmI1OkA6Ihf6KQn/zqMXr 9EzfNKoFbt1pKUws8MBwMa4XuzxC0pPu13cRSu9J4qD8dnRjAD8MbQe2X7dcuZew8Wc7dVT+TYMHM eOIA6wpY5GA9Hg==; In-Reply-To: (message from Gerd =?iso-8859-1?Q?M=F6llmann?= on Sat, 15 Jun 2024 09:25:00 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320111 Archived-At: > From: Gerd Möllmann > Cc: Helmut Eller , acorallo@gnu.org, > emacs-devel@gnu.org > Date: Sat, 15 Jun 2024 09:25:00 +0200 > > Eli Zaretskii writes: > > > In glibc, this function is implemented using madvise(2). > > However, since glibc 2.6, POSIX_MADV_DONTNEED is treated as a no- > > op, because the corresponding madvise(2) value, MADV_DONTNEED, > > has destructive semantics. > > > > So to do on Posix systems the same as we do on Windows, I think we > > need to call madvise with MADV_DONTNEED, even if posix_madvise is > > available, and also call mmap with PROT_NONE. Do you agree? If we do > > that, does the GNU/Linux build still work, or does it also crash on > > startup? > > I still think we should first establish that that is indeed the problem. > Please see my other mail. Since you insist: I ifdef'ed away this: #if 0 /* Release the commit charge for the mapping. */ DWORD old_prot; (void) VirtualProtect (mem, size, PAGE_NOACCESS, &old_prot); #endif and, lo and behold, Emacs can now start without a problem. I hope this establishes the fact that we are still accessing memory from the "discarded" pdumper block. Now what?