Open
gtest 1.18.0 编译提示段失败 #330
Funda WangAdd on  Sep 1
Funda Wang
Funda WangCollaborators
Sep 1 Create

https://atomgit.com/src-openeuler/gtest/merge_requests/25

2026-09-01 01:01:44 FAILED: [code=1] googletest/CMakeFiles/googletest-output-test_.dir/test/googletest-output-test_.cc.o 
2026-09-01 01:01:44 /usr/bin/c++ -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -isystem /home/lkp/rpmbuild/BUILD/googletest-1.18.0/googletest/include -isystem /home/lkp/rpmbuild/BUILD/googletest-1.18.0/googletest -O2 -flto=auto -ffat-lto-objects -g -grecord-gcc-switches -pipe -fstack-protector-strong  -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/generic-hardened-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fexceptions -Wall -Wshadow -Wundef -Wno-error=dangling-else -DGTEST_HAS_PTHREAD=1 -fexceptions -MD -MT googletest/CMakeFiles/googletest-output-test_.dir/test/googletest-output-test_.cc.o -MF googletest/CMakeFiles/googletest-output-test_.dir/test/googletest-output-test_.cc.o.d -o googletest/CMakeFiles/googletest-output-test_.dir/test/googletest-output-test_.cc.o -c /home/lkp/rpmbuild/BUILD/googletest-1.18.0/googletest/test/googletest-output-test_.cc
2026-09-01 01:01:44 In file included from /home/lkp/rpmbuild/BUILD/googletest-1.18.0/googletest/include/gtest/gtest-message.h:57,
2026-09-01 01:01:44                  from /home/lkp/rpmbuild/BUILD/googletest-1.18.0/googletest/include/gtest/gtest-assertion-result.h:46,
2026-09-01 01:01:44                  from /home/lkp/rpmbuild/BUILD/googletest-1.18.0/googletest/include/gtest/gtest.h:64,
2026-09-01 01:01:44                  from /home/lkp/rpmbuild/BUILD/googletest-1.18.0/googletest/include/gtest/gtest-spi.h:38,
2026-09-01 01:01:44                  from /home/lkp/rpmbuild/BUILD/googletest-1.18.0/googletest/test/googletest-output-test_.cc:42:
2026-09-01 01:01:44 /home/lkp/rpmbuild/BUILD/googletest-1.18.0/googletest/include/gtest/internal/gtest-port.h: In instantiation of 'Derived* testing::internal::CheckedDowncastToActualType(Base*) [with Derived = const ValuesInIteratorRangeGenerator<std::__cxx11::basic_string<char> >::Iterator; Base = const ParamIteratorInterface<std::__cxx11::basic_string<char> >]':
2026-09-01 01:01:44 /home/lkp/rpmbuild/BUILD/googletest-1.18.0/googletest/include/gtest/internal/gtest-param-util.h:352:57:   required from 'bool testing::internal::ValuesInIteratorRangeGenerator<T>::Iterator::Equals(const testing::internal::ParamIteratorInterface<T>&) const [with T = std::__cxx11::basic_string<char>]'
2026-09-01 01:01:44 /home/lkp/rpmbuild/BUILD/googletest-1.18.0/googletest/include/gtest/internal/gtest-param-util.h:345:10:   required from here
2026-09-01 01:01:44 /home/lkp/rpmbuild/BUILD/googletest-1.18.0/googletest/include/gtest/internal/gtest-port.h:1171:10: internal compiler error: Segmentation fault
2026-09-01 01:01:44  1171 |   return static_cast<Derived*>(base);
2026-09-01 01:01:44       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
2026-09-01 01:01:44 0x1b9be5f internal_error(char const*, ...)
2026-09-01 01:01:44 	???:0
2026-09-01 01:01:44 0x6c75bb perform_direct_initialization_if_possible(tree_node*, tree_node*, bool, int)
2026-09-01 01:01:44 	???:0
2026-09-01 01:01:44 0x8a4493 build_static_cast(unsigned int, tree_node*, tree_node*, int)
2026-09-01 01:01:44 	???:0
2026-09-01 01:01:44 0x835653 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool)
2026-09-01 01:01:44 	???:0
2026-09-01 01:01:44 0x845073 instantiate_decl(tree_node*, bool, bool)
2026-09-01 01:01:44 	???:0
2026-09-01 01:01:44 0x85a473 instantiate_pending_templates(int)
2026-09-01 01:01:44 	???:0
2026-09-01 01:01:44 0x74de3f c_parse_final_cleanups()
2026-09-01 01:01:44 	???:0
2026-09-01 01:01:44 Please submit a full bug report, with preprocessed source.
2026-09-01 01:01:44 Please include the complete backtrace with any bug report.
2026-09-01 01:01:44 See <https://gitee.com/src-openeuler/gcc/issues> for instructions.
2026-09-01 01:01:44 Preprocessed source stored into /tmp/ccpJhxjk.out file, please attach this to your bugreport.

此问题仅出现于 aarch64 架构,x64下无法复现。

二、缺陷分析结构反馈
影响性分析说明:

缺陷严重等级:(Critical/High/Moderate/Low)

缺陷根因说明:

受影响版本排查(受影响/不受影响):
openEuler-20.03-LTS-SP4
openEuler-22.03-LTS-SP3
openEuler-22.03-LTS-SP4
openEuler-24.03-LTS
openEuler-24.03-LTS-SP1
openEuler-24.03-LTS-SP2

修复是否涉及abi变化(是/否):
openEuler-20.03-LTS-SP4
openEuler-22.03-LTS-SP3
openEuler-22.03-LTS-SP4
openEuler-24.03-LTS
openEuler-24.03-LTS-SP1
openEuler-24.03-LTS-SP2

likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Sep 1 Assign huang-xiaoquan as responsible person
openeuler-ci-botopeneuler-ci-botCollaborators
Sep 1 Modify description of issue
openeuler-ci-bot
openeuler-ci-botCollaborators
Sep 1 Comments:

以下的要求不是强制性的, 未按模板评论时对issue无任何影响
issue处理注意事项:
1. 当前issue受影响的分支提交pr时, 须在pr描述中填写当前issue编号进行关联, 否则无法关闭当前issue;
2. 模板内容需要填写完整, 无论是受影响或者不受影响都需要填写完整内容,未引入的分支不需要填写, 否则无法关闭当前issue;
3. 以下为模板中需要填写完整的内容, 请复制到评论区回复, 注: 内容的标题名称(影响性分析说明, 缺陷严重等级, 受影响版本排查(受影响/不受影响), 修复是否涉及abi变化(是/否))不能省略,省略后defect-manager将无法正常解析填写内容.
评论区可能使用到的指令说明:

指令 指令说明 使用权限
/check-issue 触发defect-manager校验 不限
/reason xxx /reason +挂起或取消条件 不限

影响性分析说明:

缺陷严重等级:(Critical/High/Moderate/Low)

缺陷根因说明:

受影响版本排查(受影响/不受影响):

  1. openEuler-20.03-LTS-SP4:
  2. openEuler-22.03-LTS-SP3:
  3. openEuler-22.03-LTS-SP4:
  4. openEuler-24.03-LTS:
  5. openEuler-24.03-LTS-SP1:
  6. openEuler-24.03-LTS-SP2:

abi变化(是/否):

  1. openEuler-20.03-LTS-SP4:
  2. openEuler-22.03-LTS-SP3:
  3. openEuler-22.03-LTS-SP4:
  4. openEuler-24.03-LTS:
  5. openEuler-24.03-LTS-SP1:
  6. openEuler-24.03-LTS-SP2:

缺陷issue处理具体操作请参考:
https://atomgit.com/openeuler/cve-manager/blob/master/cve-vulner-manager/doc/md/defect-manager-manual.md
pr关联issue具体操作请参考:
https://docs.atomgit.com/docs/help/home/org_project/pullrequests/pr-related-issue

likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Sep 1 Assign fundawang as responsible person
openeuler-ci-botopeneuler-ci-botCollaborators
Sep 1 Added label: sig/Compiler
openeuler-ci-botopeneuler-ci-botCollaborators
Sep 1 Added label: DEFECT/UNFIXED
openeuler-ci-bot
openeuler-ci-botCollaborators
Sep 1 Comments:

Welcome To openEuler Community

Hey @fundawang , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands. You can self-configure the PR merge rules for this repository. For more details, please refer to Here.

Contact Guide

If you have any questions, please contact the SIG: Compiler ,
and any of the maintainers: @SegFault, @alexanderbill, @cf-zhao, @chenzheng1030, @eastb233, @kuenking111_admin, @li-yancheng, @wangqiang95, @wd-gitcode ,
and any of the committers: @huang-xiaoquan, @huzife, @lin-4682, @xiongzhou4 .

likedislike