From 8197732756dd3bcd9b517b2ea73780cdbab2b000 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 16 Jul 2018 10:33:14 -0400 Subject: [PATCH] Fix SunStudio 12.6 runtime crash on i386 This bug has been around since the Sun Studio 11/SunCC 5.8 days --- cryptlib.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cryptlib.h b/cryptlib.h index 1dcc9f50..4752f80f 100644 --- a/cryptlib.h +++ b/cryptlib.h @@ -2356,8 +2356,11 @@ public: /// \details DoQuickSanityCheck() is for internal library use, and it should not be called by library users. void DoQuickSanityCheck() const {ThrowIfInvalid(NullRNG(), 0);} -#if (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590) - // Sun Studio 11/CC 5.8 workaround: it generates incorrect code when casting to an empty virtual base class +#if defined(__SUNPRO_CC) + // Sun Studio 11/CC 5.8 workaround: it generates incorrect code + // when casting to an empty virtual base class. JW, 2018: It is + // still a problem in Sun Studio 12.6/CC 5.15 on i386. Just enable + // it everywhere in case it affects SPARC (which we don't test). char m_sunCCworkaround; #endif };