]> git.eshelyaron.com Git - emacs.git/commit
Only use a hash index size of 1 for tables with size 0 (bug#68244)
authorMattias EngdegÄrd <mattiase@acm.org>
Thu, 18 Jan 2024 17:45:16 +0000 (18:45 +0100)
committerEshel Yaron <me@eshelyaron.com>
Fri, 19 Jan 2024 06:57:45 +0000 (07:57 +0100)
commitc3432d3f613f86e3c43c9ba1a6032190674e33da
tree6e18c2e3f4ac4163d114a232bc65f3435164063a
parent6721a7483140024b44fab85c8f4c9aadf0d26c12
Only use a hash index size of 1 for tables with size 0 (bug#68244)

This invariant was intended but insufficiently enforced which could
lead to an assertion failure.

* src/fns.c (hash_index_size): Assume size>0, and return a value >1.
(make_hash_table): Only use hash_index_size for size>0.

(cherry picked from commit ef01250ef9c22aa1ac2ecff3136aabf79b2a677b)
src/fns.c