GNU bug report logs -
#15344
24.3; Crash when yanking in c-mode
Previous Next
Reported by: Lars Ljung <lars <at> matholka.se>
Date: Wed, 11 Sep 2013 19:17:01 UTC
Severity: important
Tags: confirmed
Found in version 24.3
Done: Daniel Colascione <dancol <at> dancol.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15344 in the body.
You can then email your comments to 15344 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15344
; Package
emacs
.
(Wed, 11 Sep 2013 19:17:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Lars Ljung <lars <at> matholka.se>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 11 Sep 2013 19:17:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org. Please check that
the From: line contains a valid email address. After a delay of up
to one day, you should receive an acknowledgment at that address.
Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.
Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug. If you can, give a recipe
starting from `emacs -Q':
Emacs crashes with segmentation fault. Follow these steps to reproduce:
1) Run emacs -Q
2) Open new buffer in c-mode
3) Enter this:
int test(int *p);
#define TEST(p)
4) copy the first line and yank it at the end of the second line
5) Segmentation fault
The backtrace is attached.
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/home/llj/tmp/emacs/emacs-24/etc/DEBUG.
In GNU Emacs 24.3.14 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.4)
of 2013-09-11 on kvarnholmen
Bzr revision: 111403 rgm <at> gnu.org-20130823165039-x42fumaeambe7mqh
Windowing system distributor `The X.Org Foundation', version 11.0.11303000
System Description: Ubuntu 13.04
Configured using:
`configure 'CFLAGS=-O0 -g3''
Important settings:
value of $LC_COLLATE: sv_SE.UTF-8
value of $LC_CTYPE: sv_SE.UTF-8
value of $LC_MESSAGES: sv_SE.UTF-8
value of $LANG: sv_SE.UTF-8
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<down> M-x r e p o <tab> r <tab> <return>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
byte-code: End of buffer
Making completion list...
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils help-mode easymenu time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)
[gdb-emacs.txt (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15344
; Package
emacs
.
(Fri, 13 Sep 2013 20:54:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 15344 <at> debbugs.gnu.org (full text, mbox):
Using --enable-checking I also got this:
textprop.c:1549: Emacs fatal error: assertion failed: i != 0
That seems to be the cause of the segmentation fault. Let me know if
there is anything else I can do to debug this.
Also, I can reproduce this on trunk.
Regards,
Lars Ljung
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15344
; Package
emacs
.
(Sat, 14 Sep 2013 09:39:02 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
Lars Ljung <lars <at> matholka.se> wrote:
> Using --enable-checking I also got this:
> textprop.c:1549: Emacs fatal error: assertion failed: i != 0
> That seems to be the cause of the segmentation fault. Let me know if
> there is anything else I can do to debug this.
> Also, I can reproduce this on trunk.
I confirm that the segfault happens to me too, on Emacs 24.3 running
on GNU/Linux.
I can't see at the moment that it's directly related to CC Mode, though.
> Regards,
> Lars Ljung
--
Alan Mackenzie (Nuremberg, Germany).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15344
; Package
emacs
.
(Sun, 22 Sep 2013 07:41:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 15344 <at> debbugs.gnu.org (full text, mbox):
For what it's worth, I can't reproduce the problem on
my platform (Fedora 19 x86-64), either with the bundled
Emacs 24.3, or with the current trunk (bzr 114425).
Perhaps I'm not cutting or pasting properly....
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15344
; Package
emacs
.
(Sun, 22 Sep 2013 18:12:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 15344 <at> debbugs.gnu.org (full text, mbox):
Maybe this is a better way to describe how to reproduce the segfault:
Start with emacs -Q
C-x b * t e s t * <return> M-x c - m o d e <return>
i n t SPC t e s t ( i n t SPC * p ) ; C-SPC M-b M-b
M-b M-w C-e <return> # d e f i n e SPC T E S T ( p
) SPC C-y
I've had a look at the code but unfortunately I don't have enough
knowledge about the Emacs internals to understand what's going on.
Regards,
Lars Ljung
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15344
; Package
emacs
.
(Thu, 10 Oct 2013 21:19:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 15344 <at> debbugs.gnu.org (full text, mbox):
Lars Ljung wrote:
> Maybe this is a better way to describe how to reproduce the segfault:
>
> Start with emacs -Q
>
> C-x b * t e s t * <return> M-x c - m o d e <return>
> i n t SPC t e s t ( i n t SPC * p ) ; C-SPC M-b M-b
> M-b M-w C-e <return> # d e f i n e SPC T E S T ( p
> ) SPC C-y
Yes, that crashes 24.3 and current trunk for me too.
Some resemblence to http://debbugs.gnu.org/13743 ?
Added tag(s) confirmed.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 10 Oct 2013 21:20:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15344
; Package
emacs
.
(Mon, 13 Jan 2014 13:36:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 15344 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Here is a script to make debugging easier:
[reproduce-15344.el (application/emacs-lisp, attachment)]
[Message part 3 (text/plain, inline)]
FYI, it still manifests on trunk as of 2014-01-11.
--
Thien-Thi Nguyen
GPG key: 4C807502
(if you're human and you know it)
read my lisp: (responsep (questions 'technical)
(not (via 'mailing-list)))
=> nil
[Message part 4 (application/pgp-signature, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15344
; Package
emacs
.
(Mon, 13 Jan 2014 14:00:03 GMT)
Full text and
rfc822 format available.
Message #28 received at 15344 <at> debbugs.gnu.org (full text, mbox):
On 01/13/2014 05:39 AM, Thien-Thi Nguyen wrote:
> Here is a script to make debugging easier:
Thanks. Does this patch have any unwanted side effects? It seems
perfectly reasonable to me that we could reach the end of the interval
tree without finding anything to modify or going past our bound.
=== modified file 'src/textprop.c'
--- src/textprop.c 2014-01-01 07:43:34 +0000
+++ src/textprop.c 2014-01-13 13:56:18 +0000
@@ -1741,6 +1741,8 @@
}
len -= LENGTH (i);
i = next_interval (i);
+ if (!i)
+ return Qnil;
}
}
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15344
; Package
emacs
.
(Mon, 13 Jan 2014 14:12:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 15344 <at> debbugs.gnu.org (full text, mbox):
On 01/13/2014 05:59 AM, Daniel Colascione wrote:
> On 01/13/2014 05:39 AM, Thien-Thi Nguyen wrote:
>> Here is a script to make debugging easier:
>
> Thanks. Does this patch have any unwanted side effects? It seems
> perfectly reasonable to me that we could reach the end of the interval
> tree without finding anything to modify or going past our bound.
>
> === modified file 'src/textprop.c'
Actually, you probably want this one.
=== modified file 'src/textprop.c'
--- src/textprop.c 2014-01-01 07:43:34 +0000
+++ src/textprop.c 2014-01-13 14:07:21 +0000
@@ -1741,6 +1741,17 @@
}
len -= LENGTH (i);
i = next_interval (i);
+ if(!i)
+ if (modified)
+ {
+ if (BUFFERP (object))
+ signal_after_change (XINT (start),
+ XINT (end) - XINT (start),
+ XINT (end) - XINT (start));
+ return Qt;
+ }
+ else
+ return Qnil;
}
}
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15344
; Package
emacs
.
(Mon, 13 Jan 2014 16:21:01 GMT)
Full text and
rfc822 format available.
Message #34 received at 15344 <at> debbugs.gnu.org (full text, mbox):
> Date: Mon, 13 Jan 2014 06:11:29 -0800
> From: Daniel Colascione <dancol <at> dancol.org>
> Cc: Lars Ljung <lars <at> matholka.se>
>
> + if(!i)
> + if (modified)
> + {
> + if (BUFFERP (object))
> + signal_after_change (XINT (start),
> + XINT (end) - XINT (start),
> + XINT (end) - XINT (start));
> + return Qt;
> + }
> + else
> + return Qnil;
> }
Doesn't this give you a warning about ambiguous else?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15344
; Package
emacs
.
(Mon, 13 Jan 2014 18:34:01 GMT)
Full text and
rfc822 format available.
Message #37 received at 15344 <at> debbugs.gnu.org (full text, mbox):
On 01/13/2014 08:19 AM, Eli Zaretskii wrote:
>> Date: Mon, 13 Jan 2014 06:11:29 -0800
>> From: Daniel Colascione <dancol <at> dancol.org>
>> Cc: Lars Ljung <lars <at> matholka.se>
>>
>> + if(!i)
>> + if (modified)
>> + {
>> + if (BUFFERP (object))
>> + signal_after_change (XINT (start),
>> + XINT (end) - XINT (start),
>> + XINT (end) - XINT (start));
>> + return Qt;
>> + }
>> + else
>> + return Qnil;
>> }
>
> Doesn't this give you a warning about ambiguous else?
>
It does when I turn on warnings, yes. :-) I'll add braces when I check
it in.
Reply sent
to
Daniel Colascione <dancol <at> dancol.org>
:
You have taken responsibility.
(Mon, 13 Jan 2014 23:43:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Lars Ljung <lars <at> matholka.se>
:
bug acknowledged by developer.
(Mon, 13 Jan 2014 23:43:03 GMT)
Full text and
rfc822 format available.
Message #42 received at 15344-done <at> debbugs.gnu.org (full text, mbox):
Done
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 11 Feb 2014 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 133 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.