bugGNU Source Installer - Bugs: bug #23671, sourceinstall-gtk segmentation...

 
 

bug #23671: sourceinstall-gtk segmentation faults on a 64bit GnuLinux platform

Submitted by:  Nicola Fontana <ntd>
Submitted on:  Sun 22 Jun 2008 01:59:58 PM UTC  
 
Category: User InterfaceSeverity: 4 - Important
Status: FixedAssigned to: Claudio Fontana <sick_soul>
Open/Closed: Closed
Additional Notes: 

uname -a:

Linux amd64 2.6.24.4-ntd #1 SMP PREEMPT Tue Apr 1 17:09:35 CEST 2008 x86_64 x86_64 x86_64 GNU/Linux

Backtrace:

#0 0x00002b8201f76ba0 in strlen () from /lib64/libc.so.6
#1 0x00002b8201c89b63 in g_strdup () from /usr/lib64/libglib-2.0.so.0
#2 0x00002b820162d0e8 in ?? () from /usr/lib64/libgobject-2.0.so.0
#3 0x00002b8201613dbb in g_object_new_valist ()
from /usr/lib64/libgobject-2.0.so.0
#4 0x00002b8201613ff8 in g_object_new () from /usr/lib64/libgobject-2.0.so.0
#5 0x00002b82004036c5 in gtk_button_new_from_stock ()
from /usr/lib64/libgtk-x11-2.0.so.0
#6 0x00002b82004400d1 in gtk_dialog_add_button ()
from /usr/lib64/libgtk-x11-2.0.so.0
#7 0x00002b8200440138 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
#8 0x00002b8200440520 in gtk_dialog_new_with_buttons ()
from /usr/lib64/libgtk-x11-2.0.so.0
#9 0x000000000040bea1 in dialog_create_msgbox_scroll ()
#10 0x000000000040bfa9 in dialog_confirm ()
#11 0x000000000040d222 in gui_action_uninstall ()
#12 0x00002b82016107a9 in g_closure_invoke ()
from /usr/lib64/libgobject-2.0.so.0
#13 0x00002b820161b9b1 in ?? () from /usr/lib64/libgobject-2.0.so.0
#14 0x00002b820161ca7e in g_signal_emit_valist ()
from /usr/lib64/libgobject-2.0.so.0
#15 0x00002b820161f4d6 in g_signal_emit_by_name ()
from /usr/lib64/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#16 0x00002b82016107a9 in g_closure_invoke ()
from /usr/lib64/libgobject-2.0.so.0
#17 0x00002b820161b9b1 in ?? () from /usr/lib64/libgobject-2.0.so.0
#18 0x00002b820161ca7e in g_signal_emit_valist ()
from /usr/lib64/libgobject-2.0.so.0
#19 0x00002b820161cbd3 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#20 0x00002b8200404b49 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
#21 0x00002b82016107a9 in g_closure_invoke ()
from /usr/lib64/libgobject-2.0.so.0
#22 0x00002b820161b657 in ?? () from /usr/lib64/libgobject-2.0.so.0
#23 0x00002b820161ca7e in g_signal_emit_valist ()
from /usr/lib64/libgobject-2.0.so.0
#24 0x00002b820161cbd3 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#25 0x00002b8200403509 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
#26 0x00002b82004aa28f in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
#27 0x00002b82016107a9 in g_closure_invoke ()
from /usr/lib64/libgobject-2.0.so.0
#28 0x00002b820161bb45 in ?? () from /usr/lib64/libgobject-2.0.so.0
#29 0x00002b820161c6f2 in g_signal_emit_valist ()
from /usr/lib64/libgobject-2.0.so.0
#30 0x00002b820161cbd3 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#31 0x00002b820058113e in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
#32 0x00002b82004a5061 in gtk_propagate_event ()
---Type <return> to continue, or q <return> to quit---
from /usr/lib64/libgtk-x11-2.0.so.0
#33 0x00002b82004a5e4b in gtk_main_do_event ()
from /usr/lib64/libgtk-x11-2.0.so.0
#34 0x00002b82008e106c in ?? () from /usr/lib64/libgdk-x11-2.0.so.0
#35 0x00002b8201c70091 in g_main_context_dispatch ()
from /usr/lib64/libglib-2.0.so.0
#36 0x00002b8201c72be5 in ?? () from /usr/lib64/libglib-2.0.so.0
#37 0x00002b8201c72ec6 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#38 0x00002b82004a6232 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0
#39 0x0000000000407e59 in main ()

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 23 Jun 2008 05:12:30 PM UTC, comment #3:

I tested sourceinstall-gtk more extensively, building the whole gtk chain, deleting and upgrading here and there, and the program works great.

I've a couple of suggestions to improve usability: if you agree I could open new tracks (in the bug tracker I suppose) or if you prefer I can send you a private message before, just to avoid polluting the tracker.

Nicola Fontana <ntd>
Sun 22 Jun 2008 04:53:33 PM UTC, comment #2:

I gave a quick try to your cvs snapshot: both the uninstall and update package commands now work as expected.

I'm going to use sourceinstall-gtk quite extensively next week, so I'll keep you up to date in case I'll experience some other problems.

Thank you for this project.

Nicola Fontana <ntd>
Sun 22 Jun 2008 04:08:42 PM UTC, comment #1:

Thank you for finding this nasty portability bug.
I have tried to address all such problems in the code,
and have committed a fix to cvs.

-cvs builds have been uploaded to the download area @
ftp://ftp.gnu.org/gnu/sourceinstall

Could you test those latest cvs builds for me?

Thanks - Claudio

libsrcinst/ChangeLog:
---------------------
2008-06-22 Claudio Fontana <claudio@gnu.org>

fix serious portability problem for 64bit archs (bug #23671)

* actions.c, mf_features.c, package_info.c, srccfgopt.c, srcexport.c, string_list.c:
replace 0 with (void *)0 in variable argument function calls,
when passing pointers.
Thanks to Nicola Fontana for finding the bug.
---------------------
sourceinstall-gtk/ChangeLog:
---------------------
2008-06-22 Claudio Fontana <claudio@gnu.org>

fix serious portability problem for 64bit archs (bug #23671)
* gui.c, dialog.c: replace 0 pointers with NULL in vararg func calls.
Thanks to Nicola Fontana for finding the bug.
---------------------

Claudio Fontana <sick_soul>
Project AdministratorIn charge of this item.
Sun 22 Jun 2008 01:59:58 PM UTC, original submission:

I'm experiencing segmentation faults while trying to uninstall (after clicking the toolbutton) or update packages (after chosing the tarball). Tests were done on 2.5-rc1 release.

Digging a bit in the code, I found it uses 0 instead of NULL.
Specifically, in the dialog.c the dialogs are created in such way:

msgbox = gtk_dialog_new_with_buttons(wintitle,
GTK_WINDOW(w_main[W_MAIN]),
GTK_DIALOG_MODAL,
GTK_STOCK_YES,
GTK_RESPONSE_YES,
GTK_STOCK_NO,
GTK_RESPONSE_NO,
0);

gtk_dialog_new_with_buttons() takes variadic arguments so no
casting is performed. What I guess is the last argument is
passed throught as integer. Being on a 64bit platform, I have
sizeof(void*) = 8 and sizeof(int) = 4, so the list is likely not
NULL terminated.

Changing 0 to NULL (I tried only on the rilevant YESNO dialog) and recompiling solves this issue.

Nicola Fontana <ntd>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by sick_soul (Posted a comment)
  • -unavailable- added by ntd (Submitted the item)
  • -unavailable- added by ntd
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 23 Jun 2008 05:16:48 PM UTCsick_soulStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Sun 22 Jun 2008 04:08:42 PM UTCsick_soulSeverity3 - Normal=>4 - Important
      StatusNone=>Ready For Test
      Assigned toNone=>sick_soul
    Sun 22 Jun 2008 01:59:58 PM UTCntdCarbon-Copy-=>Added ntd

    Back to the top


    Powered by Savane 3.1-cleanup1