> Configuring OpenSSL v0.9.3a using solaris-sparc-cc as target failes the
> tests when using cc: WorkShop Compilers 5.0 98/12/15 C 5.0. The
> solaris-usparc-cc options seem to work with this compiler though.
> ...
> For what it might be worth, the final output from "make test" are:
> ...
> test a^b%c implementations
> ./exptest
>
> [where exptest goes into an infinite loop]
>
> test/bntest output ends with:
>
> test BN_rshift
> -B2DDB41D35D2AAFEBCC8CB658763C655AE8056E363F4DF842B / 2 -
>-596EDA0E9AE9557F5E6465B2C3B1E32AD7402B71B1FA6FC215
> Right shift test failed!
>
ATT: Rein Tollevik.
- apply Sun patch #107357-01 or later;
- rm crypto/bn/bn_div.o;
- make;
- make test;
If you don't have support contract and can't get 107357-xx, then
keep reading...
ATT: [EMAIL PROTECTED]
As you can guess from the above cc-5.0.FCS fails to compile
crypto/bn/bn_div.c. Here is a patch that circumvents the bug.
*** ./crypto/bn/bn_div.c.orig Wed Jun 9 15:27:28 1999
--- ./crypto/bn/bn_div.c Wed Jun 9 15:21:05 1999
***************
*** 215,224 ****
t1=((BN_ULLONG)n0<<BN_BITS2)|n1;
for (;;)
{
- t2=(BN_ULLONG)d1*q;
rem=t1-(BN_ULLONG)q*d0;
if ((rem>>BN_BITS2) ||
! (t2 <= ((BN_ULLONG)(rem<<BN_BITS2)+wnump[-2])))
break;
q--;
}
--- 215,224 ----
t1=((BN_ULLONG)n0<<BN_BITS2)|n1;
for (;;)
{
rem=t1-(BN_ULLONG)q*d0;
+ t2=(BN_ULLONG)d1*q;
if ((rem>>BN_BITS2) ||
! (t2 <= ((rem<<BN_BITS2)|wnump[-2])))
break;
q--;
}
Another (working) alternative is
rem=t1-(BN_ULLONG)q*d0;
if (rem>>BN_BITS2) break;
t2=(BN_ULLONG)d1*q;
if (t2 <= ((rem<<BN_BITS2)|wnump[-2])) break;
q--;
but it's compiled (naturally:-) with extra branch instructions which
might cost more than avoided multiplication...
As Mixmaster told us how to identify the patch, one can probably add
a warning message into config script.
Andy.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]