From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: Building the igc branch on MS-Windows Date: Thu, 25 Apr 2024 13:55:53 +0200 Message-ID: References: <86il063imh.fsf@gnu.org> <87ttjqghyd.fsf@gmail.com> <86zfti101u.fsf@gnu.org> <87pluegd4z.fsf@gmail.com> <86ttjp20je.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20586"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: eller.helmut@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 25 13:57:00 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 1rzxim-00055K-B0 for ged-emacs-devel@m.gmane-mx.org; Thu, 25 Apr 2024 13:57:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzxhs-0000Q7-La; Thu, 25 Apr 2024 07:56:04 -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 1rzxhq-0000PO-Cj for emacs-devel@gnu.org; Thu, 25 Apr 2024 07:56:02 -0400 Original-Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzxhl-0005Oj-Uy; Thu, 25 Apr 2024 07:56:02 -0400 Original-Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-56e1f3462caso1175673a12.3; Thu, 25 Apr 2024 04:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714046155; x=1714650955; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6hOgnSemSQQ7x6sGaAeu4fkoACUsVPE9+4waRCLvZgo=; b=lC9nIcgmMEkCy1DQ8U7xs/9ZIv1UNRO93Nsoq0Yc6bQ+IqzV5py0R2Hqri9n19u9oo Y/fH71cYIgDT0KQW3TPuebnlI6Y2jG2m5BYQrYEB5zGqq2dozCLKhBc9yqONSXzYXS2F G2ZK6KbUYBnp8Oqu0uhKcSUk6A7uq1RuOTASOriMWaTTPl/h8/YLCDy6XWKqoHUDPhsZ QTO3sOsbN5M7y8Eg2aPfcAsv8k9iHmdsJAXfbg4tgf7YdV4RbXZ6cJA07amUMCIXUxF8 cV2+/k6xd8vUBna1/eeG2dgR+qK0bUG2eQbzqSmoAGcSPxTLBWem3WPNrCmzxNE18xeR 5Qvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714046155; x=1714650955; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=6hOgnSemSQQ7x6sGaAeu4fkoACUsVPE9+4waRCLvZgo=; b=RN6Gs2TWe20YnUrIhjhbl5e9ZUANwnLRv+cUZ1wz7Y2xcozJ399vmksyiBjZeTMKlA wMLhfQfVxITwjcb6rMFPCHNVJx4VYdiwOMQIFXMbVm9dpDSTlj5LFTVrOApeOzzLms0x FLBNRcpL80E31RUueQbKL6yYgJjcwCIWihEpG5mehQTCN/3znaOUB8fP5aNIT1bzRWSl REN6FNdF8pur606gW9joh9T59J4VlDq4nlVdkgJemyTAeWD7i+JK+jWECyIM0ceD2sET +iz0awhaSQABsenMOhoah/br+fOx10PssilXppqkyqXSwBPeIaB7FUdD7sJyJTvjtIsv /Scw== X-Forwarded-Encrypted: i=1; AJvYcCUAtwoJC2YuQTGahjpLOaKdIsXysCaDqlU7cn4f2v0qbc6/pJsFXbVfMpB1l09zIZM+pLzSPzHuiWDJDunYA8Ykqnja X-Gm-Message-State: AOJu0YwO+u4L7PvWXi3DQLEjyeA349ZAnQFEZ4Q5Xn9KrteLg4T06s7i QNn3gUj2w78PwJw68GCzy96zMtbsZDXNQJDAjAXhzqrQcJ8xOMjWKPRMGg== X-Google-Smtp-Source: AGHT+IHJrEroxQyFWSWY7PlH/8ZVFf60ROwAIXQKI7Elaq/1khXLz4MYKBvSdGRb8XBMuE5uJxlFXQ== X-Received: by 2002:a17:906:830a:b0:a55:664b:fa35 with SMTP id j10-20020a170906830a00b00a55664bfa35mr3957647ejx.6.1714046155283; Thu, 25 Apr 2024 04:55:55 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a1c7.dip0.t-ipconnect.de. [79.227.161.199]) by smtp.gmail.com with ESMTPSA id m24-20020a17090607d800b00a524216fe78sm9481178ejc.64.2024.04.25.04.55.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 04:55:54 -0700 (PDT) In-Reply-To: <86ttjp20je.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 25 Apr 2024 13:34:45 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x52b.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: 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:318074 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: Eli Zaretskii , emacs-devel@gnu.org >> Date: Thu, 25 Apr 2024 09:39:45 +0200 >>=20 >> Helmut Eller writes: >>=20 >> The to_bytes function looks suspisious. Here it helps to change it to: >> > >> > static mps_word_t >> > to_bytes (mps_word_t nwords) >> > { >> > - return nwords << 3; >> > + return nwords * sizeof (mps_word_t); >> > } >>=20 >> Oops=20 > > I installed that, since it unbreaks the build: all the Lisp files are > now compiled successfully, and the build runs to completion. Great! > The resulting Emacs starts up, but then crashes due to some problem > with Lisp strings. I show below two backtraces from two crashes, they > are different, but in both cases the crash is because the contents of > what is supposed to be a 'struct Lisp string" appears to be garbled. > In both cases, the recipe is simple: > > emacs -Q > C-x C-f src/xdisp.c RET > Lean on C-v to scroll through the buffer Not too bad that it starts at all :-). I didn't do much to ensure that works so far. > Sometimes the crash happens only after I release C-v, wait for a few > seconds, then lean on C-v again; not sure if this is relevant or just > a coincidence. Yeah there a probably a number of data structures containing Lisp_Objects and alike in the GUI code that are currently not traced. Twice so if they don't exist on macOS. > Here are the two backtraces. Note that "xbacktrace" also reports a > bad address, which probably means some significant issue with Lisp > strings in general(??). > > Could be some alignment problem? MPS seems to use alignment of 4 on > 32-bit platforms, but AFAIR Emacs wants alignment of 8 for Lisp > objects? The alignment of MPS objects is specified around line 2761 in igc.c MPS_ARGS_ADD (args, MPS_KEY_FMT_ALIGN, IGC_ALIGN); IGC_ALIGN =3D=3D GCALIGNMENT at present, which is 8 for me (USE_LSB_TAG). > > Backtrace #1: > Backtrace #2: No idea at the moment, but we should make sure to trace everything reachable in a GUI frames first. Before that's done, it's basically guaranteed to crash at soem point.