【问题标题】:Weird issue with boost 1.69.0 and openmpi 2.1.2boost 1.69.0 和 openmpi 2.1.2 的奇怪问题
【发布时间】:2020-09-16 02:48:08
【问题描述】:

有人可以帮我理解以下 segfault 11 错误吗?

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00000000004425e0 in boost::system::error_category::equivalent(boost::system::error_code const&, int) const ()
(gdb) where
#0  0x00000000004425e0 in boost::system::error_category::equivalent(boost::system::error_code const&, int) const ()
#1  0x0000000000414a58 in _GLOBAL__sub_I_operations.cpp ()
#2  0x000000000047d40d in __libc_csu_init ()
#3  0x00002aaaab9b24d5 in __libc_start_main (main=0x414730 <main>, argc=1, argv=0x7fffffff9b38, init=0x47d3c0 <__libc_csu_init>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffff9b28) at ../csu/libc-start.c:225
#4  0x0000000000414a90 in _start ()

【问题讨论】:

标签: boost openmpi


【解决方案1】:

在这里找到解决方案: Segmentation fault with boost::filesystem

我没有使用与我的应用程序相同的标志来编译 boost ...特别是 -std=c++14。

【讨论】:

    【解决方案2】:

    在 Boost System 等静态数据初始化之前,似乎有什么东西可能会引发错误 ¹。

    在这种情况下,最可能的罪魁祸首是具有非平凡构造函数的全局变量。

    如果构造函数尝试在main 开始之前做某事,它可能会失败,因为相关库尚未初始化。

    ¹参见“静态初始化命令惨败”

    【讨论】:

      猜你喜欢
      • 2021-11-28
      • 1970-01-01
      • 2014-01-06
      • 1970-01-01
      • 2015-04-28
      • 2021-12-08
      • 1970-01-01
      • 2015-12-20
      • 2011-10-10
      相关资源
      最近更新 更多