Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Mar 2023 21:26:44 +0000 (UTC)
From:      Andrew Terekhov <andrew_terekhov@yahoo.com>
To:        "ports@freebsd.org" <ports@freebsd.org>, Yuri <yuri@aetern.org>
Subject:   Re: Segmentation fault when amule starts
Message-ID:  <446577808.2072737.1680038804540@mail.yahoo.com>
In-Reply-To: <bbcb8a7c-ad97-23a3-683f-77d189246439@aetern.org>
References:  <1889988356.2071741.1680037766388.ref@mail.yahoo.com> <1889988356.2071741.1680037766388@mail.yahoo.com> <bbcb8a7c-ad97-23a3-683f-77d189246439@aetern.org>

next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_2072736_1596896837.1680038804537
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

 Thanks a lot, Yuri, worked like a charm.

    On Tuesday, March 28, 2023 at 01:19:03 PM GMT-8, Yuri <yuri@aetern.org>=
 wrote: =20
=20
 Andrew Terekhov wrote:
> Hi,
>=20
> My system is:
>=20
> $ uname -a
> FreeBSD obama 13.1-RELEASE-p6 FreeBSD 13.1-RELEASE-p6 GENERIC amd64
>=20
> fully updated wrt to packages and ports.
>=20
> I installed amule package and it segfaulted when started. So I enabled
> debug info for ports and rebuilt amule as port. What else can I do to
> help fix the problem?

Try the solution from forums:

https://forums.freebsd.org/threads/amule-wont-run-on-freebsd-13-1-release-b=
ecause-segmentation-fault-error.87980/post-597909


> Below is where it crashes:
>=20
>=20
> $ lldb amule
> (lldb) target create "amule"
> Current executable set to 'amule' (x86_64).
> (lldb) run
> Process 22227 launched: '/usr/local/bin/amule' (x86_64)
> Process 22227 stopped
> * thread #1, name =3D 'amule', stop reason =3D signal SIGSEGV: invalid
> address (fault address: 0x10)
> =C2=A0=C2=A0=C2=A0 frame #0: 0x0000000801699e85 libcryptopp.so.8`CryptoPP=
::(anonymous
> namespace)::SHA256_HashBlock_CXX(state=3D0x0000000000000010,
> data=3D0x00007fffffffd440) at sha.cpp:424:5
> =C2=A0=C2=A0 384 =C2=A0=C2=A0 =C2=A0
> =C2=A0=C2=A0 385 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 input +=3D SHA1::BLOCKSIZE/sizeof(word32);
> =C2=A0=C2=A0 386 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 length -=3D SHA1::BLOCKSIZE;
> =C2=A0=C2=A0 387 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 }
> =C2=A0=C2=A0 388 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 while (length >=3D=
 SHA1::BLOCKSIZE);
> =C2=A0=C2=A0 389 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 return length;
> =C2=A0=C2=A0 390 =C2=A0=C2=A0 =C2=A0}
> =C2=A0=C2=A0 391 =C2=A0=C2=A0 =C2=A0
> =C2=A0=C2=A0 392 =C2=A0=C2=A0 =C2=A0// **********************************=
***************************
> =C2=A0=C2=A0 393 =C2=A0=C2=A0 =C2=A0
> =C2=A0=C2=A0 394 =C2=A0=C2=A0 =C2=A0ANONYMOUS_NAMESPACE_BEGIN
> =C2=A0=C2=A0 395 =C2=A0=C2=A0 =C2=A0
> =C2=A0=C2=A0 396 =C2=A0=C2=A0 =C2=A0#define a(i) T[(0-i)&7]
> =C2=A0=C2=A0 397 =C2=A0=C2=A0 =C2=A0#define b(i) T[(1-i)&7]
> =C2=A0=C2=A0 398 =C2=A0=C2=A0 =C2=A0#define c(i) T[(2-i)&7]
> =C2=A0=C2=A0 399 =C2=A0=C2=A0 =C2=A0#define d(i) T[(3-i)&7]
> =C2=A0=C2=A0 400 =C2=A0=C2=A0 =C2=A0#define e(i) T[(4-i)&7]
> =C2=A0=C2=A0 401 =C2=A0=C2=A0 =C2=A0#define f(i) T[(5-i)&7]
> =C2=A0=C2=A0 402 =C2=A0=C2=A0 =C2=A0#define g(i) T[(6-i)&7]
> =C2=A0=C2=A0 403 =C2=A0=C2=A0 =C2=A0#define h(i) T[(7-i)&7]
> =C2=A0=C2=A0 404 =C2=A0=C2=A0 =C2=A0
> =C2=A0=C2=A0 405 =C2=A0=C2=A0 =C2=A0#define blk0(i) (W[i] =3D data[i])
> =C2=A0=C2=A0 406 =C2=A0=C2=A0 =C2=A0#define blk2(i)
> (W[i&15]+=3Ds1(W[(i-2)&15])+W[(i-7)&15]+s0(W[(i-15)&15]))
> =C2=A0=C2=A0 407 =C2=A0=C2=A0 =C2=A0
> =C2=A0=C2=A0 408 =C2=A0=C2=A0 =C2=A0#define Ch(x,y,z) (z^(x&(y^z)))
> =C2=A0=C2=A0 409 =C2=A0=C2=A0 =C2=A0#define Maj(x,y,z) (y^((x^y)&(y^z)))
> =C2=A0=C2=A0 410 =C2=A0=C2=A0 =C2=A0
> =C2=A0=C2=A0 411 =C2=A0=C2=A0 =C2=A0#define R(i)
> h(i)+=3DS1(e(i))+Ch(e(i),f(i),g(i))+SHA256_K[i+j]+(j?blk2(i):blk0(i));\
> =C2=A0=C2=A0 412 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 d(i)+=3Dh(i);h(i)+=
=3DS0(a(i))+Maj(a(i),b(i),c(i))
> =C2=A0=C2=A0 413 =C2=A0=C2=A0 =C2=A0
> =C2=A0=C2=A0 414 =C2=A0=C2=A0 =C2=A0// for SHA256
> =C2=A0=C2=A0 415 =C2=A0=C2=A0 =C2=A0#define s0(x) (rotrConstant<7>(x)^rot=
rConstant<18>(x)^(x>>3))
> =C2=A0=C2=A0 416 =C2=A0=C2=A0 =C2=A0#define s1(x) (rotrConstant<17>(x)^ro=
trConstant<19>(x)^(x>>10))
> =C2=A0=C2=A0 417 =C2=A0=C2=A0 =C2=A0#define S0(x)
> (rotrConstant<2>(x)^rotrConstant<13>(x)^rotrConstant<22>(x))
> =C2=A0=C2=A0 418 =C2=A0=C2=A0 =C2=A0#define S1(x)
> (rotrConstant<6>(x)^rotrConstant<11>(x)^rotrConstant<25>(x))
> =C2=A0=C2=A0 419 =C2=A0=C2=A0 =C2=A0
> =C2=A0=C2=A0 420 =C2=A0=C2=A0 =C2=A0void SHA256_HashBlock_CXX(word32 *sta=
te, const word32 *data)
> =C2=A0=C2=A0 421 =C2=A0=C2=A0 =C2=A0{
> =C2=A0=C2=A0 422 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 word32 W[16]=3D{0}=
, T[8];
> =C2=A0=C2=A0 423 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 /* Copy context->s=
tate[] to working vars */
> -> 424 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 memcpy(T, state, sizeof(T));
> =C2=A0=C2=A0 425 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 /* 64 operations, =
partially loop unrolled */
> =C2=A0=C2=A0 426 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 for (unsigned int =
j=3D0; j<64; j+=3D16)
> =C2=A0=C2=A0 427 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 {
> =C2=A0=C2=A0 428 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 R( 0); R( 1); R( 2); R( 3);
> =C2=A0=C2=A0 429 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 R( 4); R( 5); R( 6); R( 7);
> =C2=A0=C2=A0 430 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 R( 8); R( 9); R(10); R(11);
> =C2=A0=C2=A0 431 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 R(12); R(13); R(14); R(15);
> =C2=A0=C2=A0 432 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 }
> =C2=A0=C2=A0 433 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 /* Add the working=
 vars back into context.state[] */
> =C2=A0=C2=A0 434 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 state[0] +=3D a(0)=
;
> =C2=A0=C2=A0 435 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 state[1] +=3D b(0)=
;
> =C2=A0=C2=A0 436 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 state[2] +=3D c(0)=
;
> =C2=A0=C2=A0 437 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 state[3] +=3D d(0)=
;
> =C2=A0=C2=A0 438 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 state[4] +=3D e(0)=
;
> =C2=A0=C2=A0 439 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 state[5] +=3D f(0)=
;
> =C2=A0=C2=A0 440 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 state[6] +=3D g(0)=
;
> =C2=A0=C2=A0 441 =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 state[7] +=3D h(0)=
;
> =C2=A0=C2=A0 442 =C2=A0=C2=A0 =C2=A0}
> =C2=A0=C2=A0 443 =C2=A0=C2=A0 =C2=A0
> =C2=A0=C2=A0 444 =C2=A0=C2=A0 =C2=A0#undef Ch
> (lldb) bt
> * thread #1, name =3D 'amule', stop reason =3D signal SIGSEGV: invalid
> address (fault address: 0x10)
> =C2=A0 * frame #0: 0x0000000801699e85 libcryptopp.so.8`CryptoPP::(anonymo=
us
> namespace)::SHA256_HashBlock_CXX(state=3D0x0000000000000010,
> data=3D0x00007fffffffd440) at sha.cpp:424:5
> =C2=A0=C2=A0=C2=A0 frame #1: 0x000000080169ad1d
> libcryptopp.so.8`CryptoPP::SHA256::HashMultipleBlocks(this=3D0x00007fffff=
ffd430, input=3D0x00007fffffffd480, length=3D64) at sha.cpp:977:13
> =C2=A0=C2=A0=C2=A0 frame #2: 0x000000080161bcbf
> libcryptopp.so.8`CryptoPP::IteratedHashBase<unsigned int,
> CryptoPP::HashTransformation>::Update(unsigned char const*, unsigned
> long) [inlined] CryptoPP::IteratedHashBase<unsigned int,
> CryptoPP::HashTransformation>::HashBlock(this=3D0x00007fffffffd430,
> input=3D0x00007fffffffd440) at iterhash.h:109:4
> =C2=A0=C2=A0=C2=A0 frame #3: 0x000000080161bca5
> libcryptopp.so.8`CryptoPP::IteratedHashBase<unsigned int,
> CryptoPP::HashTransformation>::Update(this=3D0x00007fffffffd430,
> input=3D"^\xd1\U00000013$\U0000001c\xb63\a\U00000019}\x85|\xde=C8=85\x84\=
xdbA\xc6\xdfw\xa0\xa0\xff\xe7N\xc0t\xa0\x83\U0000001d\xdd", length=3D32) at=
 iterhash.cpp:38:4
> =C2=A0=C2=A0=C2=A0 frame #4: 0x00000008016711e0
> libcryptopp.so.8`CryptoPP::RandomPool::IncorporateEntropy(this=3D0x000000=
0000877938, input=3D"^\xd1\U00000013$\U0000001c\xb63\a\U00000019}\x85|\xde=
=C8=85\x84\xdbA\xc6\xdfw\xa0\xa0\xff\xe7N\xc0t\xa0\x83\U0000001d\xdd", leng=
th=3D32) at randpool.cpp:36:7
> =C2=A0=C2=A0=C2=A0 frame #5: 0x000000080165b27d
> libcryptopp.so.8`CryptoPP::AutoSeededRandomPool::Reseed(this=3D0x00000000=
00877938, blocking=3Dfalse, seedSize=3D32) at osrng.cpp:330:2
> =C2=A0=C2=A0=C2=A0 frame #6: 0x0000000000793fbe
> amule`CryptoPP::AutoSeededRandomPool::AutoSeededRandomPool(this=3D0x00000=
00000877938, blocking=3Dfalse, seedSize=3D32) at osrng.h:171:4
> =C2=A0=C2=A0=C2=A0 frame #7: 0x0000000000793e3a amule`::__cxx_global_var_=
init.1() at
> RandomFunctions.cpp:31:39
> =C2=A0=C2=A0=C2=A0 frame #8: 0x0000000000793f7e
> amule`_GLOBAL__sub_I_RandomFunctions.cpp at RandomFunctions.cpp:0
> =C2=A0=C2=A0=C2=A0 frame #9: 0x000000080086e0fd ld-elf.so.1
> =C2=A0=C2=A0=C2=A0 frame #10: 0x000000080086c38b ld-elf.so.1
>=20
>=20
>=20
>=20


 =20
------=_Part_2072736_1596896837.1680038804537
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html><head></head><body><div class=3D"ydp9f1f2913yahoo-style-wrap" style=
=3D"font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px=
;"><div></div>
        <div dir=3D"ltr" data-setdir=3D"false">Thanks a lot, Yuri, worked l=
ike a charm.</div><div dir=3D"ltr" data-setdir=3D"false"><br></div><div><br=
></div>
       =20
        </div><div id=3D"ydp417e393cyahoo_quoted_0715735192" class=3D"ydp41=
7e393cyahoo_quoted">
            <div style=3D"font-family:'Helvetica Neue', Helvetica, Arial, s=
ans-serif;font-size:13px;color:#26282a;">
               =20
                <div>
                    On Tuesday, March 28, 2023 at 01:19:03 PM GMT-8, Yuri &=
lt;yuri@aetern.org&gt; wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div dir=3D"ltr">Andrew Terekhov wrote:<br></div><div =
dir=3D"ltr">&gt; Hi,<br></div><div dir=3D"ltr">&gt; <br></div><div dir=3D"l=
tr">&gt; My system is:<br></div><div dir=3D"ltr">&gt; <br></div><div dir=3D=
"ltr">&gt; $ uname -a<br></div><div dir=3D"ltr">&gt; FreeBSD obama 13.1-REL=
EASE-p6 FreeBSD 13.1-RELEASE-p6 GENERIC amd64<br></div><div dir=3D"ltr">&gt=
; <br></div><div dir=3D"ltr">&gt; fully updated wrt to packages and ports.<=
br></div><div dir=3D"ltr">&gt; <br></div><div dir=3D"ltr">&gt; I installed =
amule package and it segfaulted when started. So I enabled<br></div><div di=
r=3D"ltr">&gt; debug info for ports and rebuilt amule as port. What else ca=
n I do to<br></div><div dir=3D"ltr">&gt; help fix the problem?<br></div><di=
v dir=3D"ltr"><br></div><div dir=3D"ltr">Try the solution from forums:<br><=
/div><div dir=3D"ltr"><br></div><div dir=3D"ltr"><a href=3D"https://forums.=
freebsd.org/threads/amule-wont-run-on-freebsd-13-1-release-because-segmenta=
tion-fault-error.87980/post-597909" rel=3D"nofollow" target=3D"_blank">http=
s://forums.freebsd.org/threads/amule-wont-run-on-freebsd-13-1-release-becau=
se-segmentation-fault-error.87980/post-597909</a><br></div><div dir=3D"ltr"=
><br></div><div dir=3D"ltr"><br></div><div dir=3D"ltr">&gt; Below is where =
it crashes:<br></div><div dir=3D"ltr">&gt; <br></div><div dir=3D"ltr">&gt; =
<br></div><div dir=3D"ltr">&gt; $ lldb amule<br></div><div dir=3D"ltr">&gt;=
 (lldb) target create "amule"<br></div><div dir=3D"ltr">&gt; Current execut=
able set to 'amule' (x86_64).<br></div><div dir=3D"ltr">&gt; (lldb) run<br>=
</div><div dir=3D"ltr">&gt; Process 22227 launched: '/usr/local/bin/amule' =
(x86_64)<br></div><div dir=3D"ltr">&gt; Process 22227 stopped<br></div><div=
 dir=3D"ltr">&gt; * thread #1, name =3D 'amule', stop reason =3D signal SIG=
SEGV: invalid<br></div><div dir=3D"ltr">&gt; address (fault address: 0x10)<=
br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp;&nbsp; frame #0: 0x0000000801699=
e85 libcryptopp.so.8`CryptoPP::(anonymous<br></div><div dir=3D"ltr">&gt; na=
mespace)::SHA256_HashBlock_CXX(state=3D0x0000000000000010,<br></div><div di=
r=3D"ltr">&gt; data=3D0x00007fffffffd440) at sha.cpp:424:5<br></div><div di=
r=3D"ltr">&gt; &nbsp;&nbsp; 384 &nbsp;&nbsp; &nbsp;<br></div><div dir=3D"lt=
r">&gt; &nbsp;&nbsp; 385 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; input +=3D SHA1::BLOCKSIZE/sizeof(word32);<br></div><div dir=3D=
"ltr">&gt; &nbsp;&nbsp; 386 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; length -=3D SHA1::BLOCKSIZE;<br></div><div dir=3D"ltr">&gt; =
&nbsp;&nbsp; 387 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; }<br></div><div dir=
=3D"ltr">&gt; &nbsp;&nbsp; 388 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; while =
(length &gt;=3D SHA1::BLOCKSIZE);<br></div><div dir=3D"ltr">&gt; &nbsp;&nbs=
p; 389 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; return length;<br></div><div d=
ir=3D"ltr">&gt; &nbsp;&nbsp; 390 &nbsp;&nbsp; &nbsp;}<br></div><div dir=3D"=
ltr">&gt; &nbsp;&nbsp; 391 &nbsp;&nbsp; &nbsp;<br></div><div dir=3D"ltr">&g=
t; &nbsp;&nbsp; 392 &nbsp;&nbsp; &nbsp;// *********************************=
****************************<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 39=
3 &nbsp;&nbsp; &nbsp;<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 394 &nbsp=
;&nbsp; &nbsp;ANONYMOUS_NAMESPACE_BEGIN<br></div><div dir=3D"ltr">&gt; &nbs=
p;&nbsp; 395 &nbsp;&nbsp; &nbsp;<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp=
; 396 &nbsp;&nbsp; &nbsp;#define a(i) T[(0-i)&amp;7]<br></div><div dir=3D"l=
tr">&gt; &nbsp;&nbsp; 397 &nbsp;&nbsp; &nbsp;#define b(i) T[(1-i)&amp;7]<br=
></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 398 &nbsp;&nbsp; &nbsp;#define c(=
i) T[(2-i)&amp;7]<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 399 &nbsp;&nb=
sp; &nbsp;#define d(i) T[(3-i)&amp;7]<br></div><div dir=3D"ltr">&gt; &nbsp;=
&nbsp; 400 &nbsp;&nbsp; &nbsp;#define e(i) T[(4-i)&amp;7]<br></div><div dir=
=3D"ltr">&gt; &nbsp;&nbsp; 401 &nbsp;&nbsp; &nbsp;#define f(i) T[(5-i)&amp;=
7]<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 402 &nbsp;&nbsp; &nbsp;#defi=
ne g(i) T[(6-i)&amp;7]<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 403 &nbs=
p;&nbsp; &nbsp;#define h(i) T[(7-i)&amp;7]<br></div><div dir=3D"ltr">&gt; &=
nbsp;&nbsp; 404 &nbsp;&nbsp; &nbsp;<br></div><div dir=3D"ltr">&gt; &nbsp;&n=
bsp; 405 &nbsp;&nbsp; &nbsp;#define blk0(i) (W[i] =3D data[i])<br></div><di=
v dir=3D"ltr">&gt; &nbsp;&nbsp; 406 &nbsp;&nbsp; &nbsp;#define blk2(i)<br><=
/div><div dir=3D"ltr">&gt; (W[i&amp;15]+=3Ds1(W[(i-2)&amp;15])+W[(i-7)&amp;=
15]+s0(W[(i-15)&amp;15]))<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 407 &=
nbsp;&nbsp; &nbsp;<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 408 &nbsp;&n=
bsp; &nbsp;#define Ch(x,y,z) (z^(x&amp;(y^z)))<br></div><div dir=3D"ltr">&g=
t; &nbsp;&nbsp; 409 &nbsp;&nbsp; &nbsp;#define Maj(x,y,z) (y^((x^y)&amp;(y^=
z)))<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 410 &nbsp;&nbsp; &nbsp;<br=
></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 411 &nbsp;&nbsp; &nbsp;#define R(=
i)<br></div><div dir=3D"ltr">&gt; h(i)+=3DS1(e(i))+Ch(e(i),f(i),g(i))+SHA25=
6_K[i+j]+(j?blk2(i):blk0(i));\<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; =
412 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; d(i)+=3Dh(i);h(i)+=3DS0(a(i))+Maj=
(a(i),b(i),c(i))<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 413 &nbsp;&nbs=
p; &nbsp;<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 414 &nbsp;&nbsp; &nbs=
p;// for SHA256<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 415 &nbsp;&nbsp=
; &nbsp;#define s0(x) (rotrConstant&lt;7&gt;(x)^rotrConstant&lt;18&gt;(x)^(=
x&gt;&gt;3))<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 416 &nbsp;&nbsp; &=
nbsp;#define s1(x) (rotrConstant&lt;17&gt;(x)^rotrConstant&lt;19&gt;(x)^(x&=
gt;&gt;10))<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 417 &nbsp;&nbsp; &n=
bsp;#define S0(x)<br></div><div dir=3D"ltr">&gt; (rotrConstant&lt;2&gt;(x)^=
rotrConstant&lt;13&gt;(x)^rotrConstant&lt;22&gt;(x))<br></div><div dir=3D"l=
tr">&gt; &nbsp;&nbsp; 418 &nbsp;&nbsp; &nbsp;#define S1(x)<br></div><div di=
r=3D"ltr">&gt; (rotrConstant&lt;6&gt;(x)^rotrConstant&lt;11&gt;(x)^rotrCons=
tant&lt;25&gt;(x))<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 419 &nbsp;&n=
bsp; &nbsp;<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 420 &nbsp;&nbsp; &n=
bsp;void SHA256_HashBlock_CXX(word32 *state, const word32 *data)<br></div><=
div dir=3D"ltr">&gt; &nbsp;&nbsp; 421 &nbsp;&nbsp; &nbsp;{<br></div><div di=
r=3D"ltr">&gt; &nbsp;&nbsp; 422 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; word3=
2 W[16]=3D{0}, T[8];<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 423 &nbsp;=
&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; /* Copy context-&gt;state[] to working vars=
 */<br></div><div dir=3D"ltr">&gt; -&gt; 424 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp=
;&nbsp; memcpy(T, state, sizeof(T));<br></div><div dir=3D"ltr">&gt; &nbsp;&=
nbsp; 425 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; /* 64 operations, partially=
 loop unrolled */<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 426 &nbsp;&nb=
sp; &nbsp;&nbsp;&nbsp;&nbsp; for (unsigned int j=3D0; j&lt;64; j+=3D16)<br>=
</div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 427 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp=
;&nbsp; {<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 428 &nbsp;&nbsp; &nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; R( 0); R( 1); R( 2); R( 3);<br=
></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 429 &nbsp;&nbsp; &nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; R( 4); R( 5); R( 6); R( 7);<br></div><div =
dir=3D"ltr">&gt; &nbsp;&nbsp; 430 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp; R( 8); R( 9); R(10); R(11);<br></div><div dir=3D"ltr">=
&gt; &nbsp;&nbsp; 431 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; R(12); R(13); R(14); R(15);<br></div><div dir=3D"ltr">&gt; &nbsp;&=
nbsp; 432 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; }<br></div><div dir=3D"ltr"=
>&gt; &nbsp;&nbsp; 433 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; /* Add the wor=
king vars back into context.state[] */<br></div><div dir=3D"ltr">&gt; &nbsp=
;&nbsp; 434 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; state[0] +=3D a(0);<br></=
div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 435 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&=
nbsp; state[1] +=3D b(0);<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 436 &=
nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; state[2] +=3D c(0);<br></div><div dir=
=3D"ltr">&gt; &nbsp;&nbsp; 437 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; state[=
3] +=3D d(0);<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 438 &nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp; state[4] +=3D e(0);<br></div><div dir=3D"ltr">&gt;=
 &nbsp;&nbsp; 439 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; state[5] +=3D f(0);=
<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp; 440 &nbsp;&nbsp; &nbsp;&nbsp;&=
nbsp;&nbsp; state[6] +=3D g(0);<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp;=
 441 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; state[7] +=3D h(0);<br></div><di=
v dir=3D"ltr">&gt; &nbsp;&nbsp; 442 &nbsp;&nbsp; &nbsp;}<br></div><div dir=
=3D"ltr">&gt; &nbsp;&nbsp; 443 &nbsp;&nbsp; &nbsp;<br></div><div dir=3D"ltr=
">&gt; &nbsp;&nbsp; 444 &nbsp;&nbsp; &nbsp;#undef Ch<br></div><div dir=3D"l=
tr">&gt; (lldb) bt<br></div><div dir=3D"ltr">&gt; * thread #1, name =3D 'am=
ule', stop reason =3D signal SIGSEGV: invalid<br></div><div dir=3D"ltr">&gt=
; address (fault address: 0x10)<br></div><div dir=3D"ltr">&gt; &nbsp; * fra=
me #0: 0x0000000801699e85 libcryptopp.so.8`CryptoPP::(anonymous<br></div><d=
iv dir=3D"ltr">&gt; namespace)::SHA256_HashBlock_CXX(state=3D0x000000000000=
0010,<br></div><div dir=3D"ltr">&gt; data=3D0x00007fffffffd440) at sha.cpp:=
424:5<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp;&nbsp; frame #1: 0x0000000=
80169ad1d<br></div><div dir=3D"ltr">&gt; libcryptopp.so.8`CryptoPP::SHA256:=
:HashMultipleBlocks(this=3D0x00007fffffffd430, input=3D0x00007fffffffd480, =
length=3D64) at sha.cpp:977:13<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp;&=
nbsp; frame #2: 0x000000080161bcbf<br></div><div dir=3D"ltr">&gt; libcrypto=
pp.so.8`CryptoPP::IteratedHashBase&lt;unsigned int,<br></div><div dir=3D"lt=
r">&gt; CryptoPP::HashTransformation&gt;::Update(unsigned char const*, unsi=
gned<br></div><div dir=3D"ltr">&gt; long) [inlined] CryptoPP::IteratedHashB=
ase&lt;unsigned int,<br></div><div dir=3D"ltr">&gt; CryptoPP::HashTransform=
ation&gt;::HashBlock(this=3D0x00007fffffffd430,<br></div><div dir=3D"ltr">&=
gt; input=3D0x00007fffffffd440) at iterhash.h:109:4<br></div><div dir=3D"lt=
r">&gt; &nbsp;&nbsp;&nbsp; frame #3: 0x000000080161bca5<br></div><div dir=
=3D"ltr">&gt; libcryptopp.so.8`CryptoPP::IteratedHashBase&lt;unsigned int,<=
br></div><div dir=3D"ltr">&gt; CryptoPP::HashTransformation&gt;::Update(thi=
s=3D0x00007fffffffd430,<br></div><div dir=3D"ltr">&gt; input=3D"^\xd1\U0000=
0013$\U0000001c\xb63\a\U00000019}\x85|\xde=C8=85\x84\xdbA\xc6\xdfw\xa0\xa0\=
xff\xe7N\xc0t\xa0\x83\U0000001d\xdd", length=3D32) at iterhash.cpp:38:4<br>=
</div><div dir=3D"ltr">&gt; &nbsp;&nbsp;&nbsp; frame #4: 0x00000008016711e0=
<br></div><div dir=3D"ltr">&gt; libcryptopp.so.8`CryptoPP::RandomPool::Inco=
rporateEntropy(this=3D0x0000000000877938, input=3D"^\xd1\U00000013$\U000000=
1c\xb63\a\U00000019}\x85|\xde=C8=85\x84\xdbA\xc6\xdfw\xa0\xa0\xff\xe7N\xc0t=
\xa0\x83\U0000001d\xdd", length=3D32) at randpool.cpp:36:7<br></div><div di=
r=3D"ltr">&gt; &nbsp;&nbsp;&nbsp; frame #5: 0x000000080165b27d<br></div><di=
v dir=3D"ltr">&gt; libcryptopp.so.8`CryptoPP::AutoSeededRandomPool::Reseed(=
this=3D0x0000000000877938, blocking=3Dfalse, seedSize=3D32) at osrng.cpp:33=
0:2<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp;&nbsp; frame #6: 0x000000000=
0793fbe<br></div><div dir=3D"ltr">&gt; amule`CryptoPP::AutoSeededRandomPool=
::AutoSeededRandomPool(this=3D0x0000000000877938, blocking=3Dfalse, seedSiz=
e=3D32) at osrng.h:171:4<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp;&nbsp; =
frame #7: 0x0000000000793e3a amule`::__cxx_global_var_init.1() at<br></div>=
<div dir=3D"ltr">&gt; RandomFunctions.cpp:31:39<br></div><div dir=3D"ltr">&=
gt; &nbsp;&nbsp;&nbsp; frame #8: 0x0000000000793f7e<br></div><div dir=3D"lt=
r">&gt; amule`_GLOBAL__sub_I_RandomFunctions.cpp at RandomFunctions.cpp:0<b=
r></div><div dir=3D"ltr">&gt; &nbsp;&nbsp;&nbsp; frame #9: 0x000000080086e0=
fd ld-elf.so.1<br></div><div dir=3D"ltr">&gt; &nbsp;&nbsp;&nbsp; frame #10:=
 0x000000080086c38b ld-elf.so.1<br></div><div dir=3D"ltr">&gt; <br></div><d=
iv dir=3D"ltr">&gt; <br></div><div dir=3D"ltr">&gt; <br></div><div dir=3D"l=
tr">&gt; <br></div><div dir=3D"ltr"><br></div><div dir=3D"ltr"><br></div></=
div>
            </div>
        </div></body></html>
------=_Part_2072736_1596896837.1680038804537--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?446577808.2072737.1680038804540>