Bug#302389: marked as done (incorrect use of varargs in g_build_path, which breaks on (at least) powerpc)

Debian Bug Tracking System owner@bugs.debian.org
Tue, 12 Apr 2005 21:33:09 -0700


Your message dated Wed, 13 Apr 2005 01:07:41 +0200
with message-id <20050412230741.GA10367@country.grep.be>
and subject line Bug#302389: Acknowledgement (incorrect use of varargs in g_build_path, which breaks on (at least) powerpc)
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; 31 Mar 2005 15:40:35 +0000
>From wouter@country.nixsys.be Thu Mar 31 07:40:35 2005
Return-path: <wouter@country.nixsys.be>
Received: from country.nixsys.be [195.144.77.46] (Debian-exim)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DH1mc-0007jh-00; Thu, 31 Mar 2005 07:40:34 -0800
Received: from wouter by country.nixsys.be with local (Exim 4.50)
	id 1DH1mW-0004h2-Bz; Thu, 31 Mar 2005 17:40:28 +0200
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Wouter Verhelst <wouter@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: incorrect use of varargs in g_build_path, which breaks on (at least) powerpc
X-Mailer: reportbug 3.9
Date: Thu, 31 Mar 2005 17:40:28 +0200
Message-Id: <E1DH1mW-0004h2-Bz@country.nixsys.be>
Sender: "Wouter Verhelst,,," <wouter@country.nixsys.be>
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.3-1
Severity: normal

Hi,

stdarg(3) says, about va_arg:

       If  there  is  no  next argument, or if type is not compatible with the
       type of the actual next argument (as promoted according to the  default
       argument promotions), random errors will occur.

And yet, the file gfileutils.c contains (starting line 1140):

      if (next_element)
	{
	  element = next_element;
	  next_element = va_arg (args, gchar *);
	}
      else
	break;

which seems to try to find out whether there are any further arguments
by checking if the return value of va_arg is anything but NULL. This
isn't correct; it probably works on the developer's system, but on my
PowerBook the result is stack corruption and segfaults.

Fixing this would probably need an API change, unfortunately.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: powerpc (ppc)
Kernel: Linux 2.6.11.6
Locale: LANG=nl_BE.UTF-8@euro, LC_CTYPE=nl_BE.UTF-8@euro (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 302389-done) by bugs.debian.org; 13 Apr 2005 04:17:24 +0000
>From wouter@country.grep.be Tue Apr 12 21:17:24 2005
Return-path: <wouter@country.grep.be>
Received: from astra.telenet-ops.be [195.130.132.58] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DLZJc-0006iD-00; Tue, 12 Apr 2005 21:17:24 -0700
Received: from localhost (localhost.localdomain [127.0.0.1])
	by astra.telenet-ops.be (Postfix) with SMTP id 93AD932803A
	for <302389-done@bugs.debian.org>; Wed, 13 Apr 2005 06:17:22 +0200 (MEST)
Received: from western.grep.be (dD5E0678D.access.telenet.be [213.224.103.141])
	by astra.telenet-ops.be (Postfix) with ESMTP id 76EAA328018
	for <302389-done@bugs.debian.org>; Wed, 13 Apr 2005 06:17:22 +0200 (MEST)
Received: from [2001:838:37f:20:20d:93ff:fec0:b54a] (helo=country.grep.be)
	by western.grep.be with esmtp (Exim 4.50)
	id 1DLZJa-0008T6-4P
	for 302389-done@bugs.debian.org
	message size 1177; Wed, 13 Apr 2005 06:17:22 +0200
Received: from wouter by country.grep.be with local (Exim 4.50)
	id 1DLUTt-0002hM-6B
	for 302389-done@bugs.debian.org; Wed, 13 Apr 2005 01:07:41 +0200
Date: Wed, 13 Apr 2005 01:07:41 +0200
From: Wouter Verhelst <wouter@debian.org>
To: 302389-done@bugs.debian.org
Subject: Re: Bug#302389: Acknowledgement (incorrect use of varargs in g_build_path, which breaks on (at least) powerpc)
Message-ID: <20050412230741.GA10367@country.grep.be>
References: <E1DH1mW-0004h2-Bz@country.nixsys.be> <handler.302389.B.111228363529754.ack@bugs.debian.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <handler.302389.B.111228363529754.ack@bugs.debian.org>
X-Speed: Gates'' Law: Every 18 months, the speed of software halves.
Organization: The Debian Project, http://www.debian.org/
User-Agent: Mutt/1.5.9i
Sender: "Wouter Verhelst,,," <wouter@country.grep.be>
Delivered-To: 302389-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=-5.6 required=4.0 tests=BAYES_00,DATE_IN_PAST_03_06,
	HAS_BUG_NUMBER autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

(...)

OK, scratch that, I'm a moron. Properly reading the API documentation
before filing bugs is usually a good idea...

Sorry for the noise.

-- 
         EARTH
     smog  |   bricks
 AIR  --  mud  -- FIRE
soda water |   tequila
         WATER
 -- with thanks to fortune