Workaround in the same way. Changed definition of the INNER_LOOP_ITERATION
(https://github.com/weidai11/cryptopp/blob/master/vmac.cpp#L549):
#define INNER_LOOP_ITERATION(j) {\
word64 d0 = ConditionalByteReverse(LITTLE_ENDIAN_ORDER, data[i+2*j+0]);\
word64 d1 = ConditionalByteReverse(LITTLE_ENDIAN_ORDER, data[i+2*j+1]);\
AccumulateNH(nhA, d0+nhK[i+2*j+0], d1+nhK[i+2*j+1]);\
if (T_128BitTag)\
AccumulateNH(nhB, d0+nhK[i+2*j+2], d1+nhK[i+2*j+3]);\
}
To:
#if defined(__SUNPRO_CC)
#define PREPARE_D0_D1(j) \
word64 d0_original = 0;\
memcpy(&d0_original, data + i + 2*j + 0,
sizeof(d0_original));\
word64 d1_original = 0;\
memcpy(&d1_original, data + i + 2*j + 1,
sizeof(d1_original));\
\
word64 d0 = ConditionalByteReverse(LITTLE_ENDIAN_ORDER,
d0_original);\
word64 d1 = ConditionalByteReverse(LITTLE_ENDIAN_ORDER,
d1_original)
#else
#define PREPARE_D0_D1(j) \
word64 d0 = ConditionalByteReverse(LITTLE_ENDIAN_ORDER,
data[i+2*j+0]);\
word64 d1 = ConditionalByteReverse(LITTLE_ENDIAN_ORDER,
data[i+2*j+1])
#endif
#define INNER_LOOP_ITERATION(j) {\
PREPARE_D0_D1(j);\
AccumulateNH(nhA, d0+nhK[i+2*j+0], d1+nhK[i+2*j+1]);\
if (T_128BitTag)\
AccumulateNH(nhB, d0+nhK[i+2*j+2],
d1+nhK[i+2*j+3]);\
}
Next coredump:
DH validation suite running...
signal BUS (invalid address alignment) in
CryptoPP::BufferedTransformation::GetMaxWaitObjectCount at line 399 in file
"cryptlib.cpp"
399 return t ? t->GetMaxWaitObjectCount() : 0;^M
(dbx) where
=>[1] CryptoPP::BufferedTransformation::GetMaxWaitObjectCount(this =
0x100f14a68), line 399 in "cryptlib.cpp"
[2] CryptoPP::BufferedTransformation::ChannelPutModifiable(this =
0x100f14a68, channel = CLASS, inString = 0x1011661b0 "^B\x81\x81", length =
256U, blocking = true), line 1866 in "cryptlib.h"
[3] CryptoPP::ByteQueueNode::TransferTo(this = 0x1011607a0, target =
CLASS, transferMax = 18446744073709551615U, channel = CLASS), line 108 in
"queue.cpp"
[4] CryptoPP::ByteQueue::TransferTo2(this = 0xffffffff7fffba88, target =
CLASS, transferBytes = 18446744073709551615U, channel = CLASS, blocking =
true), line 349 in "queue.cpp"
[5] CryptoPP::BufferedTransformation::TransferTo(this =
0xffffffff7fffba88, target = CLASS, transferMax = 18446744073709551615U,
channel = CLASS), line 1640 in "cryptlib.h"
[6] CryptoPP::DERGeneralEncoder::MessageEnd(this = 0xffffffff7fffba88),
line 533 in "asn.cpp"
[7] CryptoPP::DL_GroupParameters_IntegerBased::DEREncode(this =
0xffffffff7fffbf08, bt = CLASS), line 278 in "gfpcrypt.cpp"
[8] CryptoPP::ASN1Object::BEREncode(this = 0xffffffff7fffbf08, bt =
CLASS), line 2921 in "cryptlib.h"
[9] CryptoPP::Test::SimpleKeyAgreementValidate(d = CLASS), line 204 in
"validat2.cpp"
[10] CryptoPP::Test::ValidateDH(), line 371 in "validat2.cpp"
[11] CryptoPP::Test::ValidateAll(thorough = false), line 160 in
"validat1.cpp"
[12] Validate(alg = 0, thorough = false, seedInput = (nil)), line 916 in
"test.cpp"
[13] main(argc = 2, argv = 0xffffffff7ffff308), line 406 in "test.cpp"
(dbx)
--
--
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at
http://www.cryptopp.com.
---
You received this message because you are subscribed to the Google Groups
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.