From: Chong Yidong <cyd@stupidchicken.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Tool-bar changes
Date: Wed, 14 May 2008 15:30:50 -0400 [thread overview]
Message-ID: <87lk2cisyd.fsf@stupidchicken.com> (raw)
In-Reply-To: <jwvfxsl8pg3.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 14 May 2008 00:47:28 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Looks like some of the lists in there have been garbage-collected. This
>> is probably a GC bug. Does the GC code know not to reap lists that are
>> stored in hash tables?
>
> Hmm... I'll take a look at it. The hash-table is marked as weak
> specifically so that those can be GC'd (whether it's a good idea or
> not, I don't know), but if they're GC'd then they should be removed
> from the hash-table as well.
It appears that the C variable weak_hash_tables, which points to a
linked list of weak hash tables, is 0x0. I added the following debug
code to fns.c:
*** trunk/src/fns.c.~1.443.~ 2008-05-14 12:41:03.000000000 -0400
--- trunk/src/fns.c 2008-05-14 15:24:08.000000000 -0400
***************
*** 4770,4776 ****
(table)
Lisp_Object table;
{
! return check_hash_table (table)->weak;
}
--- 4770,4792 ----
(table)
Lisp_Object table;
{
! Lisp_Object weak = check_hash_table (table)->weak;
! struct Lisp_Hash_Table *hash = XHASH_TABLE (table);
! if (!NILP (weak))
! {
! int found = 0;
! struct Lisp_Hash_Table *h;
!
! for (h = weak_hash_tables; h; h = h->next_weak)
! {
! if (h == hash)
! found = 1;
! }
! if (found == 0)
! abort();
! }
!
! return weak;
}
Then, doing M-: (hash-table-weakness tool-bar-find-image-cache) RET
leads to an abort, with the following backtrace:
#0 abort () at emacs.c:428
#1 0x081720b6 in Fhash_table_weakness (table=144383500) at fns.c:4786
#2 0x0816bea7 in Feval (form=147691741) at eval.c:2361
#3 0x0816c9cf in Ffuncall (nargs=2, args=0xbfc7ea50) at eval.c:3030
...
(gdb) p weak_hash_tables
$1 = (struct Lisp_Hash_Table *) 0x0
(gdb) f 1
#1 0x081720b6 in Fhash_table_weakness (table=144383500) at fns.c:4786
4786 abort();
(gdb) p hash
$2 = (struct Lisp_Hash_Table *) 0x89b1e08
(gdb) p hash->weak
$3 = 137839209
(gdb) xsymbol
$4 = (struct Lisp_Symbol *) 0x8374268
"key-and-value"
I noticed that sweep_weak_hash_tables() removes empty weak hash tables
from the linked list pointed to by weak_hash_tables. This may be
related to the bug.
next prev parent reply other threads:[~2008-05-14 19:30 UTC|newest]
Thread overview: 110+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-01 9:48 Next release Nick Roberts
2008-05-01 10:32 ` Jason Rumney
2008-05-01 23:07 ` Nick Roberts
2008-05-02 0:04 ` Jason Rumney
2008-05-01 17:43 ` Glenn Morris
2008-05-01 19:52 ` David Kastrup
2008-05-01 20:30 ` Chong Yidong
2008-05-02 1:00 ` Glenn Morris
2008-05-02 6:48 ` CHENG Gao
2008-05-03 1:00 ` Bob
2008-05-03 8:09 ` Richard M Stallman
2008-05-03 9:22 ` CHENG Gao
2008-05-03 9:49 ` YAMAMOTO Mitsuharu
2008-05-03 18:59 ` Stefan Monnier
2008-05-03 19:08 ` Glenn Morris
2008-05-03 21:42 ` Stefan Monnier
2008-05-04 9:37 ` Richard M Stallman
2008-05-04 9:37 ` Richard M Stallman
2008-05-06 0:38 ` YAMAMOTO Mitsuharu
2008-05-23 20:18 ` Problems preloading x-win.el (was: Next release) Stefan Monnier
2008-05-23 21:54 ` Dan Nicolaescu
2008-05-24 2:22 ` Problems preloading x-win.el Stefan Monnier
2008-05-24 3:19 ` Problems preloading x-win.el (was: Next release) YAMAMOTO Mitsuharu
2008-05-02 13:31 ` Next release Dan Nicolaescu
2008-05-02 13:52 ` Jason Rumney
2008-05-02 15:24 ` YAMAMOTO Mitsuharu
2008-05-02 16:10 ` Dan Nicolaescu
2008-05-03 9:38 ` YAMAMOTO Mitsuharu
2008-05-03 19:05 ` Stefan Monnier
2008-05-04 0:56 ` Dan Nicolaescu
2008-05-04 1:25 ` YAMAMOTO Mitsuharu
2008-05-04 1:40 ` Stefan Monnier
2008-05-04 1:57 ` YAMAMOTO Mitsuharu
2008-05-04 3:21 ` Stefan Monnier
2008-05-04 5:07 ` YAMAMOTO Mitsuharu
2008-05-04 15:52 ` Stefan Monnier
2008-05-05 1:28 ` YAMAMOTO Mitsuharu
2008-05-05 5:48 ` Stefan Monnier
2008-05-04 21:35 ` Chong Yidong
2008-05-04 23:52 ` YAMAMOTO Mitsuharu
2008-05-05 0:56 ` Stefan Monnier
2008-05-05 7:43 ` Juanma Barranquero
2008-05-07 18:28 ` Stefan Monnier
2008-05-07 19:13 ` Eli Zaretskii
2008-05-08 1:26 ` Stefan Monnier
2008-05-08 8:22 ` Jason Rumney
2008-05-08 8:32 ` David Kastrup
2008-05-08 9:04 ` David Reitter
2008-05-08 10:40 ` Jan Djärv
2008-05-08 10:55 ` Miles Bader
2008-05-10 8:55 ` Richard M Stallman
2008-05-10 20:30 ` David Kastrup
2008-05-10 23:53 ` David Reitter
2008-05-08 9:06 ` Miles Bader
2008-05-08 9:22 ` Jason Rumney
2008-05-08 9:35 ` Miles Bader
2008-05-08 9:44 ` David Kastrup
2008-05-08 19:47 ` Stephen J. Turnbull
2008-05-08 20:56 ` David Kastrup
2008-05-09 0:52 ` Stefan Monnier
2008-05-09 1:04 ` Miles Bader
2008-05-09 6:07 ` Tassilo Horn
2008-05-09 7:02 ` Eli Zaretskii
2008-05-08 9:51 ` Jason Rumney
2008-05-08 10:08 ` David Kastrup
2008-05-08 10:16 ` Eli Zaretskii
2008-05-08 10:36 ` David Kastrup
2008-05-09 23:54 ` Juri Linkov
2008-05-08 9:45 ` David Kastrup
2008-05-08 10:04 ` Eli Zaretskii
2008-05-08 13:51 ` Stefan Monnier
2008-05-08 13:57 ` Juanma Barranquero
2008-05-08 14:50 ` Miles Bader
2008-05-09 11:12 ` Richard M Stallman
2008-05-08 9:32 ` Eli Zaretskii
2008-05-08 13:46 ` Stefan Monnier
2008-05-08 2:34 ` Juanma Barranquero
2008-05-09 1:35 ` Tool-bar changes (Was: Next release) Chong Yidong
2008-05-09 3:25 ` Tool-bar changes Stefan Monnier
2008-05-09 5:53 ` Tassilo Horn
2008-05-13 18:07 ` Chong Yidong
2008-05-13 18:19 ` Stefan Monnier
2008-05-13 18:38 ` David Reitter
2008-05-13 19:06 ` Eli Zaretskii
2008-05-14 2:17 ` Chong Yidong
2008-05-14 4:28 ` Chong Yidong
2008-05-14 4:47 ` Stefan Monnier
2008-05-14 19:30 ` Chong Yidong [this message]
2008-05-14 20:50 ` Chong Yidong
2008-05-15 1:10 ` Stefan Monnier
2008-05-06 0:40 ` Next release YAMAMOTO Mitsuharu
2008-05-04 21:23 ` Chong Yidong
2008-05-05 0:44 ` YAMAMOTO Mitsuharu
2008-05-04 2:06 ` Dan Nicolaescu
2008-05-04 4:21 ` Eli Zaretskii
2008-05-04 6:58 ` Dan Nicolaescu
2008-05-04 8:15 ` David Kastrup
2008-05-04 18:17 ` Eli Zaretskii
2008-05-04 18:59 ` Dan Nicolaescu
2008-05-04 20:31 ` Thomas Lord
2008-05-04 7:36 ` David Kastrup
2008-05-04 16:00 ` Stefan Monnier
2008-05-04 14:34 ` Jason Rumney
2008-05-02 21:13 ` Richard M Stallman
2008-05-02 21:32 ` Chong Yidong
2008-05-03 0:11 ` Glenn Morris
2008-05-03 14:49 ` Chong Yidong
2008-05-03 17:02 ` Alex
2008-05-03 21:00 ` Richard M Stallman
2008-05-04 3:53 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lk2cisyd.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.