Bug#295194: marked as done (libglib2.0-0: segfault in g_option_context_add_main_entries)

Debian Bug Tracking System owner@bugs.debian.org
Mon, 14 Feb 2005 07:18:12 -0800


Your message dated Mon, 14 Feb 2005 16:11:13 +0100
with message-id <1108393873.10481.23.camel@localhost.localdomain>
and subject line Bug#295194: libglib2.0-0: segfault in g_option_context_add_main_entries
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 14 Feb 2005 10:18:13 +0000
>From shlomme@gmx.net Mon Feb 14 02:18:13 2005
Return-path: <shlomme@gmx.net>
Received: from mx02.uni-tuebingen.de [134.2.3.12] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1D0dIz-0006of-00; Mon, 14 Feb 2005 02:18:13 -0800
Received: from zxmhn67.extern.uni-tuebingen.de (stud222246.studentenheim.uni-tuebingen.de [134.2.222.246])
	by mx02.uni-tuebingen.de (8.12.3/8.12.3) with ESMTP id j1EAIB4A009334;
	Mon, 14 Feb 2005 11:18:11 +0100
Message-Id: <200502141018.j1EAIB4A009334@mx02.uni-tuebingen.de>
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Torsten Marek <shlomme@gmx.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libglib2.0-0: segfault in g_option_context_add_main_entries
X-Mailer: reportbug 3.7.1
Date: Mon, 14 Feb 2005 11:18:05 +0100
X-AntiVirus: checked by AntiVir Milter 1.0.6; AVE 6.29.0.11; VDF 6.29.0.122
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Package: libglib2.0-0
Version: 2.6.2-1
Severity: normal

This little program makes gtk/glib segfault:
## start ##
#include <gtk/gtk.h>

int main(int argc, char** argv) 
{
    char** myargv = (char**)malloc(sizeof(char*)*3);
    int myargc = 2;
    
    myargv[0] = "test";
    myargv[1] = "-calendar";
    myargv[2] = 0;
    
    gtk_init(&myargc, &myargv);
    return 0;
}
## end ##

Backtrace:
Program received signal SIGSEGV, Segmentation fault.
0xb7b60266 in g_option_context_add_main_entries () from /usr/lib/libglib-2.0.so.0
(gdb) backtrace
#0  0xb7b60266 in g_option_context_add_main_entries () from /usr/lib/libglib-2.0.so.0
#1  0xb7b60443 in g_option_context_parse () from /usr/lib/libglib-2.0.so.0
#2  0xb7e1c78e in gtk_parse_args () from /usr/lib/libgtk-x11-2.0.so.0
#3  0xb7e1c7c6 in gtk_init_check () from /usr/lib/libgtk-x11-2.0.so.0
#4  0xb7e1c816 in gtk_init () from /usr/lib/libgtk-x11-2.0.so.0
#5  0x0804875d in main (argc=1, argv=0xbffff824) at checkargs.c:12

If I change "-calendar" into "--calendar", no segmentation violation takes place.
This bug occurs when running mozilla-sunbird (both prebuilt versions from mozilla.org
and cvs builds).

greetings

Torsten


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-ck5
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages libglib2.0-0 depends on:
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an

-- no debconf information

---------------------------------------
Received: (at 295194-done) by bugs.debian.org; 14 Feb 2005 15:11:46 +0000
>From seb128@debian.org Mon Feb 14 07:11:45 2005
Return-path: <seb128@debian.org>
Received: from smtp4.wanadoo.fr [193.252.22.27] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1D0ht3-0006I2-00; Mon, 14 Feb 2005 07:11:45 -0800
Received: from me-wanadoo.net (localhost [127.0.0.1])
	by mwinf0412.wanadoo.fr (SMTP Server) with ESMTP id 5B9261C00189;
	Mon, 14 Feb 2005 16:11:14 +0100 (CET)
Received: from [192.168.0.2] (ANancy-151-1-29-110.w83-194.abo.wanadoo.fr [83.194.207.110])
	by mwinf0412.wanadoo.fr (SMTP Server) with ESMTP id EFE7D1C00165;
	Mon, 14 Feb 2005 16:11:13 +0100 (CET)
X-ME-UUID: 20050214151113982.EFE7D1C00165@mwinf0412.wanadoo.fr
Subject: Re: Bug#295194: libglib2.0-0: segfault in
	g_option_context_add_main_entries
From: Sebastien Bacher <seb128@debian.org>
To: 295194-done@bugs.debian.org, Torsten Marek <shlomme@gmx.net>
In-Reply-To: <200502141018.j1EAIB4A009334@mx02.uni-tuebingen.de>
References: <200502141018.j1EAIB4A009334@mx02.uni-tuebingen.de>
Content-Type: text/plain; charset=ISO-8859-15
Date: Mon, 14 Feb 2005 16:11:13 +0100
Message-Id: <1108393873.10481.23.camel@localhost.localdomain>
Mime-Version: 1.0
X-Mailer: Evolution 2.1.5 
Content-Transfer-Encoding: quoted-printable
Delivered-To: 295194-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-4.8 required=4.0 tests=BAYES_00,FROM_ENDS_IN_NUMS,
	HAS_BUG_NUMBER autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Le lundi 14 f=E9vrier 2005 =E0 11:18 +0100, Torsten Marek a =E9crit :

>If I change "-calendar" into "--calendar", no segmentation violation tak=
es place.
>This bug occurs when running mozilla-sunbird (both prebuilt versions fro=
m mozilla.org
>and cvs builds).

Hi,

Are you speaking about this bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=3D74303 (comment #24) ?

This is a firefox issue, gtk_init remove the parsed options and update
argc but firefox doesn't use the updated value.

You program is not correct, you should not change the argc/argv values,
argc is the number of elements in argv. I'm closing this bug since
that's not a glib one.


Cheers,

Sebastien Bacher