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

Bug#153762: marked as done (libc6: Broken __moddi3 implementation)



Your message dated Fri, 05 Aug 2005 19:15:42 +0900
with message-id <[🔎] 81psssu1td.wl%gotom@debian.or.jp>
and subject line Close bugs tagged as woody
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; 21 Jul 2002 18:19:39 +0000
>From jk@blackdown.de Sun Jul 21 13:19:39 2002
Return-path: <jk@blackdown.de>
Received: from mail.blackdown.de (zaphod.blackdown.de) [62.159.133.162] 
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 17WLIw-0003q6-00; Sun, 21 Jul 2002 13:19:38 -0500
Received: from marvin.blackdown.de ([62.159.133.166])
	by zaphod.blackdown.de with esmtp (Exim 3.35 #1 (Debian))
	id 17WLIu-0000Nu-00; Sun, 21 Jul 2002 20:19:36 +0200
Received: from jk by marvin.blackdown.de with local (Exim 3.35 #1 (Debian))
	id 17WLIt-0002FF-00; Sun, 21 Jul 2002 20:19:35 +0200
Subject: libc6: Broken __moddi3 implementation
From: "Juergen Kreileder" <jk@blackdown.de>
To: "Debian Bug Tracking System" <submit@bugs.debian.org>
X-Mailer: reportbug 1.99.47
Date: Sun, 21 Jul 2002 20:19:35 +0200
Message-Id: <E17WLIt-0002FF-00@marvin.blackdown.de>
Delivered-To: submit@bugs.debian.org

Package: libc6
Version: 2.2.5-12
Severity: important
Tags: patch

__moddi3 returns results with wrong sign if the second argument is
negative:

Example:

,----[ modtest.c ]
| #include <stdio.h>
| typedef long long s8;
| void printMod(s8 a, s8 b)
| {
|    printf("%lld %% %lld = %lld\n", a, b, a%b); 
| }
| int main(void)
| {
|    printMod(-10L, -7L);
|    printMod(-10L, 7L);
|    printMod(10L, -7L);
|    printMod(10L, 7L);
|    return 0;
| }
`----

gcc -o modtest_good modtest.c
gcc -o modtest_bad  modtest.c -lc

Output of modtest_good: (correct)
-10 % -7 = -3
-10 % 7 = -3
10 % -7 = 3
10 % 7 = 3

Output of modtest_bad: (incorrect)
-10 % -7 = 3
-10 % 7 = -3
10 % -7 = -3
10 % 7 = 3


libc6 in woody has the same problem.


Here's a patch from upstream (glibc-2-2-branch) which fixes the problem:

http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-32/divdi3.c.diff?r1=1.1.2.1&r2=1.1.2.2&cvsroot=glibc

--- libc/sysdeps/wordsize-32/divdi3.c	2002/02/28 19:38:59	1.1.2.1
+++ libc/sysdeps/wordsize-32/divdi3.c	2002/05/30 23:59:11	1.1.2.2
@@ -301,10 +301,7 @@
       u = -u;
     }
   if (v < 0)
-    {
-      c = ~c;
-      v = -v;
-    }
+    v = -v;
   __udivmoddi4 (u, v, &w);
   if (c)
     w = -w;


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux marvin 2.4.19-rc1-ac2 #1 SMP Fri Jul 12 18:44:39 CEST 2002 i686
Locale: LANG=en_US, LC_CTYPE=en_US

-- no debconf information


---------------------------------------
Received: (at 153762-done) by bugs.debian.org; 5 Aug 2005 10:15:49 +0000
>From gotom@debian.or.jp Fri Aug 05 03:15:49 2005
Return-path: <gotom@debian.or.jp>
Received: from omega.webmasters.gr.jp (webmasters.gr.jp) [218.44.239.78] 
	by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
	id 1E0zEy-0001Gb-00; Fri, 05 Aug 2005 03:15:49 -0700
Received: from omega.webmasters.gr.jp (localhost [127.0.0.1])
	by webmasters.gr.jp (Postfix) with ESMTP id B0A5CDEB83;
	Fri,  5 Aug 2005 19:15:42 +0900 (JST)
Date: Fri, 05 Aug 2005 19:15:42 +0900
Message-ID: <[🔎] 81psssu1td.wl%gotom@debian.or.jp>
From: GOTO Masanori <gotom@debian.org>
To: 153263-done@bugs.debian.org, 121396-done@bugs.debian.org,
	142379-done@bugs.debian.org, 153762-done@bugs.debian.org,
	159411-done@bugs.debian.org, 165760-done@bugs.debian.org,
	169758-done@bugs.debian.org, 173486-done@bugs.debian.org,
	194339-done@bugs.debian.org, 196291-done@bugs.debian.org,
	248271-done@bugs.debian.org, 294903-done@bugs.debian.org,
	165921-done@bugs.debian.org, 205039-done@bugs.debian.org,
	294483-done@bugs.debian.org, 240608-done@bugs.debian.org,
	245029-done@bugs.debian.org, 295618-done@bugs.debian.org,
	156937-done@bugs.debian.org, 161515-done@bugs.debian.org,
	188843-done@bugs.debian.org, 212697-done@bugs.debian.org,
	247223-done@bugs.debian.org, 250055-done@bugs.debian.org,
	262162-done@bugs.debian.org, 290518-done@bugs.debian.org,
	188589-done@bugs.debian.org, 209095-done@bugs.debian.org,
	debian-glibc@lists.debian.org
Subject: Close bugs tagged as woody
User-Agent: Wanderlust/2.11.30 (Wonderwall) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.4 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)
MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")
Content-Type: text/plain; charset=US-ASCII
Delivered-To: 153762-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-Level: 
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 4

These bugs are tagged as woody, because they're well-known problems
and for keeping open to come to light what the problem is.  However,
as you know, sarge was released.  Our stable version was moved from
woody to sarge.  It's high time to close old woody's bugs that are
still open.  Now I close these bugs.  If you have any objections to
close them, please reopen and let us know your trouble.

Regards,
-- gotom



Reply to: