Bug#324455: gmp: FTBFS on alpha

2005-08-24 Thread GOTO Masanori
At Tue, 23 Aug 2005 01:27:43 -0700,
Steve Langasek wrote:
  -   cmpult  Y, X, RV
  +   cmpule  Y, X, RV
  excb
  mt_fpcr $f3
  ldt $f0, 0(sp)
 
  but I don't have time for testing.
 
 Thanks, after looking at the diff between divq.S and divqu.S and doing a
 little googling (aka, the Babelfish methodology for learning assembly),
 I came to the same conclusion, and my test build of glibc just finished up
 -- this one-liner does indeed fix the problem.

I put this kind of patch with the additional fix for svn, it'll be
fixed in 2.3.5-5.

Regards,
-- gotom



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#324455: gmp: FTBFS on alpha

2005-08-23 Thread Steve Langasek
tags 324455 patch
thanks

Hi Falk,

On Tue, Aug 23, 2005 at 10:09:56AM +0200, Falk Hueffner wrote:
 Steve Langasek [EMAIL PROTECTED] writes:

  On Mon, Aug 22, 2005 at 08:56:23PM -0700, Steve Langasek wrote:
  Simple test case:
 
  int main() {
  
 unsigned long a= 1UL  63;
 unsigned long b= 1UL  63;
  
  exit (a/b != 1);
  }
 
  Appears to be a bug in the implementation of __divqu.  Upgrading to 
  2.3.5-4,
  to confirm whether the bug still exists.
 
  Yep, bug still present in 2.3.5-4.  Someone who speaks alpha assembly will
  have to look at this, I think, to pinpoint the error.

 probably something like

 --- divqu.S~2005-07-09 21:55:07.0 +0200
 +++ divqu.S 2005-08-23 10:04:09.0 +0200
 @@ -240,7 +240,7 @@
 /* If we get here, Y is so big that bit 63 is set.  The results
from the divide will be completely wrong.  Fortunately, the
quotient must be either 0 or 1, so just compute it directly.  */
 -   cmpult  Y, X, RV
 +   cmpule  Y, X, RV
 excb
 mt_fpcr $f3
 ldt $f0, 0(sp)

 but I don't have time for testing.

Thanks, after looking at the diff between divq.S and divqu.S and doing a
little googling (aka, the Babelfish methodology for learning assembly),
I came to the same conclusion, and my test build of glibc just finished up
-- this one-liner does indeed fix the problem.

Cheers,
-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/


signature.asc
Description: Digital signature


Bug#324455: gmp: FTBFS on alpha

2005-08-23 Thread Falk Hueffner
Steve Langasek [EMAIL PROTECTED] writes:

 On Mon, Aug 22, 2005 at 08:56:23PM -0700, Steve Langasek wrote:
 Simple test case:

 int main() {
 
  unsigned long a= 1UL  63;
  unsigned long b= 1UL  63;
 
 exit (a/b != 1);
 }

 Appears to be a bug in the implementation of __divqu.  Upgrading to 2.3.5-4,
 to confirm whether the bug still exists.

 Yep, bug still present in 2.3.5-4.  Someone who speaks alpha assembly will
 have to look at this, I think, to pinpoint the error.

probably something like

--- divqu.S~2005-07-09 21:55:07.0 +0200
+++ divqu.S 2005-08-23 10:04:09.0 +0200
@@ -240,7 +240,7 @@
/* If we get here, Y is so big that bit 63 is set.  The results
   from the divide will be completely wrong.  Fortunately, the
   quotient must be either 0 or 1, so just compute it directly.  */
-   cmpult  Y, X, RV
+   cmpule  Y, X, RV
excb
mt_fpcr $f3
ldt $f0, 0(sp)

but I don't have time for testing.

-- 
Falk


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#324455: gmp: FTBFS on alpha

2005-08-22 Thread Laurent Fousse
Package: gmp
Severity: serious
Justification: FTBFS

Hi,

gmp fails to build on alpha, see


http://buildd.debian.org/fetch.php?pkg=gmpver=4.1.4-10arch=alphastamp=1124596243file=logas=raw

I could reproduce it on our alpha machine at work. I tried to build
with gcc-3.4 or gcc-3.3 as a workaround but it failed at the same
point.

Cheers,

Laurent.


signature.asc
Description: Digital signature


Bug#324455: gmp: FTBFS on alpha

2005-08-22 Thread Laurent Fousse
* Steve M. Robbins [Mon, Aug 22, 2005 at 11:21:00AM -0400]:
  I could reproduce it on our alpha machine at work. I tried to build
  with gcc-3.4 or gcc-3.3 as a workaround but it failed at the same
  point.
 
 Could you do me a favour?  Try building with -O2.

The same test failed with -O2, gcc 4.0.1-5. Trying with gcc-3.4 now.


signature.asc
Description: Digital signature


Bug#324455: gmp: FTBFS on alpha

2005-08-22 Thread Steve M. Robbins
On Mon, Aug 22, 2005 at 10:10:30AM +0200, Laurent Fousse wrote:
 Package: gmp
 Severity: serious
 Justification: FTBFS
 
 Hi,
 
 gmp fails to build on alpha, see
 
 
 http://buildd.debian.org/fetch.php?pkg=gmpver=4.1.4-10arch=alphastamp=1124596243file=logas=raw
 
 I could reproduce it on our alpha machine at work. I tried to build
 with gcc-3.4 or gcc-3.3 as a workaround but it failed at the same
 point.

Could you do me a favour?  Try building with -O2.

The alpha buildd worked with debian revisions -7.1 and -8, but not
with -9 or -10.  The gmp code hasn't changed, but the compiler has.

Version -8 was compiled with

Toolchain package versions: libc6.1-dev_2.3.2.ds1-22 
linux-kernel-headers_2.6.12.0-1 gcc-4.0_4.0.0-12 g++-4.0_4.0.0-12 
binutils_2.16.1-1 libstdc++6-4.0-dev_4.0.0-12 libstdc++6_4.0.0-12

while version -9 was compiled with

Toolchain package versions: libc6.1-dev_2.3.5-3 
linux-kernel-headers_2.6.13+0rc3-1 gcc-4.0_4.0.1-3 g++-4.0_4.0.1-3 
binutils_2.16.1-2 libstdc++6-4.0-dev_4.0.1-3 libstdc++6_4.0.1-3


I'll also have a look for new patches on the gmp site, later tonight.

Thanks,
-Steve


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#324455: gmp: FTBFS on alpha

2005-08-22 Thread Laurent Fousse
* Laurent Fousse [Mon, Aug 22, 2005 at 05:42:32PM +0200]:
  Could you do me a favour?  Try building with -O2.
 
 The same test failed with -O2, gcc 4.0.1-5. Trying with gcc-3.4 now.

Failed with 3.4 and 3.3, both using -O2. Something is wrong in the
toolchain, only somewhere else.


signature.asc
Description: Digital signature


Bug#324455: gmp: FTBFS on alpha

2005-08-22 Thread Steve Langasek
On Mon, Aug 22, 2005 at 06:11:05PM +0200, Laurent Fousse wrote:
 * Laurent Fousse [Mon, Aug 22, 2005 at 05:42:32PM +0200]:
   Could you do me a favour?  Try building with -O2.

  The same test failed with -O2, gcc 4.0.1-5. Trying with gcc-3.4 now.

 Failed with 3.4 and 3.3, both using -O2. Something is wrong in the
 toolchain, only somewhere else.

FWIW, the test in question also fails when run against the *installed*
version of ligbgmp3 here.  So either this is a bug in both the old and new
builds of libgmp3 on alpha that has just never manifested anywhere else, or
there's a bug in the test case (either due to a changed test case or a
miscompilation).

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/


signature.asc
Description: Digital signature


Bug#324455: gmp: FTBFS on alpha

2005-08-22 Thread Steve Langasek
On Mon, Aug 22, 2005 at 06:11:05PM +0200, Laurent Fousse wrote:
 * Laurent Fousse [Mon, Aug 22, 2005 at 05:42:32PM +0200]:
   Could you do me a favour?  Try building with -O2.

  The same test failed with -O2, gcc 4.0.1-5. Trying with gcc-3.4 now.

 Failed with 3.4 and 3.3, both using -O2. Something is wrong in the
 toolchain, only somewhere else.

Ok, having looked at the test in greater detail, it seems to have just been
the luck of the draw that the test never failed before on alpha.

[EMAIL PROTECTED]:/home/devel/release/gmp-4.1.4/tests/mpz$ ./dive_ui 500
[EMAIL PROTECTED]:/home/devel/release/gmp-4.1.4/tests/mpz$ ./dive_ui 1000
mpz_divexact_ui wrong
a=1198415671637283
d=1198415671637283
q=1
  got=0
Aborted
$

Amusing that it's only dividing a number by itself that seems to give gmp
fits here. :-)  If I special-case q=1 out, I get a full sequence of 5000
tests without errors.  Other values that don't fail the test include
d=0x0056e18e03a9de91 and d=0x459f9e46f19b39d8; others that do include
d=0xa679fe5e2536755c and d=0xd2e85bb7873d8a7e.  Looks suspiciously like
signed/unsigned breakage, as only values with the high bit set appear to be
affected.

Will continue investigating.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/


signature.asc
Description: Digital signature


Bug#324455: gmp: FTBFS on alpha

2005-08-22 Thread Steve Langasek
reassign 324455 libc6.1 2.3.5-3
retitle 324455 regression from 2.3.2 in __divqu on alpha
thanks

On Mon, Aug 22, 2005 at 07:05:46PM -0700, Steve Langasek wrote:
 On Mon, Aug 22, 2005 at 06:11:05PM +0200, Laurent Fousse wrote:
  * Laurent Fousse [Mon, Aug 22, 2005 at 05:42:32PM +0200]:
Could you do me a favour?  Try building with -O2.

   The same test failed with -O2, gcc 4.0.1-5. Trying with gcc-3.4 now.

  Failed with 3.4 and 3.3, both using -O2. Something is wrong in the
  toolchain, only somewhere else.

 Ok, having looked at the test in greater detail, it seems to have just been
 the luck of the draw that the test never failed before on alpha.

 [EMAIL PROTECTED]:/home/devel/release/gmp-4.1.4/tests/mpz$ ./dive_ui 500
 [EMAIL PROTECTED]:/home/devel/release/gmp-4.1.4/tests/mpz$ ./dive_ui 1000
 mpz_divexact_ui wrong
 a=1198415671637283
 d=1198415671637283
 q=1
   got=0
 Aborted
 $

 Amusing that it's only dividing a number by itself that seems to give gmp
 fits here. :-)  If I special-case q=1 out, I get a full sequence of 5000
 tests without errors.  Other values that don't fail the test include
 d=0x0056e18e03a9de91 and d=0x459f9e46f19b39d8; others that do include
 d=0xa679fe5e2536755c and d=0xd2e85bb7873d8a7e.  Looks suspiciously like
 signed/unsigned breakage, as only values with the high bit set appear to be
 affected.

 Will continue investigating.

Buggy division function in glibc 2.3.5.

$ .libs/dive_ui
mpz_divexact_ui wrong
a=1198415671637283
d=1198415671637283
q=1
  got=0
Aborted
$ LD_LIBRARY_PATH=./libc6/lib/ ./libc6/lib/ld-linux.so.2 .libs/dive_ui  echo 
success
success
$

Simple test case:

int main() {

unsigned long a= 1UL  63;
unsigned long b= 1UL  63;

exit (a/b != 1);
}

Appears to be a bug in the implementation of __divqu.  Upgrading to 2.3.5-4,
to confirm whether the bug still exists.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/


signature.asc
Description: Digital signature


Bug#324455: gmp: FTBFS on alpha

2005-08-22 Thread Steve Langasek
On Mon, Aug 22, 2005 at 08:56:23PM -0700, Steve Langasek wrote:

 Buggy division function in glibc 2.3.5.

 $ .libs/dive_ui
 mpz_divexact_ui wrong
 a=1198415671637283
 d=1198415671637283
 q=1
   got=0
 Aborted
 $ LD_LIBRARY_PATH=./libc6/lib/ ./libc6/lib/ld-linux.so.2 .libs/dive_ui  
 echo success
 success
 $

 Simple test case:

 int main() {
 
   unsigned long a= 1UL  63;
   unsigned long b= 1UL  63;
 
 exit (a/b != 1);
 }

 Appears to be a bug in the implementation of __divqu.  Upgrading to 2.3.5-4,
 to confirm whether the bug still exists.

Yep, bug still present in 2.3.5-4.  Someone who speaks alpha assembly will
have to look at this, I think, to pinpoint the error.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/


signature.asc
Description: Digital signature