[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu)
From: |
John W. Eaton |
Subject: |
Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu) |
Date: |
Tue, 21 Feb 2006 16:33:23 -0500 |
On Tue, 21 Feb 2006, Richard M. Stallman wrote:
| I think I fixed the x_error_message problem yesterday
| with a change in xterm.c.
Do you mean the following change?
2006-02-19 Richard M. Stallman <address@hidden>
* xterm.c (x_catch_errors): Use xmalloc.
Index: xterm.c
===================================================================
RCS file: /sources/emacs/emacs/src/xterm.c,v
retrieving revision 1.897
retrieving revision 1.898
diff -u -r1.897 -r1.898
--- xterm.c 14 Feb 2006 10:01:23 -0000 1.897
+++ xterm.c 20 Feb 2006 01:18:43 -0000 1.898
@@ -7513,7 +7513,7 @@
Display *dpy;
{
int count = SPECPDL_INDEX ();
- struct x_error_message_stack *data = malloc (sizeof (*data));
+ struct x_error_message_stack *data = xmalloc (sizeof (*data));
Lisp_Object dummy;
#ifdef ENABLE_CHECKING
dummy = make_number ((EMACS_INT)dpy + (EMACS_INT)x_error_message);
Unfortunately, this doesn't seem to solve the problem for me. I still
have crashes in unbind_to in xterm.c due to x_error_message == 0.
I'm appending the backtrace from gdb. This is with the current CVS
sources updated around noon EST 2/21/2006.
I supplied some additional info here:
http://lists.gnu.org/archive/html/emacs-devel/2006-02/msg00794.html
I don't think malloc is failing to allocate memory here, but something
is causing x_catch_errors_unwind to be called without a matching call
to x_catch_errors.
I'd be happy to do any additional debugging. Just let me know what
additional info would help.
Thanks,
jwe
Here is the backtrace from gdb:
Program received signal SIGSEGV, Segmentation fault.
x_catch_errors_unwind (dummy=9571313) at /scratch/jwe/src/emacs/src/xterm.c:7543
7543 Display *dpy = x_error_message->dpy;
(gdb) where
#0 x_catch_errors_unwind (dummy=9571313) at
/scratch/jwe/src/emacs/src/xterm.c:7543
#1 0x000000000050e60d in unbind_to (count=<value optimized out>,
value=17530837)
at /scratch/jwe/src/emacs/src/eval.c:3233
#2 0x000000000050ff36 in Ffuncall (nargs=<value optimized out>, args=0xfb4020)
at /scratch/jwe/src/emacs/src/eval.c:2934
#3 0x000000000051115a in call1 (fn=<value optimized out>, arg1=<value
optimized out>)
at /scratch/jwe/src/emacs/src/eval.c:2664
#4 0x000000000051adb4 in mapcar1 (leni=44, vals=0x7fffff8f3fd0, fn=16465956,
seq=<value optimized out>)
at /scratch/jwe/src/emacs/src/fns.c:3138
#5 0x000000000051b165 in Fmapcar (function=16465956, sequence=16318565)
at /scratch/jwe/src/emacs/src/fns.c:3206
#6 0x000000000051002b in Ffuncall (nargs=<value optimized out>, args=<value
optimized out>)
at /scratch/jwe/src/emacs/src/eval.c:2882
#7 0x000000000053d3e4 in Fbyte_code (bytestr=16581345, vector=16515636,
maxdepth=72)
at /scratch/jwe/src/emacs/src/bytecode.c:694
#8 0x000000000050f46a in Feval (form=<value optimized out>) at
/scratch/jwe/src/emacs/src/eval.c:2225
#9 0x0000000000511a81 in internal_lisp_condition_case (var=10166625,
bodyform=13169253,
handlers=<value optimized out>) at /scratch/jwe/src/emacs/src/eval.c:1412
#10 0x000000000053c426 in Fbyte_code (bytestr=32, vector=16659748, maxdepth=24)
at /scratch/jwe/src/emacs/src/bytecode.c:884
#11 0x000000000050f98b in funcall_lambda (fun=16672196, nargs=1,
arg_vector=0x7fffff8f46e8)
at /scratch/jwe/src/emacs/src/eval.c:3066
#12 0x000000000050ff36 in Ffuncall (nargs=<value optimized out>, args=0xfe65c0)
at /scratch/jwe/src/emacs/src/eval.c:2934
#13 0x000000000053d3e4 in Fbyte_code (bytestr=16815377, vector=16825188,
maxdepth=24)
at /scratch/jwe/src/emacs/src/bytecode.c:694
#14 0x000000000050f98b in funcall_lambda (fun=16825620, nargs=0,
arg_vector=0x7fffff8f4888)
at /scratch/jwe/src/emacs/src/eval.c:3066
#15 0x000000000050ff36 in Ffuncall (nargs=<value optimized out>, args=0x100bd10)
at /scratch/jwe/src/emacs/src/eval.c:2934
#16 0x000000000053d3e4 in Fbyte_code (bytestr=10159937, vector=7350844,
maxdepth=24)
---Type <return> to continue, or q <return> to quit---
at /scratch/jwe/src/emacs/src/bytecode.c:694
#17 0x000000000050f98b in funcall_lambda (fun=7350668, nargs=2,
arg_vector=0x7fffff8f4a28)
at /scratch/jwe/src/emacs/src/eval.c:3066
#18 0x000000000050ff36 in Ffuncall (nargs=<value optimized out>, args=0x702988)
at /scratch/jwe/src/emacs/src/eval.c:2934
#19 0x000000000053d3e4 in Fbyte_code (bytestr=10460385, vector=7349476,
maxdepth=40)
at /scratch/jwe/src/emacs/src/bytecode.c:694
#20 0x000000000050f98b in funcall_lambda (fun=7349060, nargs=0,
arg_vector=0x7fffff8f4b60)
at /scratch/jwe/src/emacs/src/eval.c:3066
#21 0x000000000050fc2c in apply_lambda (fun=7349060, args=9571313, eval_flag=1)
at /scratch/jwe/src/emacs/src/eval.c:2988
#22 0x000000000050f2f0 in Feval (form=<value optimized out>) at
/scratch/jwe/src/emacs/src/eval.c:2277
#23 0x0000000000511a81 in internal_lisp_condition_case (var=10166625,
bodyform=7336397,
handlers=<value optimized out>) at /scratch/jwe/src/emacs/src/eval.c:1412
#24 0x000000000053c426 in Fbyte_code (bytestr=24, vector=7336220, maxdepth=32)
at /scratch/jwe/src/emacs/src/bytecode.c:884
#25 0x000000000050f98b in funcall_lambda (fun=7336004, nargs=1,
arg_vector=0x7fffff8f4fa8)
at /scratch/jwe/src/emacs/src/eval.c:3066
#26 0x000000000050ff36 in Ffuncall (nargs=<value optimized out>, args=0x6ff040)
at /scratch/jwe/src/emacs/src/eval.c:2934
#27 0x000000000053d3e4 in Fbyte_code (bytestr=208, vector=7334468, maxdepth=40)
at /scratch/jwe/src/emacs/src/bytecode.c:694
#28 0x000000000050f98b in funcall_lambda (fun=7333996, nargs=2,
arg_vector=0x7fffff8f5158)
at /scratch/jwe/src/emacs/src/eval.c:3066
#29 0x000000000050ff36 in Ffuncall (nargs=<value optimized out>, args=0x6fe868)
at /scratch/jwe/src/emacs/src/eval.c:2934
#30 0x000000000053d3e4 in Fbyte_code (bytestr=10446913, vector=7329828,
maxdepth=32)
at /scratch/jwe/src/emacs/src/bytecode.c:694
#31 0x000000000050f98b in funcall_lambda (fun=7329460, nargs=6,
arg_vector=0x7fffff8f52f8)
at /scratch/jwe/src/emacs/src/eval.c:3066
#32 0x000000000050ff36 in Ffuncall (nargs=<value optimized out>, args=0x6fd6b0)
---Type <return> to continue, or q <return> to quit---
at /scratch/jwe/src/emacs/src/eval.c:2934
#33 0x000000000053d3e4 in Fbyte_code (bytestr=10287953, vector=12733232,
maxdepth=64)
at /scratch/jwe/src/emacs/src/bytecode.c:694
#34 0x000000000050f98b in funcall_lambda (fun=7325932, nargs=4,
arg_vector=0x7fffff8f54b8)
at /scratch/jwe/src/emacs/src/eval.c:3066
#35 0x000000000050ff36 in Ffuncall (nargs=<value optimized out>, args=0x6fc8e8)
at /scratch/jwe/src/emacs/src/eval.c:2934
#36 0x000000000053d3e4 in Fbyte_code (bytestr=10437041, vector=7315308,
maxdepth=48)
at /scratch/jwe/src/emacs/src/bytecode.c:694
#37 0x000000000050f98b in funcall_lambda (fun=7315124, nargs=1,
arg_vector=0x7fffff8f5668)
at /scratch/jwe/src/emacs/src/eval.c:3066
#38 0x000000000050ff36 in Ffuncall (nargs=<value optimized out>, args=0x6f9eb0)
at /scratch/jwe/src/emacs/src/eval.c:2934
#39 0x000000000053d3e4 in Fbyte_code (bytestr=10107153, vector=67, maxdepth=0)
at /scratch/jwe/src/emacs/src/bytecode.c:694
#40 0x000000000050f98b in funcall_lambda (fun=8456516, nargs=1,
arg_vector=0x7fffff8f5848)
at /scratch/jwe/src/emacs/src/eval.c:3066
#41 0x000000000050ff36 in Ffuncall (nargs=<value optimized out>, args=0x810940)
at /scratch/jwe/src/emacs/src/eval.c:2934
#42 0x000000000053d3e4 in Fbyte_code (bytestr=9778481, vector=8432972,
maxdepth=56)
at /scratch/jwe/src/emacs/src/bytecode.c:694
#43 0x000000000050f98b in funcall_lambda (fun=8431324, nargs=0,
arg_vector=0x7fffff8f5a08)
at /scratch/jwe/src/emacs/src/eval.c:3066
#44 0x000000000050ff36 in Ffuncall (nargs=<value optimized out>, args=0x80a6d8)
at /scratch/jwe/src/emacs/src/eval.c:2934
#45 0x000000000053d3e4 in Fbyte_code (bytestr=9724593, vector=8422892,
maxdepth=48)
at /scratch/jwe/src/emacs/src/bytecode.c:694
#46 0x000000000050f98b in funcall_lambda (fun=8422668, nargs=0,
arg_vector=0x7fffff8f5b40)
at /scratch/jwe/src/emacs/src/eval.c:3066
#47 0x000000000050fc2c in apply_lambda (fun=8422668, args=9571313, eval_flag=1)
at /scratch/jwe/src/emacs/src/eval.c:2988
---Type <return> to continue, or q <return> to quit---
#48 0x000000000050f2f0 in Feval (form=<value optimized out>) at
/scratch/jwe/src/emacs/src/eval.c:2277
#49 0x000000000050e067 in internal_condition_case (bfun=0x4a5160 <top_level_2>,
handlers=9664785,
hfun=0x4ab270 <cmd_error>) at /scratch/jwe/src/emacs/src/eval.c:1465
#50 0x00000000004a519a in top_level_1 () at
/scratch/jwe/src/emacs/src/keyboard.c:1345
#51 0x000000000050df17 in internal_catch (tag=<value optimized out>,
func=0x4a5170 <top_level_1>, arg=9571313)
at /scratch/jwe/src/emacs/src/eval.c:1211
#52 0x00000000004a4f3b in command_loop () at
/scratch/jwe/src/emacs/src/keyboard.c:1302
#53 0x00000000004a4ff1 in recursive_edit_1 () at
/scratch/jwe/src/emacs/src/keyboard.c:1000
#54 0x00000000004a50f3 in Frecursive_edit () at
/scratch/jwe/src/emacs/src/keyboard.c:1061
#55 0x00000000004a418f in main (argc=388, argv=0x7fffff8f63d8) at
/scratch/jwe/src/emacs/src/emacs.c:1789
Lisp Backtrace:
0xfb4024 PVEC_COMPILED
"mapcar"
"byte-code"
"c-init-language-vars-for"
"c++-mode"
"set-auto-mode-0"
"set-auto-mode"
"normal-mode"
"after-find-file"
"find-file-noselect-1"
"find-file-noselect"
"find-file-other-window"
"command-line-1"
"command-line"
"normal-top-level"
(gdb) list
7538
7539 static Lisp_Object
7540 x_catch_errors_unwind (dummy)
7541 Lisp_Object dummy;
7542 {
7543 Display *dpy = x_error_message->dpy;
7544 struct x_error_message_stack *tmp;
7545
7546 /* The display may have been closed before this function is called.
7547 Check if it is still open before calling XSync. */
(gdb) p x_error_message
$1 = (struct x_error_message_stack *) 0x0
- Reproducible crashes: dropping an URL (was: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu)), (continued)
- Reproducible crashes: dropping an URL (was: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu)), Reiner Steib, 2006/02/17
- Re: Reproducible crashes: dropping an URL, Stefan Monnier, 2006/02/17
- SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu) (was: Reproducible crashes: dropping an URL), Reiner Steib, 2006/02/20
- Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu), Stefan Monnier, 2006/02/20
- Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu), Reiner Steib, 2006/02/20
- Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu), Chong Yidong, 2006/02/20
- Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu), Richard M. Stallman, 2006/02/22
- Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu), Richard M. Stallman, 2006/02/21
- Reproducible crashes: dropping an URL (was: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu)), Nick Roberts, 2006/02/17
Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu), John W. Eaton, 2006/02/17
Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu),
John W. Eaton <=
- Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu), Richard Stallman, 2006/02/22
- Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu), Richard Stallman, 2006/02/24
- Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu), John W. Eaton, 2006/02/25
- Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu), Chong Yidong, 2006/02/25
- Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu), Chong Yidong, 2006/02/25
- Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu), John W. Eaton, 2006/02/25
- Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu), Chong Yidong, 2006/02/25
- Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu), John W. Eaton, 2006/02/25
- Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu), Richard Stallman, 2006/02/26