From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lynn Winebarger Newsgroups: gmane.emacs.devel Subject: Re: --with-native-compilation build failure on 32-bit systems Date: Tue, 9 Aug 2022 06:20:23 -0400 Message-ID: References: <86k07nl9qe.fsf@phe.ftfl.ca> <87bksyc36k.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000082afca05e5cc482b" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25099"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , Joseph Mingrone , emacs-devel , emacs@freebsd.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 09 12:21:51 2022 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 1oLMMw-0006KT-Bv for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Aug 2022 12:21:50 +0200 Original-Received: from localhost ([::1]:33958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLMMv-0006dQ-0J for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Aug 2022 06:21:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLMLn-0005v5-3N for emacs-devel@gnu.org; Tue, 09 Aug 2022 06:20:39 -0400 Original-Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:33618) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLMLl-0000Og-Hw for emacs-devel@gnu.org; Tue, 09 Aug 2022 06:20:38 -0400 Original-Received: by mail-pg1-x532.google.com with SMTP id l64so11016550pge.0 for ; Tue, 09 Aug 2022 03:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=hJoTgzL4TtorOFra3m7nBduVK2JsjlARZHoVdi56mo4=; b=UlCr5QRnXpKMod4W51K42IlX+3kP4CnQ/ce9/KBNOiD82mOsjBjlMz6nOfp1LwA6In 3OB+M5vAwGakYMs4Ddo3aOhrAC22Qk22PrRTowY+7L7qtOZnxsBSxGr6FcQgF2QhGzi6 uf/m70W+Tf6A44U9xAR5zG3n0JU7zJ1TEljeBCI5iIQXBrnsLWODIS+R9ayIt/fnlYTS 6togzkjt1OfQKqp/H6CHjKm0SaC52mxiRJwjjC1gAuEgVd0wuPi+SmapYu30Wrn/8Kje BQJ4MrZu+991v2xr3fDCHI+Aprs1Q/p4VnwVN19s+Xsp8PcdhgdMp6+qFb3DcZ75rVvS MjXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=hJoTgzL4TtorOFra3m7nBduVK2JsjlARZHoVdi56mo4=; b=GcgfXvc10xjLTrhuRuO2Zhi7snSyrskhFEqPfs6MZf6/VhJOXMyHFzOhuxLC+qhCtl jV8IN2Om5edCbZfCUp6Zs/X81ic1JQAoGh7ZndBm7iQ6fDC/ee/mCa9PqWxvFGQyt5e2 QvyB7FCDgoYD3xVeMj0CTe0uKeB6YXgz3bynuUWxQYXOxDEwX7s6EriydlJj22jLCTSw m0Yw4qlYg8i94RMzY/pZIjZ+DZVVRbNLJ2Fe2Bbr2RXiJ+3aIkwqR9i15zA/78TljNOQ lcHW3YFdfebEgq4id+JDcfe51saD2e15jwwalVR+GjO+my/XYqTqt/SRDpPK0JF3gh4u Cg5A== X-Gm-Message-State: ACgBeo04N6DsDMLFDqvMMQl1Ll//S/tUYNrDjQx3iI7BkFnu+y4UCrEj +h4kLIP56y0EyZ0uFWQtzCwtEqLgsKNVq6PD5iQ= X-Google-Smtp-Source: AA6agR7UwuoE5Ndp/UwcNShHt7e44aPftwNBMplzTfzM/AxfxmmtJkc52PKAwGBaqfebQlf/+xEIWdWCD2mQUz+hw/Y= X-Received: by 2002:a63:2d1:0:b0:41d:9a9e:f2ae with SMTP id 200-20020a6302d1000000b0041d9a9ef2aemr5548880pgc.488.1660040436164; Tue, 09 Aug 2022 03:20:36 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=owinebar@gmail.com; helo=mail-pg1-x532.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.devel:293295 Archived-At: --00000000000082afca05e5cc482b Content-Type: text/plain; charset="UTF-8" On Tue, Aug 9, 2022, 5:22 AM Andrea Corallo wrote: > Andrea Corallo writes: > > [...] > > > Just had some time to look into this further: > > > > Of all the CUs we are dumping two are not fixed-up in loadup.el before > > dump because not referenced by any function. > > > > In particular looking at 'ediff-hook' it does contain only variable > > definitions so this is correct. > > > > We do run a GC before dumping so we should unload these unreferenced CUs > > before dump. And as expected I don't see ediff-hook CU being marked but > > we do not free it during sweep. > > > > It looks to me like a GC bug so far. Unfortunatly I've very constrained > > time to dedicate on this this week. > > Thinking about this... Maybe relying on the GC for this is not a very > good idea in the first place. If we are conservative on the stack my > might always mark a CU accidentally and fall into the same issue. > > I think we should maintain a list of all loaded CUs so we can fix them > up reliably. If this is agreed not to be a bad idea I'll prepare a > patch. Just a heads up - when I was validating what was failing while dumping, I tried printing the comp units before and after they were fixed up. When the comp unit has a cons cell in the name field, princ segfaults (at least in 28.1). I didn't report this as a bug because it would be very unusual for a user to have access to comp units in this state. Lynn > --00000000000082afca05e5cc482b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Aug 9, 2022, 5:22 AM Andrea Corallo <akrl@sdf.org> wrote:
Andrea Corallo <akrl@sdf.org> writes:

[...]

> Just had some time to look into this further:
>
> Of all the CUs we are dumping two are not fixed-up in loadup.el before=
> dump because not referenced by any function.
>
> In particular looking at 'ediff-hook' it does contain only var= iable
> definitions so this is correct.
>
> We do run a GC before dumping so we should unload these unreferenced C= Us
> before dump.=C2=A0 And as expected I don't see ediff-hook CU being= marked but
> we do not free it during sweep.
>
> It looks to me like a GC bug so far.=C2=A0 Unfortunatly I've very = constrained
> time to dedicate on this this week.

Thinking about this... Maybe relying on the GC for this is not a very
good idea in the first place.=C2=A0 If we are conservative on the stack my<= br> might always mark a CU accidentally and fall into the same issue.

I think we should maintain a list of all loaded CUs so we can fix them
up reliably.=C2=A0 If this is agreed not to be a bad idea I'll prepare = a
patch.

Just a heads up - when I was validating what was failing while dumping, I= tried printing the comp units before and after they were fixed up.=C2=A0 W= hen the comp unit has a cons cell in the name field, princ segfaults (at le= ast in 28.1).
I didn't report this as a bug beca= use it would be very unusual for a user to have access to comp units in thi= s state.

Lynn





=C2=A0
--00000000000082afca05e5cc482b--