简体   繁体   English

使用 `-std=XXX` 时,什么导致 g3mangler.cc 中的 SunCC 崩溃?

[英]What causes SunCC crash in g3mangler.cc when using `-std=XXX`?

I'm trying to determine what is causing SunCC 5.11 - 5.13 to die with ../lnk/g3mangler.cc, line 825 (message from SunCC 5.13).我正在尝试确定导致 SunCC 5.11 - 5.13 死亡的原因是../lnk/g3mangler.cc, line 825 (来自 SunCC 5.13 的消息)。 Here's what it looks like during a compile.这是编译期间的样子。 The machine is a 4th gen Core i5, so its got the features which correspond to the macros.该机器是第 4 代 Core i5,因此具有与宏对应的功能。

/opt/solarisstudio12.4/bin/CC -DDEBUG -g3 -O0 -std=c++03 -D__SSE2__ -D__SSE3__ -D__SSSE3__
-D__SSE4_1__ -D__SSE4_2__ -D__AES__ -D__PCLMUL__ -D__RDRND__ -D__AVX__ -xarch=avx
-m64 -native -KPIC -template=no%extdef -w -erroff=wvarhidemem -erroff=voidretw -c gcm.cpp
 >> Assertion:   (../lnk/g3mangler.cc, line 825)
    while processing gcm.cpp at line 408.

I know the problem surfaces with -std=c++03 on all the compilers, and -std=c++11 on the newer compilers.我知道所有编译器上的-std=c++03和新编译器上的-std=c++11问题。 If I omit -std=XXX , then the problem goes away.如果我省略-std=XXX ,那么问题就会消失。 Telling users they cannot use C++03 or C++11 is not viable.告诉用户他们不能使用 C++03 或 C++11 是不可行的。

Here is gcm.cpp:408 .这是gcm.cpp:408 Its basically commented out now due to efforts to isolate.由于努力隔离,它现在基本上被注释掉了。 In fact, deleting all the code and leaving an empty function witnesses it, too:事实上,删除所有代码并留下一个空函数也证明了这一点:

MAYBE_INLINE void GCM_Base::ReverseHashBufferIfNeeded()
{
#if BOOL_AESNI_INTRINSICS_AVAILABLE
    // if (HasCLMUL())
    {
        // __m128i &x = *(__m128i *)(void *)HashBuffer();
        // x = _mm_shuffle_epi8(x, s_clmulConstants[1]);
    }
#elif BOOL_ARM_CRYPTO_INTRINSICS_AVAILABLE
    if (HasPMULL())
    {
        if (GetNativeByteOrder() != BIG_ENDIAN_ORDER)
        {
            const uint8x16_t x = vrev64q_u8(vld1q_u8(HashBuffer()));
            vst1q_u8(HashBuffer(), (uint8x16_t)vcombine_u64(vget_high_u64((uint64x2_t)x), vget_low_u64((uint64x2_t)x)));
        }
    }
#endif
}

MAYBE_INLINE is a macro I am using to toggle inline on and off for the compiler. MAYBE_INLINE是我用来为编译器打开和关闭inline的宏。

The only reports I can find on the web are from our bug tracker.我在网上能找到的唯一报告来自我们的错误跟踪器。 I'm out of ideas since I've exhausted all the code in the function.因为我已经用尽了函数中的所有代码,所以我没有想法。

What causes the SunCC compiler crash in g3mangler.cc when using -std=XXX ?使用-std=XXX时,是什么导致 SunCC 编译器在g3mangler.cc崩溃? How can we work around it?我们如何解决它?

From my experience on the old Sun forums, a failed assertion in one of the Solaris Studio components is always considered a compiler bug.根据我在旧 Sun 论坛上的经验,Solaris Studio 组件之一中的失败断言始终被视为编译器错误。

You'll likely be better served posting your issue to the Oracle forum for Solaris Studio .将您的问题发布到Solaris Studio 的 Oracle 论坛可能会更好。

You can also try different -compat= and -std= options.您还可以尝试不同的-compat=-std=选项。 In particular, -std=sun03 may work for you (but it will not produce GNU C++-compatible binaries).特别是, -std=sun03可能对您-std=sun03 (但它不会生成与 GNU C++ 兼容的二进制文件)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM