[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#177351: marked as done (libc6: calling semctl(2) causes process to seg Fault on PowerPC)



Your message dated Sat, 18 Jan 2003 20:09:46 -0500
with message-id <20030119010946.GA27725@nevyn.them.org>
and subject line Bug#177351: libc6: calling semctl(2) causes process to seg Fault on 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; 19 Jan 2003 00:26:53 +0000
>From etanol@botijo.homeunix.org Sat Jan 18 18:26:53 2003
Return-path: <etanol@botijo.homeunix.org>
Received: from 129.red-80-36-215.pooles.rima-tde.net (botijo) [80.36.215.129] 
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 18a3Ia-0000oh-00; Sat, 18 Jan 2003 18:26:52 -0600
Received: by botijo (Postfix, from userid 1000)
	id 58A3510931; Sun, 19 Jan 2003 01:26:50 +0100 (CET)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Isaac Jurado Peinado <etanol@mnm.uib.es>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libc6: calling semctl(2) causes process to seg Fault on PowerPC
X-Mailer: reportbug 2.10
Date: Sun, 19 Jan 2003 01:26:49 +0100
Message-Id: <[🔎] 20030119002650.58A3510931@botijo>
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=0.6 required=5.0
	tests=SPAM_PHRASE_00_01
	version=2.41
X-Spam-Level: 

Package: libc6
Version: 2.3.1-9
Severity: normal

If you call semctl(2) after sucessfully creating a new semaphore set
with semget(2) it produces a Segmentation Fault on PowerPC.  Sample
code:

int create_mutex(key_t clave)
{
	int mutex;

        mutex = semget(clave, 1, IPC_CREAT|IPC_EXCL|0640);
	if (mutex == -1) 
		mutex = semget(clave, 1, 0);
	else 
		if (semctl(mutex, 0, SETVAL, 1) == -1)
			throw_an_error();
        return mutex;
}

It works on i386 with the same version.

-- System Information:
Debian Release: testing/unstable
Architecture: ppc
Kernel: Linux butterfly 2.4.20-ben1 #2 vie ene 3 17:15:31 CET 2003 ppc 
Locale: LANG=es_ES@euro, LC_CTYPE=es_ES@euro

Versions of packages libc6 depends on:
ii  libdb1-compat                 2.1.3-7    The Berkeley database routines [gl

-- no debconf information


---------------------------------------
Received: (at 177351-done) by bugs.debian.org; 19 Jan 2003 01:09:44 +0000
>From drow@false.org Sat Jan 18 19:09:44 2003
Return-path: <drow@false.org>
Received: from crack.them.org [65.125.64.184] (mail)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 18a3y4-0002nr-00; Sat, 18 Jan 2003 19:09:44 -0600
Received: from nevyn.them.org ([66.93.61.169] ident=mail)
	by crack.them.org with asmtp (Exim 3.12 #1 (Debian))
	id 18a5qr-0002hs-00; Sat, 18 Jan 2003 21:10:25 -0600
Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian))
	id 18a3y6-0007EY-00; Sat, 18 Jan 2003 20:09:46 -0500
Date: Sat, 18 Jan 2003 20:09:46 -0500
From: Daniel Jacobowitz <dan@debian.org>
To: Isaac Jurado Peinado <etanol@mnm.uib.es>, 177351-done@bugs.debian.org
Subject: Re: Bug#177351: libc6: calling semctl(2) causes process to seg Fault on PowerPC
Message-ID: <20030119010946.GA27725@nevyn.them.org>
References: <[🔎] 20030119002650.58A3510931@botijo>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[🔎] 20030119002650.58A3510931@botijo>
User-Agent: Mutt/1.5.1i
Delivered-To: 177351-done@bugs.debian.org
X-Spam-Status: No, hits=-16.0 required=5.0
	tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,
	      SIGNATURE_SHORT_DENSE,SPAM_PHRASE_00_01,USER_AGENT,
	      USER_AGENT_MUTT
	version=2.41
X-Spam-Level: 

On Sun, Jan 19, 2003 at 01:26:49AM +0100, Isaac Jurado Peinado wrote:
> Package: libc6
> Version: 2.3.1-9
> Severity: normal
> 
> If you call semctl(2) after sucessfully creating a new semaphore set
> with semget(2) it produces a Segmentation Fault on PowerPC.  Sample
> code:
> 
> int create_mutex(key_t clave)
> {
> 	int mutex;
> 
>         mutex = semget(clave, 1, IPC_CREAT|IPC_EXCL|0640);
> 	if (mutex == -1) 
> 		mutex = semget(clave, 1, 0);
> 	else 
> 		if (semctl(mutex, 0, SETVAL, 1) == -1)
> 			throw_an_error();
>         return mutex;
> }
> 
> It works on i386 with the same version.

This is a bug in your code.  The fourth argument to semctl is a "union
semun", never an integer; on PowerPC this changes the calling
convention.  See the man page for semctl(2).

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Reply to: