From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#36447: 27.0.50; New "Unknown keyword" errors Date: Fri, 5 Jul 2019 13:41:41 +0000 Message-ID: References: <875zon7x0a.fsf@web.de> <8336jqgbhp.fsf@gnu.org> <87h886eoke.fsf@web.de> <87d0iu54d1.fsf@gmail.com> <87k1d14djr.fsf@web.de> <87h884fo0i.fsf@web.de> <85d0is5ry1.fsf@gmail.com> <87lfxdgs1k.fsf@web.de> <83y31capj1.fsf@gnu.org> <83tvc0anwi.fsf@gnu.org> <83r274an61.fsf@gnu.org> <83pnmoacft.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="76817"; mail-complaints-to="usenet@blaine.gmane.org" Cc: michael_heerdegen@web.de, npostavs@gmail.com, 36447@debbugs.gnu.org, Stefan Monnier To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 05 15:51:33 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hjOce-000JsX-TD for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jul 2019 15:51:33 +0200 Original-Received: from localhost ([::1]:53354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjOcd-0004Zl-V8 for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jul 2019 09:51:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40971) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjOUT-00086q-Pv for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2019 09:43:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjOUR-0000QC-KO for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2019 09:43:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43712) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hjOUR-0000Od-DR for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2019 09:43:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hjOUQ-0001Zn-8t for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2019 09:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Jul 2019 13:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36447 X-GNU-PR-Package: emacs Original-Received: via spool by 36447-submit@debbugs.gnu.org id=B36447.15623341496009 (code B ref 36447); Fri, 05 Jul 2019 13:43:02 +0000 Original-Received: (at 36447) by debbugs.gnu.org; 5 Jul 2019 13:42:29 +0000 Original-Received: from localhost ([127.0.0.1]:52532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjOTs-0001Yq-EQ for submit@debbugs.gnu.org; Fri, 05 Jul 2019 09:42:28 -0400 Original-Received: from mail-oi1-f173.google.com ([209.85.167.173]:42868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjOTq-0001YY-KH for 36447@debbugs.gnu.org; Fri, 05 Jul 2019 09:42:26 -0400 Original-Received: by mail-oi1-f173.google.com with SMTP id s184so7157019oie.9 for <36447@debbugs.gnu.org>; Fri, 05 Jul 2019 06:42:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=iADfrFIDixmxtzp9zIWh2oIZ4sC03WobTwGvFxcK9wo=; b=P4hIDH+LeC8RWtWIpTf4+8+kI+dgIIvC+JWXBBHiL6Zr/bfYsj67mNY+yw4EhpfwRv 2mnrynNzwR+8iISp8vGimLtjMDN1/yqW7DzTzJmh6QkLfQ8ZnqFIwTzm7/5ToSrbnr66 2OP6dBTxn1PilUS5NHMA0kic0/qbB2/jWGMm8xP/HeAsTLR0SPUB+OJ1oQdGdLUoiCUe 7dmanlapbfzBSk/lvNArFrnSsdFwdbcg1J4won1JSH7g6T2dOQJMEwQ20wu/vy4TNvvH o+0LYOaeWBMverIDuHma8kHNuPMDS7sRgDUF48FjMTw+oZvQ/6leRF1azqrhccfZ70s2 e5OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=iADfrFIDixmxtzp9zIWh2oIZ4sC03WobTwGvFxcK9wo=; b=lcfnR5uMaqvx2Uq/M4XpMEF6uvEIOyuJ8sMorYQXFnOFiuZ4fwQ/SIO+Ujx6vkaUOB YaSLeJyTQKGlOy1826AJng8DIohMV86sWaNrjzx5kC4rzHzbGLIfrBOaZa2toBqjtRjT HvsUaKAt/uqnRQX9M7zAdCoVAPoUgCDxGs1POUh4ZYrrv/CRR/MLcGuICVQErsxE3Buz N5cdEzKdK2NUQ7VSErtXUiHQ9wdkiXaDVYJv7iOlOb/eJxbbDBs5Q7VUXItbeAeI2RTF O/t+BdrGuGEEAzRX+SugrWttXpmeZ0UlhL7Gd3iRcgOmn9QVb5TiOnS6IdHlvFOAERb8 IMNw== X-Gm-Message-State: APjAAAXtYvvkiIDjrrvpJAxWZ6YPFQgFVPKk0aKSuEVtN68cwlXKnk2V Mg+vtGFyzfjIAyRzjga7jLdOxjTMF+Vy1fCrSE8= X-Google-Smtp-Source: APXvYqzyMmMuiGS3k4yD9CsW0OwdOO2fHOQHg/lfuJhsjslr8APrStDp2O+6jwBksyFojYu1Jgjo1CjZNL3Dk/rkbWI= X-Received: by 2002:aca:4790:: with SMTP id u138mr2178799oia.44.1562334139762; Fri, 05 Jul 2019 06:42:19 -0700 (PDT) In-Reply-To: <83pnmoacft.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162127 Archived-At: On Fri, Jul 5, 2019 at 12:33 PM Eli Zaretskii wrote: > Thanks for the explanations. I'm CC'ing Stefan who knows much more > about this than I do. Thank you. > > The reasons are this: when a hash table is purecopied, its ->next > > vector is purecopied, which merges it with another, similar, hash > > table's ->next vector if purify-flag is a (third) hash table. The > > vectors are compared using `equal', but the pure copies are actually > > `eq'. > > A na=C3=AFve question: wouldn't the problem go away if we modified pureco= py > not to do the above, i.e. not to merge the next vector of a hash table > with that of another? I thought about that, but it's a bit complicated: either we'd keep the ->next vector impure (and make a copy of it), or we would have to add a "don't hash-cons" argument to purecopy(), which kind of defeats the purpose. > > The (disappointingly trivial) fix: > > call copy-sequence on h->next before rehashing the table. > > Rehashing is not only done during dumping, right? As far as I can tell, it's only done when first accessing a dumped hash table, but I might be wrong. (In any case, it seems `hash-table-count' then returns a negative value for the hash table, which seems problematic to me.) > So the fix you > propose also makes rehashing slightly less efficient. Is that > necessary, i.e. are you saying that the bug is in rehashing, not in > purecopy? Again, I may be wrong, since we're using the sign of h->count to indicate whether a hash table needs rehashing and that's hard to grep for, but I think this only affects rehashing after dump, not rehashing when resizing a hash table. It's certainly not called very often, and not for very large hash tables.