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.bugs Subject: bug#68244: hash-table improvements Date: Mon, 15 Jan 2024 22:21:52 +0200 Message-ID: <83o7dmcppb.fsf@gnu.org> References: <170438379722.3921.9312235725296561206@vcs2.savannah.gnu.org> <20240104155642.B4A99C00344@vcs2.savannah.gnu.org> <8d49ebdc-9da7-4e70-a080-d8e892b980b6@gutov.dev> <08314177-5AE9-4352-94A0-641830B4094D@gmail.com> <19265EA5-E6F3-446C-AD9B-763693CF0A48@gmail.com> <86cyu37elt.fsf@gmail.com> <83h6jeeq1z.fsf@gnu.org> <86r0iiv013.fsf@gmail.com> 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="37976"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68244@debbugs.gnu.org To: Andy Moreton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 15 21:23:19 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 1rPTUN-0009iO-4f for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Jan 2024 21:23:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rPTUC-0002cG-O6; Mon, 15 Jan 2024 15:23:08 -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 1rPTU8-0002bW-I6 for bug-gnu-emacs@gnu.org; Mon, 15 Jan 2024 15:23:04 -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 1rPTU5-0000Xn-Qb for bug-gnu-emacs@gnu.org; Mon, 15 Jan 2024 15:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rPTU5-0001ja-OC for bug-gnu-emacs@gnu.org; Mon, 15 Jan 2024 15:23:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Jan 2024 20:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68244 X-GNU-PR-Package: emacs Original-Received: via spool by 68244-submit@debbugs.gnu.org id=B68244.17053501546620 (code B ref 68244); Mon, 15 Jan 2024 20:23:01 +0000 Original-Received: (at 68244) by debbugs.gnu.org; 15 Jan 2024 20:22:34 +0000 Original-Received: from localhost ([127.0.0.1]:47094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPTTd-0001ii-Tp for submit@debbugs.gnu.org; Mon, 15 Jan 2024 15:22:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPTTc-0001iV-GI for 68244@debbugs.gnu.org; Mon, 15 Jan 2024 15:22:33 -0500 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 1rPTTX-0000Rp-6B; Mon, 15 Jan 2024 15:22:27 -0500 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=y25AJR+OQ6j3sMvS89YvNOIU6yX7cKMXH2MLTSHB1c8=; b=EfCuO3sMUNZmajoI1e4P f27NBzGF7Uv2FMnhwvidJpImXFCYXJqR135fxFCT3HOp2aJ0xy6fgscagM/qYzcLAy6dyU8B0I1M8 XFjXyPOjKtvNenolFaEJFXH5NOxZchLdaA42d+LxTtX7skQTUq6vq+iu5jO0VVDX3I3abLZKSjMfm o+5ptkQQLflQChj/pXM5OfCqSd4uzGBnRyRb5Yu7AxrQXMWNF+eIfAVU89HlovLJaShStlEI4itoF EcH8imVDBa48UqMI1vjGFaPbFfAHLMLphqJJhwu/XF7ZI6n6NBUBVJSh5ZBr2i+4jpaaOipZBoupF zsco9MGFzATTnw==; In-Reply-To: <86r0iiv013.fsf@gmail.com> (message from Andy Moreton on Mon, 15 Jan 2024 20:01:28 +0000) 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:278303 Archived-At: > From: Andy Moreton > Date: Mon, 15 Jan 2024 20:01:28 +0000 > > On Mon 15 Jan 2024, Eli Zaretskii wrote: > > >> From: Andy Moreton > >> Date: Sun, 14 Jan 2024 22:08:14 +0000 > >> > >> On Sat 13 Jan 2024, Mattias Engdegård wrote: > >> > >> > All right, I've pushed the parts that I have little doubt about being a > >> > definite improvement: a batch of refactoring steps, then the hash-table > >> > printing reforms, the representation and growth algorithm improvements, and > >> > finally documentation updates, all now on master. > >> > >> Something in this patch series causes a build failure on Windows using > >> the Mingw64 toolchain. I've tried bisecting this, and at each step doing > >> "git clean -xdf" and then autogen, configure and make for a native build. > >> > >> The last good commit on master is: > >> c3d0cc50faf5 ("Remove rehash-threshold and rehash-size struct members") > >> > >> Bisect identifies this as the bad commit: > >> d3cefd3e9835 ("Leaner hash table dumping and thawing") > >> > >> I have included the end of the log from the failing build below. > >> > >> AndyM > >> > >> -----o0o----- > >> > >> cp -f temacs.exe bootstrap-emacs.exe > >> rm -f bootstrap-emacs.pdmp > >> ./temacs --batch -l loadup --temacs=pbootstrap \ > >> --bin-dest c:/emacs/30.0.50/mingw64-x86_64-O2-native/bin/ --eln-dest c:/emacs/30.0.50/mingw64-x86_64-O2-native/lib/emacs/30.0.50/ > >> Loading loadup.el (source)... > >> Dump mode: pbootstrap > >> Using load-path (c:/emacs/git/emacs/master/lisp c:/emacs/git/emacs/master/lisp/emacs-lisp c:/emacs/git/emacs/master/lisp/progmodes c:/emacs/git/emacs/master/lisp/language c:/emacs/git/emacs/master/lisp/international c:/emacs/git/emacs/master/lisp/textmodes c:/emacs/git/emacs/master/lisp/vc) > >> Loading emacs-lisp/debug-early (source)... > >> > >> ...[snipped]... > >> > >> Loading c:/emacs/git/emacs/master/lisp/emacs-lisp/rmc.el (source)... > >> Finding pointers to doc strings... > >> Finding pointers to doc strings...done > >> Dumping under the name bootstrap-emacs.pdmp > >> Dumping fingerprint: 9f59e49a3ba95f3d7451327de9cf2863b9ddb392220c5f88f384f16245a619c2 > >> Dump complete > >> Byte counts: header=100 hot=16147196 discardable=207320 cold=11360080 > >> Reloc counts: hot=1123689 discardable=5662 > >> ANCIENT=yes make -C ../lisp compile-first EMACS="../src/bootstrap-emacs.exe" > >> make[3]: Entering directory '/c/emacs/git/emacs/master/build/mingw64-x86_64-O2-native/lisp' > >> ELC /c/emacs/git/emacs/master/lisp/emacs-lisp/macroexp.elc > >> > >> C:/emacs/git/emacs/master/src/lisp.h:2564: Emacs fatal error: assertion failed: 0 < size > > > > Thanks, but I see no assertion 0 < size on line 2564 of lisp.h, or > > anywhere else in lisp.h. Can you tell which assertion fails? > > In commit d3cefd3e9835, line 2564 of lisp.h has "eassume (0 < size);" in > HASH_TABLE_SIZE(). > > If the hash table changes now allow zero sized tables then that would > trigger in a build with ENABLE_CHECKING. My build script had checking > enabled, which would explain the failure. Sorry for not mentioning that > earlier (I had forgotten that it was enabled). > > With ENABLE_CHECKING disabled the build succeeds. Thus the invariants > need looking at to allow a checked build to work. I always build with ENABLE_CHECKING, so I still don't understand why I don't see the problem. Can you suggest a way that avoids a full bootstrap, but just compiles a (small) bunch of Lisp files?