Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140241 - net-irc/xchat-2.6.4 segfaults when pasting newlines in message field
Summary: net-irc/xchat-2.6.4 segfaults when pasting newlines in message field
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Packages in net-irc
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-13 08:18 UTC by Martin Wegner
Modified: 2006-10-19 16:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge info (ei,3.42 KB, text/plain)
2006-07-13 08:21 UTC, Martin Wegner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Wegner 2006-07-13 08:18:57 UTC
If I paste newlines, e. g. marked in a gnome-terminal via middle-click, or copy (Shift-Ctrl-V) and paste (Ctrl-V) them into the message field of xchat, it segfaults. This is reproducible.

I rebuilt xchat with the following lines in /etc/make.conf:

CFLAGS="-pipe -g"
CXXFLAGS="${CFLAGS}"
USE="${USE} debug"
FEATURES="${FEATURES} nostrip keeptemp keepwork"

Then I did a backtrace using gdb:

$ gdb xchat-2
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) r
Starting program: /usr/bin/xchat-2
[Thread debugging using libthread_db enabled]
[New Thread -1220831568 (LWP 14528)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1220831568 (LWP 14528)]
0xb7c4fd26 in gtk_text_insert () from /usr/lib/libgtk-x11-2.0.so.0
(gdb)
#0  0xb7c4fd26 in gtk_text_insert () from /usr/lib/libgtk-x11-2.0.so.0
#1  0xb7c6964c in gtk_text_iter_ends_line () from /usr/lib/libgtk-x11-2.0.so.0
#2  0xb7c698b8 in gtk_text_iter_forward_to_line_end ()
   from /usr/lib/libgtk-x11-2.0.so.0
#3  0xb7c6e653 in gtk_text_iter_backward_search ()
   from /usr/lib/libgtk-x11-2.0.so.0
#4  0xb7dd7205 in gtkspell_get_from_text_view () from /usr/lib/libgtkspell.so.0
#5  0xb7dd7483 in gtkspell_get_from_text_view () from /usr/lib/libgtkspell.so.0
#6  0xb7dd77d7 in gtkspell_recheck_all () from /usr/lib/libgtkspell.so.0
#7  0xb7bc0de4 in gtk_marshal_BOOLEAN__VOID ()
   from /usr/lib/libgtk-x11-2.0.so.0
#8  0xb759b00f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#9  0xb75ac746 in g_signal_chain_from_overridden ()
   from /usr/lib/libgobject-2.0.so.0
#10 0xb75ad736 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#11 0xb75ad909 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#12 0xb7c5a554 in gtk_text_buffer_get_type () from /usr/lib/libgtk-x11-2.0.so.0
#13 0xb7c603c6 in gtk_text_buffer_insert_interactive ()
   from /usr/lib/libgtk-x11-2.0.so.0
#14 0xb7c612db in gtk_text_buffer_delete_selection ()
   from /usr/lib/libgtk-x11-2.0.so.0
#15 0xb7ae5551 in gtk_clipboard_wait_for_text ()
   from /usr/lib/libgtk-x11-2.0.so.0
#16 0xb7ae44e9 in gtk_clipboard_set_can_store ()
   from /usr/lib/libgtk-x11-2.0.so.0
#17 0xb7bc0d2a in gtk_marshal_BOOLEAN__VOID ()
   from /usr/lib/libgtk-x11-2.0.so.0
#18 0xb759b00f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#19 0xb75ac1a1 in g_signal_chain_from_overridden ()
   from /usr/lib/libgobject-2.0.so.0
#20 0xb75ad736 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#21 0xb75b0905 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#22 0xb7c19cd4 in gtk_selection_data_set_text ()
   from /usr/lib/libgtk-x11-2.0.so.0
#23 0xb7bc275e in gtk_marshal_BOOLEAN__VOID ()
   from /usr/lib/libgtk-x11-2.0.so.0
#24 0xb75997f9 in g_value_set_boxed () from /usr/lib/libgobject-2.0.so.0
#25 0xb759b00f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#26 0xb75ac316 in g_signal_chain_from_overridden ()
   from /usr/lib/libgobject-2.0.so.0
#27 0xb75ad300 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#28 0xb75ad909 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#29 0xb7cf4f2e in gtk_widget_get_default_style ()
   from /usr/lib/libgtk-x11-2.0.so.0
#30 0xb7bbd712 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#31 0xb7a2a65a in gdk_add_client_message_filter ()
   from /usr/lib/libgdk-x11-2.0.so.0
#32 0xb7520e82 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#33 0xb752167a in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#34 0xb752198e in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#35 0xb7bbd153 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#36 0x0805dbbf in fe_main () at fe-gtk.c:283
#37 0x080ab4ac in main (argc=1, argv=0xbfc6c6f4) at xchat.c:1033
Comment 1 Martin Wegner 2006-07-13 08:21:16 UTC
Created attachment 91642 [details]
emerge info
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-07-13 09:10:34 UTC
application/octet-stream
Comment 3 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-10 12:34:30 UTC
(In reply to comment #0)
> If I paste newlines, e. g. marked in a gnome-terminal via middle-click, or copy
> (Shift-Ctrl-V) and paste (Ctrl-V) them into the message field of xchat, it
> segfaults. This is reproducible.

Looks gtkspell related. Does that happen if you compile without spell in USE?

> CFLAGS="-pipe -g"
> CXXFLAGS="${CFLAGS}"
> USE="${USE} debug"
> FEATURES="${FEATURES} nostrip keeptemp keepwork"
 
why are you adding ${USE} to USE, respective FEATURES? portage adds stuff from env itself...
Comment 4 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-08-10 14:54:06 UTC
(In reply to comment #3)
> (In reply to comment #0)
> > If I paste newlines, e. g. marked in a gnome-terminal via middle-click, or copy
> > (Shift-Ctrl-V) and paste (Ctrl-V) them into the message field of xchat, it
> > segfaults. This is reproducible.
> 
> Looks gtkspell related. Does that happen if you compile without spell in USE?
> 
> > CFLAGS="-pipe -g"
> > CXXFLAGS="${CFLAGS}"
> > USE="${USE} debug"
> > FEATURES="${FEATURES} nostrip keeptemp keepwork"
> 
> why are you adding ${USE} to USE, respective FEATURES? portage adds stuff from
> env itself...
> 

Er, he is just taking his normal USE flags and adding debug... and taking his normal features and adding the 3 listed..it's an odd way of going about it, but perfectly legitimate.
Comment 5 Martin Wegner 2006-08-12 04:50:39 UTC
(In reply to comment #4)
> [...]
> Er, he is just taking his normal USE flags and adding debug... and taking his
> normal features and adding the 3 listed..it's an odd way of going about it, but
> perfectly legitimate.

You're right. I have these lines in my make.conf due to an other bug report. They were told me by a developer.

xchat-2.6.6 was released a few days ago and as far as I can see it now, the segfaults are gone. If you are interested in investigating this bug with 2.6.4 any further I'm willing to help so let me know. Otherwise I think this bug can be closed.
Comment 6 Markus Ullmann (RETIRED) gentoo-dev 2006-10-19 16:39:51 UTC
marking RESOLVED per comment #5