unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8162: 23.3; Crash with invalid default-process-coding-system value
@ 2011-03-03 10:20 YAMAMOTO Mitsuharu
  2011-03-03 11:25 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: YAMAMOTO Mitsuharu @ 2011-03-03 10:20 UTC (permalink / raw)
  To: 8162

Steps to reproduce:

  1. $ emacs -Q
  2. M-x shell RET
  3. M-: (setq default-process-coding-system '(dummy . utf-8-unix)) RET
  4. C-u M-x shell RET RET
  5. RET (in the *shell*<2> buffer)

Result:

  Crash with SIGSEGV at process.c:5737

  Vlast_coding_system_used = CODING_ID_NAME (coding->id);

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

In GNU Emacs 23.3.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2011-03-03 on mituharu-laptop
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ja_JP.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

(gdb) bt full
#0  0x0822a0f7 in send_process (proc=143844101, buf=0x8a2677c "\n", len=1, 
    object=142046297)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/process.c:5737
        p = 0x892e300
        rv = -1073750152
        coding = 0x0
        gcpro1 = {
          next = 0x0, 
          var = 0x0, 
          nvars = 0
        }
        old_sigpipe = 0x860c85c
#1  0x0822ab06 in Fprocess_send_string (process=143844101, string=142046297)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/process.c:6039
        proc = 143844101
#2  0x081dd068 in Ffuncall (nargs=3, args=0xbfffe040)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:3034
        fun = 138439245
        original_fun = 138885578
        funcar = 140560476
        numargs = 2
        lisp_numargs = 0
        val = 135772097
        backtrace = {
          next = 0xbfffe2ac, 
          function = 0xbfffe040, 
          args = 0xbfffe044, 
          nargs = 2, 
          evalargs = 0 '\000', 
          debug_on_exit = 0 '\000'
        }
        internal_args = 0xbfffe044
        i = 288
#3  0x0821e3e4 in Fbyte_code (bytestr=144666305, vector=144667301, maxdepth=12)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/bytecode.c:680
        count = 17
        op = 2
        vectorp = 0x89f72a8
        bytestr_length = 37
        stack = {
          pc = 0x8915ab4 "\207", 
          top = 0xbfffe048, 
          bottom = 0xbfffe040, 
          byte_string = 144666305, 
          byte_string_start = 0x8915a90 "\b\203\035", 
          constants = 144667301, 
          next = 0xbfffe34c
        }
        top = 0xbfffe040
        result = 144860984
#4  0x081dd870 in funcall_lambda (fun=144623045, nargs=2, 
    arg_vector=0xbfffe314)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:3220
        val = 138746354
        syms_left = 138746354
        next = 138786730
        count = 15
        i = 2
        optional = 0
        rest = 0
#5  0x081dd26d in Ffuncall (nargs=3, args=0xbfffe310)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:3077
        fun = 144623045
        original_fun = 144070570
        funcar = -1073747004
        numargs = 2
        lisp_numargs = -1073749256
        val = 138746354
        backtrace = {
          next = 0xbfffe57c, 
          function = 0xbfffe310, 
          args = 0xbfffe314, 
          nargs = 2, 
          evalargs = 0 '\000', 
          debug_on_exit = 0 '\000'
        }
        internal_args = 0xbfffebc4
        i = -1073748508
#6  0x0821e3e4 in Fbyte_code (bytestr=144102945, vector=144104117, maxdepth=12)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/bytecode.c:680
        count = 14
        op = 2
        vectorp = 0x896dab8
        bytestr_length = 32
        stack = {
          pc = 0x8915910 "\210)\b\205\037", 
          top = 0xbfffe318, 
          bottom = 0xbfffe310, 
          byte_string = 144102945, 
          byte_string_start = 0x8915900 "\b\203\b", 
          constants = 144104117, 
          next = 0xbfffe63c
        }
        top = 0xbfffe310
        result = 138746354
#7  0x081dd870 in funcall_lambda (fun=144104261, nargs=2, 
    arg_vector=0xbfffe5e4)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:3220
        val = 138746354
        syms_left = 138746354
        next = 138786730
        count = 12
        i = 2
        optional = 0
        rest = 0
#8  0x081dd26d in Ffuncall (nargs=3, args=0xbfffe5e0)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:3077
        fun = 144104261
        original_fun = 144075690
        funcar = 144075666
        numargs = 2
        lisp_numargs = -1073748536
        val = 224
        backtrace = {
          next = 0xbfffe86c, 
          function = 0xbfffe5e0, 
          args = 0xbfffe5e4, 
          nargs = 2, 
          evalargs = 0 '\000', 
          debug_on_exit = 0 '\000'
        }
        internal_args = 0xbfffebc4
        i = 224
#9  0x0821e3e4 in Fbyte_code (bytestr=144552785, vector=144495917, maxdepth=40)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/bytecode.c:680
        count = 6
        op = 2
        vectorp = 0x89cd530
        bytestr_length = 374
        stack = {
          pc = 0x8915288 "\210)\016.\203o\001\016/\204o\001\016*\016)Z\036\060\332\b!\203\066\001\016*\016\060\\dV\203\066\001\333\334\313\016)d\016\060Z\313\016*d&\006!\204\023\001\016*\016\060\\dX\203n\001\333\334\313\016)\016*\313\016*\211\016\060\\&\006!\203n\001\316\036\061\016*\211\016\060\\|\210\016\062\203m\001\212\016*b\210\335 \210)))\322\336\337\",)\207", 
          top = 0xbfffe5e8, 
          bottom = 0xbfffe5e0, 
          byte_string = 144552785, 
          byte_string_start = 0x8915188 "\306p!\211\030\204\016", 
          constants = 144495917, 
          next = 0x0
        }
        top = 0xbfffe5e0
        result = 139111386
#10 0x081dd870 in funcall_lambda (fun=144626981, nargs=0, 
    arg_vector=0xbfffe904)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:3220
        val = 138746354
        syms_left = 138746354
        next = 143807898
        count = 4
        i = 0
        optional = 1
        rest = 0
#11 0x081dd26d in Ffuncall (nargs=1, args=0xbfffe900)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:3077
        fun = 144626981
        original_fun = 144091866
        funcar = 138746354
        numargs = 0
        lisp_numargs = 0
        val = 0
        backtrace = {
          next = 0xbfffeb5c, 
          function = 0xbfffe900, 
          args = 0xbfffe904, 
          nargs = 0, 
          evalargs = 0 '\000', 
          debug_on_exit = 0 '\000'
        }
        internal_args = 0xbfffebc4
        i = 108
#12 0x081dcb06 in apply1 (fn=144091866, arg=138746354)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:2772
        ret_ungc_val = 0
        gcpro1 = {
          next = 0x84519f2, 
          var = 0xbfffe8f8, 
          nvars = -1931403520
        }
#13 0x081d6fc1 in Fcall_interactively (function=144091866, 
    record_flag=138746354, keys=138780461)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/callint.c:396
        input = 138746354
        args = 0x0
        visargs = 0x0
        specs = 138746354
        filter_specs = 138746354
        teml = 0
        up_event = 138746354
        enable = 138746354
        speccount = 3
        next_event = 0
        prefix_arg = 138746354
        string = 0x0
        tem = 0x0
        varies = 0x0
        i = 108
        j = 108
        count = 0
        foo = 0
        prompt1 = '\000' <repeats 53 times>, " ", '\000' <repeats 45 times>
        tem1 = 0x0
        arg_from_tty = 0
        gcpro1 = {
          next = 0x84c619a, 
          var = 0x84519f2, 
          nvars = 138746354
        }
        gcpro2 = {
          next = 0x0, 
          var = 0x0, 
          nvars = 3
        }
        gcpro3 = {
          next = 0x81e5088, 
          var = 0x8544a76, 
          nvars = 0
        }
        gcpro4 = {
          next = 0x3, 
          var = 0x84519f2, 
          nvars = 16
        }
        gcpro5 = {
          next = 0x0, 
          var = 0xbfffe8a8, 
          nvars = 136173701
        }
        key_count = 1
        record_then_fail = 0
        save_this_command = 144091866
        save_last_command = 139904170
        save_this_original_command = 144091866
        save_real_this_command = 144091866
#14 0x081dd092 in Ffuncall (nargs=4, args=0xbfffebc0)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:3037
        fun = 138432677
        original_fun = 138866674
        funcar = 0
        numargs = 3
        lisp_numargs = 0
        val = 0
        backtrace = {
          next = 0x0, 
          function = 0xbfffebc0, 
          args = 0xbfffebc4, 
          nargs = 3, 
          evalargs = 0 '\000', 
          debug_on_exit = 0 '\000'
        }
        internal_args = 0xbfffebc4
        i = 136145913
#15 0x081dcc09 in call3 (fn=138866674, arg1=144091866, arg2=138746354, 
    arg3=138746354) at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:2857
        ret_ungc_val = 144626981
        gcpro1 = {
          next = 0x84519f2, 
          var = 0x8459282, 
          nvars = 4
        }
        args = {138866674, 144091866, 138746354, 138746354}
#16 0x08169279 in Fcommand_execute (cmd=144091866, record_flag=138746354, 
    keys=138746354, special=138746354)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/keyboard.c:10562
        final = 144626981
        tem = 138746354
        prefixarg = 138746354
#17 0x0815b6d1 in command_loop_1 ()
    at /home/mituharu/src/bzr/emacs/emacs-23/src/keyboard.c:1906
        scount = 2
        cmd = 144091866
        lose = -1208090024
        keybuf = {52, 136813638, -1073746928, 136817849, 1, 138746354, 
          138746354, 136813641, 138838586, -1931403520, -1208090624, 
          -1073807358, -1073746760, 135634595, 143989358, 138746402, 
          -1073746726, 138855394, -1073746644, 1150886, 0, 142379896, 0, 
          -1073745120, -1073746664, 135634150, 143989358, -1073746726, 0, 
          138746354}
        i = 1
        prev_modiff = 1
        prev_buffer = 0x8a00910
        already_adjusted = 0
#18 0x081daa0f in internal_condition_case (bfun=0x815a22f <command_loop_1>, 
    handlers=138784170, hfun=0x8159bed <cmd_error>)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:1492
        val = 138993790
        c = {
          tag = 138746354, 
          val = 138746354, 
          next = 0xbfffee58, 
          gcpro = 0x0, 
          jmp = {{
              __jmpbuf = {0, -1073745556, -1073745852, -1073746408, 
                -2108170138, 1189008137}, 
              __mask_was_saved = 0, 
              __saved_mask = {
                __val = {0, 0, 0, 3221220396, 13729485, 0, 13319968, 0, 
                  3221220880, 3221220808, 3221220820, 134547493, 1231096, 0, 
                  3086877272, 3221159938, 134546495, 134545765, 3086905992, 
                  1228788, 13285836, 37, 3221220588, 1150886, 138668800, 
                  138668928, 3221221124, 13303296, 3086906080, 2, 4294967295, 
                  1228788}
              }
            }}, 
          backlist = 0x0, 
          handlerlist = 0x0, 
          lisp_eval_depth = 0, 
          pdlcount = 2, 
          poll_suppress_count = 1, 
          interrupt_input_blocked = 0, 
          byte_stack = 0x0
        }
        h = {
          handler = 138784170, 
          var = 138746354, 
          chosen_clause = 138746402, 
          tag = 0xbfffed30, 
          next = 0x0
        }
#19 0x08159f85 in command_loop_2 ()
    at /home/mituharu/src/bzr/emacs/emacs-23/src/keyboard.c:1362
        val = 0
#20 0x081da51b in internal_catch (tag=138781242, 
    func=0x8159f60 <command_loop_2>, arg=138746354)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:1228
        c = {
          tag = 138781242, 
          val = 138746354, 
          next = 0x0, 
          gcpro = 0x0, 
          jmp = {{
              __jmpbuf = {-1073745120, -1073745556, -1073745852, -1073746136, 
                -2108612506, 1187494153}, 
              __mask_was_saved = 0, 
              __saved_mask = {
                __val = {0 <repeats 16 times>, 13719982, 0, 0, 0, 138911483, 
                  3221221160, 136078979, 138913674, 138911483, 138746354, 
                  138772064, 141188884, 136754599, 14, 22, 192}
              }
            }}, 
          backlist = 0x0, 
          handlerlist = 0x0, 
          lisp_eval_depth = 0, 
          pdlcount = 2, 
          poll_suppress_count = 1, 
          interrupt_input_blocked = 0, 
          byte_stack = 0x0
        }
#21 0x08159f3e in command_loop ()
    at /home/mituharu/src/bzr/emacs/emacs-23/src/keyboard.c:1341
No locals.
#22 0x0815980c in recursive_edit_1 ()
    at /home/mituharu/src/bzr/emacs/emacs-23/src/keyboard.c:956
        count = 1
        val = -1073745992
#23 0x08159977 in Frecursive_edit ()
    at /home/mituharu/src/bzr/emacs/emacs-23/src/keyboard.c:1018
        count = 0
        buffer = 138746354
#24 0x08158155 in main (argc=2, argv=0xbffff3c4)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/emacs.c:1833
        dummy = -1073745128
        stack_bottom_variable = 8 '\b'
        do_initial_setlocale = 1
        skip_args = 0
        rlim = {
          rlim_cur = 8388608, 
          rlim_max = 18446744073709551615
        }
        no_loadup = 0
        junk = 0x0
        dname_arg = 0x0

Lisp Backtrace:
"process-send-string" (0xbfffe044)
"comint-send-string" (0xbfffe314)
"comint-simple-send" (0xbfffe5e4)
"comint-send-input" (0xbfffe904)
"call-interactively" (0xbfffebc4)





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#8162: 23.3; Crash with invalid default-process-coding-system value
  2011-03-03 10:20 bug#8162: 23.3; Crash with invalid default-process-coding-system value YAMAMOTO Mitsuharu
@ 2011-03-03 11:25 ` Eli Zaretskii
  2011-03-03 12:38   ` Kenichi Handa
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2011-03-03 11:25 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: 8162

> Date: Thu, 03 Mar 2011 19:20:15 +0900
> From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
> Cc: 
> 
> Steps to reproduce:
> 
>   1. $ emacs -Q
>   2. M-x shell RET
>   3. M-: (setq default-process-coding-system '(dummy . utf-8-unix)) RET
>   4. C-u M-x shell RET RET
>   5. RET (in the *shell*<2> buffer)
> 
> Result:
> 
>   Crash with SIGSEGV at process.c:5737

Don't you see an error message regarding an invalid coding-system,
before you type the last RET (which causes the crash)?

set-process-coding-system signals an error when it sees the `dummy'
part, but comint.el does nothing about that.  It should kill the shell
buffer it just created, IMO.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#8162: 23.3; Crash with invalid default-process-coding-system value
  2011-03-03 11:25 ` Eli Zaretskii
@ 2011-03-03 12:38   ` Kenichi Handa
  2011-03-03 13:14     ` Eli Zaretskii
  2011-03-05 20:17     ` Chong Yidong
  0 siblings, 2 replies; 8+ messages in thread
From: Kenichi Handa @ 2011-03-03 12:38 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 8162

In article <E1Pv6fH-0003zX-AI@fencepost.gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> > Date: Thu, 03 Mar 2011 19:20:15 +0900
> > From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
> > Cc: 
> > 
> > Steps to reproduce:
> > 
> >   1. $ emacs -Q
> >   2. M-x shell RET
> >   3. M-: (setq default-process-coding-system '(dummy . utf-8-unix)) RET
> >   4. C-u M-x shell RET RET
> >   5. RET (in the *shell*<2> buffer)
> > 
> > Result:
> > 
> >   Crash with SIGSEGV at process.c:5737

> Don't you see an error message regarding an invalid coding-system,
> before you type the last RET (which causes the crash)?

> set-process-coding-system signals an error when it sees the `dummy'
> part, but comint.el does nothing about that.  It should kill the shell
> buffer it just created, IMO.

But, at least, a process associated with the shell buffer
must be killed when an error occurs in Fstart_process.
Actually, that function has this code:

  /* If an error occurs and we can't start the process, we want to
     remove it from the process list.  This means that each error
     check in create_process doesn't need to call remove_process
     itself; it's all taken care of here.  */
  record_unwind_protect (start_process_unwind, proc);

and the "Invalid coding system" error is caused in
create_process called near the end of Fstart_process.

The reason why start_process_unwind doesn't kill the process
is that create_process sets XPROCESS (process)->pid to -1
too late; i.e. after set_process_coding_system (which
signals an error) is called.

The attached patch (against emacs-23 branch) will fix this
bug.  Perhaps "XPROCESS (process)->pid = -1" should be done
much earlier because an error may be signaled before, but,
I'm not sure.  deactivate_process may not handle such
situation well.

By the way, as Emacs 23.2 also had this bug, strictly
speaking, the fix is not for regression.  Should I install
it for emacs-23 or for emacs-24?

---
Kenichi Handa
handa@m17n.org


2011-03-03  Kenichi Handa  <handa@m17n.org>

	* process.c (create_process): Call setup_process_coding_systems
	after the pid of the process is set to -1.

=== modified file 'src/process.c'
--- src/process.c	2011-01-02 23:50:46 +0000
+++ src/process.c	2011-03-03 12:30:28 +0000
@@ -1999,7 +1999,6 @@
 
   XPROCESS (process)->pty_flag = pty_flag;
   XPROCESS (process)->status = Qrun;
-  setup_process_coding_systems (process);
 
   /* Delay interrupts until we have a chance to store
      the new fork's pid in its process structure */
@@ -2046,6 +2045,10 @@
      processes to get their return values scrambled.  */
   XPROCESS (process)->pid = -1;
 
+  /* This must be called after the above line because it may signal an
+     error. */
+  setup_process_coding_systems (process);
+
   BLOCK_INPUT;
 
   {






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#8162: 23.3; Crash with invalid default-process-coding-system value
  2011-03-03 12:38   ` Kenichi Handa
@ 2011-03-03 13:14     ` Eli Zaretskii
  2011-03-04  0:33       ` YAMAMOTO Mitsuharu
  2011-03-04  0:37       ` Kenichi Handa
  2011-03-05 20:17     ` Chong Yidong
  1 sibling, 2 replies; 8+ messages in thread
From: Eli Zaretskii @ 2011-03-03 13:14 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 8162

> From: Kenichi Handa <handa@m17n.org>
> Cc: mituharu@math.s.chiba-u.ac.jp, 8162@debbugs.gnu.org
> Date: Thu, 03 Mar 2011 21:38:52 +0900
> 
> > set-process-coding-system signals an error when it sees the `dummy'
> > part, but comint.el does nothing about that.  It should kill the shell
> > buffer it just created, IMO.
> 
> But, at least, a process associated with the shell buffer
> must be killed when an error occurs in Fstart_process.

Killing the buffer will also kill the process, won't it?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#8162: 23.3; Crash with invalid default-process-coding-system value
  2011-03-03 13:14     ` Eli Zaretskii
@ 2011-03-04  0:33       ` YAMAMOTO Mitsuharu
  2011-03-04  0:37       ` Kenichi Handa
  1 sibling, 0 replies; 8+ messages in thread
From: YAMAMOTO Mitsuharu @ 2011-03-04  0:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 8162

>>>>> On Thu, 03 Mar 2011 08:14:48 -0500, Eli Zaretskii <eliz@gnu.org> said:

>>> set-process-coding-system signals an error when it sees the
>>> `dummy' part, but comint.el does nothing about that.  It should
>>> kill the shell buffer it just created, IMO.
>> 
>> But, at least, a process associated with the shell buffer must be
>> killed when an error occurs in Fstart_process.

> Killing the buffer will also kill the process, won't it?

Without Handa-san's patch, killing the *shell*<2> buffer caused
another crash.

  1. $ emacs -Q
  2. M-x shell RET
  3. M-: (setq default-process-coding-system '(dummy . utf-8-unix)) RET
  4. C-u M-x shell RET RET
  5. C-x k RET yes RET

(2-4 can be replaced with:

  2'. (setq explicit-shell-file-name "/bin/csh") C-j
  3'. (setq default-process-coding-system '(dummy . utf-8-unix)) C-j
  4'. M-x shell RET
)

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

(gdb) bt full
#0  0x0012d422 in __kernel_vsyscall ()
No symbol table info available.
#1  0x00cd2926 in kill () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2  0x0822ae30 in process_send_signal (process=144646877, signo=1, 
    current_group=138746354, nomsg=1)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/process.c:6325
        proc = 144646877
        p = 0x0
        gid = 0
        no_pgrp = 0
#3  0x0822baba in kill_buffer_processes (buffer=144655189)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/process.c:6704
        tail = 143990254
        proc = 144646877
#4  0x0817aa9a in Fkill_buffer (buffer_or_name=142030913)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/buffer.c:1541
        buffer = 144655189
        b = 0x89f4350
        tem = 138772069
        m = 0x8457e65
        gcpro1 = {
          next = 0x87d0ce5, 
          var = 0x7, 
          nvars = 0
        }
#5  0x081dd047 in Ffuncall (nargs=2, args=0xbfffe8e0)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:3031
        fun = 136797749
        original_fun = 138864746
        funcar = 135633819
        numargs = 1
        lisp_numargs = -1073747848
        val = -1073745852
        backtrace = {
          next = 0xbfffeb5c, 
          function = 0xbfffe8e0, 
          args = 0xbfffe8e4, 
          nargs = 1, 
          evalargs = 0 '\000', 
          debug_on_exit = 0 '\000'
        }
        internal_args = 0xbfffe8e4
        i = 2
#6  0x081d889d in Fcall_interactively (function=138864746, 
    record_flag=138746354, keys=138780461)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/callint.c:869
        val = 0
        args = 0xbfffe8e0
        visargs = 0xbfffe8c0
        specs = 142037121
        filter_specs = 142037121
        teml = 138746354
        up_event = 138746354
        enable = 138746354
        speccount = 3
        next_event = 2
        prefix_arg = 138746354
        string = 0xbfffe900 "bKill buffer: "
        tem = 0x8269994 ""
        varies = 0xbfffe8a0
        i = 2
        j = 2
        count = 1
        foo = 0
        prompt1 = "Kill buffer: ", '\000' <repeats 86 times>
        tem1 = 0x0
        arg_from_tty = 1
        gcpro1 = {
          next = 0x84c619a, 
          var = 0x84519f2, 
          nvars = 138746354
        }
        gcpro2 = {
          next = 0x0, 
          var = 0x0, 
          nvars = 3
        }
        gcpro3 = {
          next = 0x0, 
          var = 0x0, 
          nvars = 2
        }
        gcpro4 = {
          next = 0x3, 
          var = 0x84519f2, 
          nvars = 2
        }
        gcpro5 = {
          next = 0x0, 
          var = 0xbfffe8a8, 
          nvars = 136173701
        }
        key_count = 2
        record_then_fail = 0
        save_this_command = 138864746
        save_last_command = 139904170
        save_this_original_command = 138864746
        save_real_this_command = 138864746
#7  0x081dd092 in Ffuncall (nargs=4, args=0xbfffebc0)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:3037
        fun = 138432677
        original_fun = 138866674
        funcar = 0
        numargs = 3
        lisp_numargs = 0
        val = 0
        backtrace = {
          next = 0x0, 
          function = 0xbfffebc0, 
          args = 0xbfffebc4, 
          nargs = 3, 
          evalargs = 0 '\000', 
          debug_on_exit = 0 '\000'
        }
        internal_args = 0xbfffebc4
        i = 136145913
#8  0x081dcc09 in call3 (fn=138866674, arg1=138864746, arg2=138746354, 
    arg3=138746354) at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:2857
        ret_ungc_val = 136797749
        gcpro1 = {
          next = 0x85498be, 
          var = 0x8459282, 
          nvars = 4
        }
        args = {138866674, 138864746, 138746354, 138746354}
#9  0x08169279 in Fcommand_execute (cmd=138864746, record_flag=138746354, 
    keys=138746354, special=138746354)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/keyboard.c:10562
        final = 136797749
        tem = 138746354
        prefixarg = 138746354
#10 0x0815b6d1 in command_loop_1 ()
    at /home/mituharu/src/bzr/emacs/emacs-23/src/keyboard.c:1906
        scount = 2
        cmd = 138864746
        lose = -1208090024
        keybuf = {96, 428, -1073746928, 136817849, 1, 138746354, 138746354, 
          136813641, 138838586, -1096495616, -1208090624, -1073807358, 
          -1073746760, 135634595, 143990150, 138746402, -1073746726, 
          138855394, -1073746644, 1150886, 0, 142413024, 0, -1073745120, 
          -1073746664, 135634150, 143990150, -1073746726, 0, 138746354}
        i = 2
        prev_modiff = 1
        prev_buffer = 0x89f4350
        already_adjusted = 0
#11 0x081daa0f in internal_condition_case (bfun=0x815a22f <command_loop_1>, 
    handlers=138784170, hfun=0x8159bed <cmd_error>)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:1492
        val = 138993790
        c = {
          tag = 138746354, 
          val = 138746354, 
          next = 0xbfffee58, 
          gcpro = 0x0, 
          jmp = {{
              __jmpbuf = {0, -1073745556, -1073745852, -1073746408, 453675397, 
                -545015062}, 
              __mask_was_saved = 0, 
              __saved_mask = {
                __val = {0, 0, 0, 3221220396, 13729485, 0, 13319968, 0, 
                  3221220880, 3221220808, 3221220820, 134547493, 1231096, 0, 
                  3086877272, 3221159938, 134546495, 134545765, 3086905992, 
                  1228788, 13285836, 37, 3221220588, 1150886, 138668800, 
                  138668928, 3221221124, 13303296, 3086906080, 2, 4294967295, 
                  1228788}
              }
            }}, 
          backlist = 0x0, 
          handlerlist = 0x0, 
          lisp_eval_depth = 0, 
          pdlcount = 2, 
          poll_suppress_count = 1, 
          interrupt_input_blocked = 0, 
          byte_stack = 0x0
        }
        h = {
          handler = 138784170, 
          var = 138746354, 
          chosen_clause = 138746402, 
          tag = 0xbfffed30, 
          next = 0x0
        }
#12 0x08159f85 in command_loop_2 ()
    at /home/mituharu/src/bzr/emacs/emacs-23/src/keyboard.c:1362
        val = 0
#13 0x081da51b in internal_catch (tag=138781242, 
    func=0x8159f60 <command_loop_2>, arg=138746354)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/eval.c:1228
        c = {
          tag = 138781242, 
          val = 138746354, 
          next = 0x0, 
          gcpro = 0x0, 
          jmp = {{
              __jmpbuf = {-1073745120, -1073745556, -1073745852, -1073746136, 
                453790085, -543502102}, 
              __mask_was_saved = 0, 
              __saved_mask = {
                __val = {0 <repeats 16 times>, 13719982, 0, 0, 0, 138911483, 
                  3221221160, 136078979, 138913674, 138911483, 138746354, 
                  138772064, 141188884, 136754599, 14, 22, 192}
              }
            }}, 
          backlist = 0x0, 
          handlerlist = 0x0, 
          lisp_eval_depth = 0, 
          pdlcount = 2, 
          poll_suppress_count = 1, 
          interrupt_input_blocked = 0, 
          byte_stack = 0x0
        }
#14 0x08159f3e in command_loop ()
    at /home/mituharu/src/bzr/emacs/emacs-23/src/keyboard.c:1341
No locals.
#15 0x0815980c in recursive_edit_1 ()
    at /home/mituharu/src/bzr/emacs/emacs-23/src/keyboard.c:956
        count = 1
        val = -1073745992
#16 0x08159977 in Frecursive_edit ()
    at /home/mituharu/src/bzr/emacs/emacs-23/src/keyboard.c:1018
        count = 0
        buffer = 138746354
#17 0x08158155 in main (argc=2, argv=0xbffff3c4)
    at /home/mituharu/src/bzr/emacs/emacs-23/src/emacs.c:1833
        dummy = -1073745128
        stack_bottom_variable = 8 '\b'
        do_initial_setlocale = 1
        skip_args = 0
        rlim = {
          rlim_cur = 8388608, 
          rlim_max = 18446744073709551615
        }
        no_loadup = 0
        junk = 0x0
        dname_arg = 0x0

Lisp Backtrace:
"kill-buffer" (0xbfffe8e4)
"call-interactively" (0xbfffebc4)





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#8162: 23.3; Crash with invalid default-process-coding-system value
  2011-03-03 13:14     ` Eli Zaretskii
  2011-03-04  0:33       ` YAMAMOTO Mitsuharu
@ 2011-03-04  0:37       ` Kenichi Handa
  1 sibling, 0 replies; 8+ messages in thread
From: Kenichi Handa @ 2011-03-04  0:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 8162

In article <E1Pv8Mi-0005w4-BM@fencepost.gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> > From: Kenichi Handa <handa@m17n.org>
> > Cc: mituharu@math.s.chiba-u.ac.jp, 8162@debbugs.gnu.org
> > Date: Thu, 03 Mar 2011 21:38:52 +0900
> > 
> > > set-process-coding-system signals an error when it sees the `dummy'
> > > part, but comint.el does nothing about that.  It should kill the shell
> > > buffer it just created, IMO.
> > 
> > But, at least, a process associated with the shell buffer
> > must be killed when an error occurs in Fstart_process.

> Killing the buffer will also kill the process, won't it?

Killing the buffer tries to kill the process and that leads
to crash because the process is in insane state.

---
Kenichi Handa
handa@m17n.org





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#8162: 23.3; Crash with invalid default-process-coding-system value
  2011-03-03 12:38   ` Kenichi Handa
  2011-03-03 13:14     ` Eli Zaretskii
@ 2011-03-05 20:17     ` Chong Yidong
  2011-08-14 17:51       ` Chong Yidong
  1 sibling, 1 reply; 8+ messages in thread
From: Chong Yidong @ 2011-03-05 20:17 UTC (permalink / raw)
  To: Stefan Monnier, Kenichi Handa; +Cc: 8162

Kenichi Handa <handa@m17n.org> writes:

> The attached patch (against emacs-23 branch) will fix this
> bug.  Perhaps "XPROCESS (process)->pid = -1" should be done
> much earlier because an error may be signaled before, but,
> I'm not sure.  deactivate_process may not handle such
> situation well.
>
> By the way, as Emacs 23.2 also had this bug, strictly
> speaking, the fix is not for regression.  Should I install
> it for emacs-23 or for emacs-24?

This patch doesn't look at all safe.  At the very least, if it's
included, we'd need another pretest.  But I'm not inclined to include it
for 23.3.  Although it's a crash, (i) both 23.1 and 23.2 have the same
bug, and (ii) the trigger seems quite unusual.

Stefan, WDYT?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#8162: 23.3; Crash with invalid default-process-coding-system value
  2011-03-05 20:17     ` Chong Yidong
@ 2011-08-14 17:51       ` Chong Yidong
  0 siblings, 0 replies; 8+ messages in thread
From: Chong Yidong @ 2011-08-14 17:51 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 8162

I've committed the patch to the trunk.





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-08-14 17:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-03 10:20 bug#8162: 23.3; Crash with invalid default-process-coding-system value YAMAMOTO Mitsuharu
2011-03-03 11:25 ` Eli Zaretskii
2011-03-03 12:38   ` Kenichi Handa
2011-03-03 13:14     ` Eli Zaretskii
2011-03-04  0:33       ` YAMAMOTO Mitsuharu
2011-03-04  0:37       ` Kenichi Handa
2011-03-05 20:17     ` Chong Yidong
2011-08-14 17:51       ` Chong Yidong

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).