On Monday, 12 September 2016 19:53:10 UTC+1, Jeffrey Walton wrote:
>
> >> > 3) The test program core dumps when run with the v option.
> >> > Testing MessageDigest algorithm SHA-384.
> >> > ..signal BUS (invalid address alignment) in
> CryptoPP::SHA512::Transform
> >> > at
> >> > line 27 in file "sha.cpp"
> >
> > [stack trace snipped]
> [snip]
>
Enabling the ASM brought in more maintenance for the library because
> SunCC is fragile a times (q.v.), but I think its worth it.
>
> (A) The next step in troubleshooting is to disable all ASM.
>
> gmake distclean
> CXXFLAGS="-DNDEBUG -g3 -xO2 -DCRYPTOPP_DISABLE_ASM"
> CXXFLAGS="$CXXFLAGS" gmake -j 4
> ./cryptest.exe v
>
This did not resolve the problem.
>
> *if* that resolves the problem, then the next step is to disable ASM
> in SHA only. That SHA has its own "disable ASM" macro should tell you
> how much trouble its given me on Intel platforms. There are a handful
> of other offenders like SHA.
>
> (B) Disable ASM in SHA
>
> gmake distclean
> CXXFLAGS="-DNDEBUG -g3 -xO2 -DCRYPTOPP_DISABLE_SHA_ASM"
> CXXFLAGS="$CXXFLAGS" gmake -j 4
> ./cryptest.exe v
>
I tried this flag also. Same result, core dumps in the same place.
>
> I've got a feeling one of these two will squash the problem for you. I
> don't know why you need them when I don't. I suspect its due to
> different versions of the compiler. I suspect you likely use the
> latest/patched version while I have the free version without updates.
>
I think I am also using the free one on Solaris 11 but we get the same
problems on Solaris 10 where I think it is the licensed version.
>
> I don't recall if you stated it, but does G++ have the same issue? I
> suspect not.
There are no problems with GCC on RHEL 5.11 or 6.8. We only get the
problems on Solaris 10 and 11 with the solaris compiler. I tried building
with GCC, even though we can't use it on solaris for our project, just to
see what would happen. Unfortunately, I got compilation errors.
g++ -DNDEBUG -g2 -O2 -fPIC -pipe -c pkcspad.cpp
cryptlib.cpp:51:95: error: init_priority attribute is not supported on this
platform
const std::string DEFAULT_CHANNEL __attribute__ ((init_priority
(CRYPTOPP_INIT_PRIORITY + 25))) = "";
^
cryptlib.cpp:52:91: error: init_priority attribute is not supported on this
platform
const std::string AAD_CHANNEL __attribute__ ((init_priority
(CRYPTOPP_INIT_PRIORITY + 26))) = "AAD";
^
cryptlib.cpp:76:120: error: init_priority attribute is not supported on
this platform
const simple_ptr<NullNameValuePairs> s_pNullNameValuePairs __attribute__
((init_priority (CRYPTOPP_INIT_PRIORITY + 30))) = new NullNameValuePairs;
^
g++ -DNDEBUG -g2 -O2 -fPIC -pipe -c cmac.cpp
g++ -DNDEBUG -g2 -O2 -fPIC -pipe -c gf256.cpp
g++ -DNDEBUG -g2 -O2 -fPIC -pipe -c xtrcrypt.cpp
g++ -DNDEBUG -g2 -O2 -fPIC -pipe -c queue.cpp
g++ -DNDEBUG -g2 -O2 -fPIC -pipe -c mars.cpp
g++ -DNDEBUG -g2 -O2 -fPIC -pipe -c rc5.cpp
default.cpp: In constructor
CryptoPP::DefaultEncryptorWithMAC::DefaultEncryptorWithMAC(const char*,
CryptoPP::BufferedTransformation*):
default.cpp:220:39: warning: DefaultEncryptor is deprecated (declared at
default.h:29): DefaultEncryptor will be changing in the near future because
the algorithms are no longer secure [-Wdeprecated-declarations]
SetFilter(new HashFilter(*m_mac, new DefaultEncryptor(passphrase), true));
This is with g++ version 4.8.2. I know it's an old version, but that's what
it available without going off and building gcc from source.
--
--
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.