From: Jim Meyering <jim@meyering.net>
Cc: emacs-devel@gnu.org
Subject: Re: editfns.c (Fformat): fix for segfault
Date: Sat, 03 May 2003 16:10:47 +0200 [thread overview]
Message-ID: <85n0i4yvbs.fsf@pi.meyering.net> (raw)
In-Reply-To: <E19AICm-0005Qs-00@fencepost.gnu.org> (Richard Stallman's message of "Mon, 28 Apr 2003 19:38:40 -0400")
Richard Stallman <rms@gnu.org> wrote:
> The only way that the value of format should be so different
> from format_start, and yet with the same text, is if
> there was a GC and it moved the string.
>
> I don't see what could possibly have caused a GC there.
> It would have to be something that calls eval.
>
> If it was really due to a GC, I have doubts that this change is
> enough, because the old location of the string could get overwritten
> with some other string. Perhaps it will happen just a minority of the
> time, but it can happen.
>
> I added a facility to make Emacs abort if it GCs in the middle
> of that code. That way we will really get to the bottom of this.
>
> This is my analysis. In the first scan, Fchar_to_string or
> Fprint1_to_string are called, and they will relocate a data
> of a Lisp string (in the current case, args[0]).
>
> How can either of these functions cause a GC?
Using emacs checked out and built this morning along
with Oort gnus 0.20, that new abort was triggered.
Do you need any more information than the following?
(gdb) r
Starting program: /t/emacs/src/emacs -f gnus-no-server
Program received signal SIGABRT, Aborted.
0x402e2a41 in kill () from /lib/libc.so.6
(gdb) xbacktrace
"format"
"nnmail-generate-active"
"nnmail-save-active"
"nnmail-get-new-mail"
"nnml-request-scan"
"gnus-request-scan"
"gnus-activate-group"
"gnus-get-unread-articles"
"gnus-group-get-new-news"
"call-interactively"
(gdb) w
#0 0x402e2a41 in kill () from /lib/libc.so.6
#1 0x080fefdd in abort () at /mirror/d/emacs/src/emacs.c:412
#2 0x0815f135 in Fgarbage_collect () at /mirror/d/emacs/src/alloc.c:4103
#3 0x08179a9e in Ffuncall (nargs=3, args=0xbfffd910)
at /mirror/d/emacs/src/eval.c:2664
#4 0x081798a6 in run_hook_list_with_args (funlist=1490478012, nargs=3,
args=0xbfffd910) at /mirror/d/emacs/src/eval.c:2446
#5 0x0812ad24 in signal_before_change (start_int=1, end_int=1,
preserve_ptr=0x0) at /mirror/d/emacs/src/insdel.c:2058
#6 0x0812aa5a in prepare_to_modify_buffer (start=1, end=1, preserve_ptr=0x0)
at /mirror/d/emacs/src/insdel.c:1956
#7 0x081286f8 in insert_1_both (
string=0x9271ba0 "u\\.seq<@eailebsdÌ=ø\bÀc\0378¬\e'\tÀc\0378´\e'\tÀc\0378¼\e'
\tÀc\0378Ä\e'\tÀc\0378Ì\e'\tÀc\0378Ô\e'\tÀc\0378Ü\e'\tÀc\0378ä\e'\tÀc\0378ì\e'\tÀ
c\0378ô\e'\tÀc\0378ü\e'\tÀc\0378\004\034'\tÀc\0378\f\034'\tÀc\0378\024\034'\tÀc\0
378\034\034'\tÀc\0378$\034'\tÀc\0378,\034'\tÀc\03784\034'\tÀc\0378<\034'\tÀc\0378
D\034'\tÀc\0378L\034'\tÀc\0378T\034'\tÀc\0378"..., nchars=6, nbytes=6,
inherit=0, prepare=1, before_markers=0) at /mirror/d/emacs/src/insdel.c:1001
#8 0x0818c010 in Fprin1_to_string (object=411432292, noescape=405896804)
at /mirror/d/emacs/src/print.c:775
#9 0x08171690 in Fformat (nargs=4, args=0xbfffdc24)
at /mirror/d/emacs/src/editfns.c:3353
#10 0x08179c3c in Ffuncall (nargs=5, args=0xbfffdc20)
at /mirror/d/emacs/src/eval.c:2705
#11 0x081b1b68 in Fbyte_code (bytestr=948814908, vector=1215031136, maxdepth=6)
at /mirror/d/emacs/src/bytecode.c:709
#12 0x0817a494 in funcall_lambda (fun=1220009168, nargs=1,
arg_vector=0xbfffdde4) at /mirror/d/emacs/src/eval.c:2911
#13 0x08179edd in Ffuncall (nargs=2, args=0xbfffdde0)
at /mirror/d/emacs/src/eval.c:2772
#14 0x081b1b68 in Fbyte_code (bytestr=948817620, vector=1215289248, maxdepth=7)
at /mirror/d/emacs/src/bytecode.c:709
#15 0x0817a494 in funcall_lambda (fun=1220005768, nargs=2,
arg_vector=0xbfffdfa4) at /mirror/d/emacs/src/eval.c:2911
#16 0x08179edd in Ffuncall (nargs=3, args=0xbfffdfa0)
at /mirror/d/emacs/src/eval.c:2772
#17 0x081b1b68 in Fbyte_code (bytestr=948766804, vector=1215174384, maxdepth=17)
at /mirror/d/emacs/src/bytecode.c:709
#18 0x0817a494 in funcall_lambda (fun=1214748208, nargs=4,
arg_vector=0xbfffe194) at /mirror/d/emacs/src/eval.c:2911
#19 0x08179edd in Ffuncall (nargs=5, args=0xbfffe190)
at /mirror/d/emacs/src/eval.c:2772
#20 0x081b1b68 in Fbyte_code (bytestr=952458740, vector=1220896832, maxdepth=5)
at /mirror/d/emacs/src/bytecode.c:709
#21 0x0817a494 in funcall_lambda (fun=1220896976, nargs=2,
arg_vector=0xbfffe354) at /mirror/d/emacs/src/eval.c:2911
#22 0x08179edd in Ffuncall (nargs=3, args=0xbfffe350)
at /mirror/d/emacs/src/eval.c:2772
#23 0x081b1b68 in Fbyte_code (bytestr=951599396, vector=1220038872, maxdepth=4)
at /mirror/d/emacs/src/bytecode.c:709
#24 0x0817a494 in funcall_lambda (fun=1220039048, nargs=2,
arg_vector=0xbfffe504) at /mirror/d/emacs/src/eval.c:2911
#25 0x08179edd in Ffuncall (nargs=3, args=0xbfffe500)
at /mirror/d/emacs/src/eval.c:2772
#26 0x081b1b68 in Fbyte_code (bytestr=949718684, vector=1216787184, maxdepth=10)
at /mirror/d/emacs/src/bytecode.c:709
#27 0x0817a494 in funcall_lambda (fun=1214237616, nargs=2,
arg_vector=0xbfffe6d4) at /mirror/d/emacs/src/eval.c:2911
#28 0x08179edd in Ffuncall (nargs=3, args=0xbfffe6d0)
at /mirror/d/emacs/src/eval.c:2772
#29 0x081b1b68 in Fbyte_code (bytestr=949686140, vector=1213293104, maxdepth=9)
at /mirror/d/emacs/src/bytecode.c:709
#30 0x0817a494 in funcall_lambda (fun=1214365864, nargs=1,
arg_vector=0xbfffe8a4) at /mirror/d/emacs/src/eval.c:2911
#31 0x08179edd in Ffuncall (nargs=2, args=0xbfffe8a0)
at /mirror/d/emacs/src/eval.c:2772
#32 0x081b1b68 in Fbyte_code (bytestr=948486652, vector=1219379032, maxdepth=3)
at /mirror/d/emacs/src/bytecode.c:709
#33 0x0817a494 in funcall_lambda (fun=1219952584, nargs=1,
arg_vector=0xbfffea84) at /mirror/d/emacs/src/eval.c:2911
#34 0x08179edd in Ffuncall (nargs=2, args=0xbfffea80)
at /mirror/d/emacs/src/eval.c:2772
#35 0x08175bfd in Fcall_interactively (function=413867092,
record_flag=405896804, keys=1222607368) at /mirror/d/emacs/src/callint.c:850
#36 0x08110736 in Fcommand_execute (cmd=413867092, record_flag=405896804,
keys=405896804, special=405896804) at /mirror/d/emacs/src/keyboard.c:9641
---Type <return> to continue, or q <return> to quit---q
next prev parent reply other threads:[~2003-05-03 14:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <851xzo9f2l.fsf@pi.meyering.net>
2003-04-28 2:36 ` editfns.c (Fformat): fix for segfault Kenichi Handa
2003-04-28 23:38 ` Richard Stallman
2003-04-29 2:50 ` Kenichi Handa
2003-04-29 19:28 ` Richard Stallman
2003-05-03 14:10 ` Jim Meyering [this message]
2003-05-04 13:04 ` Richard Stallman
2003-05-05 8:47 ` Jim Meyering
2003-05-05 19:10 ` Richard Stallman
2003-05-07 9:27 ` Jim Meyering
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85n0i4yvbs.fsf@pi.meyering.net \
--to=jim@meyering.net \
--cc=emacs-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).