Port-sparc archive

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

Re: OpenSSL issues with 9.2



Matt Wallis <mattw%madmonks.org@localhost> writes:

>> On 25 May 2021, at 20:30, Martin Husemann <martin%duskware.de@localhost> wrote:
>> If you get core files, it should be very simple to pinpoint the wrong
>> instruction with gdb. Even simpler if you installed the debug sets.

You may wish to do your own build without as much optimization, of
perhaps just openssl.   This can be done cross on a fast machine, via build.sh.

> OK, I am unfortunately none the wiser. Hopefully this will mean something to 
> someone else. There’s both a short and full bt.
>
> Program terminated with signal SIGABRT, Aborted.
> #0 about () at /usr/src/lib/libc/stdlib/about.c:80
> 80.                 (void)signal(SIGABRT, SIG_DFL);
>
> (gdb) bt
> #0  abort () at /usr/src/lib/libc/stdlib/abort.c:80
> #1  0xeda19fc8 in __assert13 (
>     file=0xedda9630 "/usr/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_div
>     failedexpr=0xedda9670 "(*wnumtop) == 0")
>     at /usr/src/lib/libc/gen/assert.c:72

So the issue was *wnumtop not being zero, in frame 2, and then one has to figure out why.

> (gdb) info locals
> mask = {__bits = {4294967263, 4294967295, 4294967295, 4294967295}}
>
> #2  0xedd466e0 in bn_div_fixed_top (dv=dv@entry=0x0, rm=rm@entry=0xed92020c,
>     num=num@entry=0xefffe77c, divisor=divisor@entry=0xed9201f8,
>     ctx=ctx@entry=0xedeba120)
>     at /usr/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_div.c:439
>         q = 0
>         l0 = <optimized out>
>         n0 = <optimized out>
>         n1 = <optimized out>
>         rem = <optimized out>
>         norm_shift = <optimized out>
>         i = 1
>         j = <optimized out>
>         loop = <optimized out>
>         tmp = 0xed920298
>         snum = 0xed9202ac
>         sdiv = 0xed920300
>         res = <optimized out>
>         resp = 0xedef6144
>         wnum = 0xedeb7d10
>         wnumtop = 0xedeb7d14
>         d0 = 2839579553
>         d1 = 0
>         num_n = <optimized out>
>         div_n = 1
>         __func__ = "bn_div_fixed_top"

Unfortunately you are in a fairly sparse space, in terms of how many
people are using sparc.  But I would expect some others, and there are
test runs in qemu:

  http://releng.netbsd.org/b5reports/sparc/

but only on head, not the netbsd-9 branch.

If you have a fast machine and can run anita/qemu, you could test the
build you are installing.    I can try to test a build of netbsd-9.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index