From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#68690: Segmentation fault building with native-comp Date: Fri, 26 Jan 2024 17:07:15 +0100 Message-ID: <290E2D8C-E0FA-479C-A79C-6651587B965D@gmail.com> References: Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9985"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gerd =?UTF-8?Q?M=C3=B6llmann?= , Eli Zaretskii , jm@pub.pink, 68690@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 26 17:08:26 2024 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 1rTOkj-0002O0-Cr for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Jan 2024 17:08:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTOkH-0003ss-Fr; Fri, 26 Jan 2024 11:07:57 -0500 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 1rTOkG-0003sh-CM for bug-gnu-emacs@gnu.org; Fri, 26 Jan 2024 11:07:56 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTOkG-0006db-3H for bug-gnu-emacs@gnu.org; Fri, 26 Jan 2024 11:07:56 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rTOkM-0002Gm-2i for bug-gnu-emacs@gnu.org; Fri, 26 Jan 2024 11:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Jan 2024 16:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68690 X-GNU-PR-Package: emacs Original-Received: via spool by 68690-submit@debbugs.gnu.org id=B68690.17062852538544 (code B ref 68690); Fri, 26 Jan 2024 16:08:02 +0000 Original-Received: (at 68690) by debbugs.gnu.org; 26 Jan 2024 16:07:33 +0000 Original-Received: from localhost ([127.0.0.1]:52498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTOjt-0002Dk-Ak for submit@debbugs.gnu.org; Fri, 26 Jan 2024 11:07:33 -0500 Original-Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:48224) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTOjq-0002DU-Bu for 68690@debbugs.gnu.org; Fri, 26 Jan 2024 11:07:31 -0500 Original-Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-5100ed2b33dso1303028e87.0 for <68690@debbugs.gnu.org>; Fri, 26 Jan 2024 08:07:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706285238; x=1706890038; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=oK+Tp20/aStRnxNuHSLwK+CinIJQxjKdEXDCRBmdMNw=; b=efuakYurVDuoLcpUwKPbi6rcq8+E+Zgz2cJwjNeawQWKn0jsDga1Wnxqy5iPhx9lr6 wZux2mlnn/cWrYtuz1C/ylDBio1iUo/xyUU8aw8J2ovRjsxpv3b+I0CrNmmBFcLJb/h9 Y/Bs0C/N1oW8OckTzgNHvnD607NBnie8Y6KpvsGL0qbG0eVeB0nraq3VFewGlkiuL/ea BUmXToIHxwM2i4sPQQsVUqtErooJ+c7mIkkVmCBeKjxmSCmTZKIeOYmVKl8zgbW6UEYq dIrV3cT5OsJJgFM3Rbbjkp9wFG+PWY6kW9qcZAhOIcBHWxiFHi59Xt4WfFFQXkH62OIf my5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706285238; x=1706890038; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=oK+Tp20/aStRnxNuHSLwK+CinIJQxjKdEXDCRBmdMNw=; b=QMc0LSk6kBpzWL66vX3gGNHS+1B6QNwFMtA5yIvphemg7lNb1VeXlncpQkGYrJHs9k UnOFf8ciY7jUIrvrOMrqrVoqHsdmy6W/8RBwwcQFOoVEgL4YXYlzXCOk0v9sHnQUD+g5 evhfSbc9/1e25+71wsmR4zTPTb6qeWAR9HkLzx72V53ROWCQxqmvo1dyLqVbzRf3U6Vi woUKg3ASDojVvn7cDwV6qGMJ/z+3GkWRLxKAYl7XGoVQ22JjISI79BD5UD151vbsq7GO +NusbhitBdQgmJ6Fd13lZVcdiGk1BhW7WqTsCTVCm7SD8U7jCOR2crc/biDEIRmy74RK tyxQ== X-Gm-Message-State: AOJu0YxVpheoVu2IjE7NfxZUkq/8kKnkFicetZ7jC9EmMv0pVvplO/fT blYrVruMlHzJI5pdj938x35UJfKlKtZw9kYKFAEuUCpGD/7QRUey X-Google-Smtp-Source: AGHT+IGqG7PKlOeLa7Gmhn/sK+xU4qsbaShzZxJntbDQF43Hi+mP0LYFZpTHjFNQS1b0sCHGWAWn1A== X-Received: by 2002:ac2:47f7:0:b0:50e:db6c:f014 with SMTP id b23-20020ac247f7000000b0050edb6cf014mr768441lfp.48.1706285237445; Fri, 26 Jan 2024 08:07:17 -0800 (PST) Original-Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id c9-20020ac25f69000000b005101772e298sm214935lfc.19.2024.01.26.08.07.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jan 2024 08:07:16 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.15) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:278938 Archived-At: 25 jan. 2024 kl. 23.39 skrev Stefan Monnier : > AFAIK the current DOHASH code in `master` works fine (tho a bit ugly). I think it's less good (and more complex) than not trying to cache = anything at all where the compiler actually will help out a bit, and = it's slower than the fast caching version. > The build failure didn't come via maphash` but via the DOHASH in > `comp.c` that calls `compile_function` (which apparently can cause the > hash table to be resized). Do you know which one? It's quite possible that that code wasn't written = taking into account the problems of extending the table being iterated = over. We should definitely ask Andrea. Meanwhile, I suggest adding a DOHASH_SAFE (simple, safe) to be used in = these cases, including Fmaphash, and use the (someone less simple, fast) = DOHASH in my previous patch with an extra assertion to catch mistakes = elsewhere in checking builds.