Subject: Re: bc 1.04
To: Patrick Welche <>
From: Gerryt <>
List: current-users
Date: 07/10/1998 11:27:35
On Thu, 9 Jul 1998, Patrick Welche wrote:

::While "make tests" checking SSLeay's big number library, the bc 1.04
::we ship core dumped with:
::#0  0x4007ba90 in ?? () from /usr/lib/
::#1  0x11c64 in yy_n_chars ()
::#2  0x953f in rl_input (
::    buf=0x27000
::    "obase=16\nibase=16\nA7B92482456655B65E85E5DF9E313DB23F78151473B8B4C337EBD39D25F9719A52B0DAF67EB5EB806C9138853EE5EA56974A917BB619C9C9DA5C0107C1E4F468
::    + 3830800EBA57A635925B2CD64265FC285999D59CD1F6B563D2D"..., 
::    result=0x11c64, max=8192) at /usr/src/gnu/usr.bin/bc/scan.l:118
::#3  0x9fd4 in yy_get_next_buffer () at lex.yy.c:1519
::#4  0x9d3d in yylex () at lex.yy.c:1354
::#5  0x2f86 in yyparse () at
::#6  0x61e2 in main (argc=1, argv=0xefbfd65c)
::    at /usr/src/gnu/usr.bin/bc/main.c:219
::Building bc 1.05a cured the problem, so I didn't investigate
::further.. at least the big number library seems to work :)
Didnt help me : >

NetBSD-1.3.2 SPARC IPX make test fails here in randtest:

	for (i=0; i<16; i++)
	if (!((103 < d) && (d < 5740)))
		printf("test 2 failed, X=%ld.%02ld\n",d/100L,d%100L);

gdb reveals :
Breakpoint 4, main () at randtest.c:140
(gdb) print d
$1 = 1567982

Interestingly (sic), if you uncomment the test above this one
it passes...

If you run a make -k test :

Segmentation fault - core dumped
Segmentation fault - core dumped
cmp: EOF on ./p.clear
*** Error code 1 (continuing)
echo test normal x509v1 certificate
test normal x509v1 certificate
sh ./tx509 2>/dev/null
testing X509 conversions
p -> d
*** Error code 1 (continuing)
testing rsa conversions
p -> d
*** Error code 1 (continuing)
testing crl conversions
p -> d
*** Error code 1 (continuing)
testing session-id conversions
p -> d
*** Error code 1 (continuing)
testing req conversions
p -> d
*** Error code 1 (continuing)
testing pkcs7 conversions
p -> d
*** Error code 1 (continuing)
test a^b%c implementations

exptest hangs forever here...

didactic # gdb ./exptest 2960
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (sparc-netbsd), Copyright 1996 Free Software Foundation, Inc...

/usr/http/SSLeay-0.9.0b/test/2960: No such file or directory.
Attaching to program `/usr/http/SSLeay-0.9.0b/test/./exptest', process 2960
Reading symbols from /usr/libexec/
Reading symbols from /usr/lib/
bn_div64 (h=81920, l=0, d=2147483648) at bn_mulw.c:333
333                             t=(h-q*dh);

The values for h, q, dh, and t are all valid! 

You can recompile the lot w/o optimization and things still break
the same way..

Cheers, g.