今天写程序遇到一个问题:Program terminated with signal 11, Segmentation fault.

gdb 调试现象如下:

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff1b1fc000
Core was generated by `./test'.
Program terminated with signal 11, Segmentation fault.
#0  0x0000003b5e6b76d2 in __gnu_cxx::__exchange_and_add(int volatile*, int) () from /usr/lib64/libstdc++.so.6
(gdb) bt
#0  0x0000003b5e6b76d2 in __gnu_cxx::__exchange_and_add(int volatile*, int) () from /usr/lib64/libstdc++.so.6
#1  0x0000003b5e69dbb9 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() () from /usr/lib64/libstdc++.so.6
#2  0x00000000004124ab in testing::TestInfo::~TestInfo() ()
#3  0x0000000000412534 in void testing::internal::Delete<testing::TestInfo>(testing::TestInfo*) ()
#4  0x000000000042b522 in void (*std::for_each<__gnu_cxx::__normal_iterator<testing::TestInfo* const*, std::vector<testing::TestInfo*, std::allocator<testing::TestInfo*> > >, void (*)(testing::TestInfo*)>(__gnu_cxx::__normal_iterator<testing::TestInfo* const*, std::vector<testing::TestInfo*, std::allocator<testing::TestInfo*> > >, __gnu_cxx::__normal_iterator<testing::TestInfo* const*, std::vector<testing::TestInfo*, std::allocator<testing::TestInfo*> > >, void (*)(testing::TestInfo*)))(testing::TestInfo*) ()
#5  0x000000000042b577 in void testing::internal::ForEach<std::vector<testing::TestInfo*, std::allocator<testing::TestInfo*> >, void (*)(testing::TestInfo*)>(std::vector<testing::TestInfo*, std::allocator<testing::TestInfo*> > const&, void (*)(testing::TestInfo*)) ()
#6  0x0000000000411fc3 in testing::TestCase::~TestCase() ()
#7  0x000000000040e997 in void testing::internal::Delete<testing::TestCase>(testing::TestCase*) ()
#8  0x000000000042a486 in void (*std::for_each<__gnu_cxx::__normal_iterator<testing::TestCase* const*, std::vector<testing::TestCase*, std::allocator<testing::TestCase*> > >, void (*)(testing::TestCase*)>(__gnu_cxx::__normal_iterator<testing::TestCase* const*, std::vector<testing::TestCase*, std::allocator<testing::TestCase*> > >, __gnu_cxx::__normal_iterator<testing::TestCase* const*, std::vector<testing::TestCase*, std::allocator<testing::TestCase*> > >, void (*)(testing::TestCase*)))(testing::TestCase*) ()
#9  0x000000000042ac49 in void testing::internal::ForEach<std::vector<testing::TestCase*, std::allocator<testing::TestCase*> >, void (*)(testing::TestCase*)>(std::vector<testing::TestCase*, std::allocator<testing::TestCase*> > const&, void (*)(testing::TestCase*)) ()
#10 0x000000000041a26f in testing::internal::UnitTestImpl::~UnitTestImpl() ()
#11 0x0000000000411df6 in testing::UnitTest::~UnitTest() ()
#12 0x0000000000411e66 in __tcf_0 ()
#13 0x000000340fa334f5 in exit () from /lib64/libc.so.6
#14 0x000000340fa1d99b in __libc_start_main () from /lib64/libc.so.6
#15 0x0000000000405699 in _start ()

通过代码接口开关的方法,定位到程序中

mock_config->parser_name_tag = "ssp_creative.so";

是这条代码的问题

改为:

std::string parser_name_tag ="ssp_creative.so";

mock_config->parser_name_tag = parser_name_tag.c_str();

段错误问题解决。

先把现象记录下,具体原因后续分析。

Program terminated with signal 11, Segmentation fault.相关推荐

  1. Program terminated with signal SIGSEGV, Segmentation fault.

    问题: 在程序运行时出现了:Segmentation fault (core dumped),分段故障(堆芯转储)也就是段错误. 我首先在一篇博客上面找到如何使用gdb调试: 1.首先使用ulimit ...

  2. ros中 指针传递 ros::NodeHandle *node 报received signal SIGSEGV, Segmentation fault

    ros中 指针传递 ros::NodeHandle *node 报错: Thread 1 "currencyChassis" received signal SIGSEGV, Se ...

  3. 解决Program received signal SIGSEGV, Segmentation fault.的辛酸

    最近写一个算法很简单,涉及到链表的归并,在追求速度的时候,尽最大程度上使用了指针,然而却带来了异常灾难. 编译通过,在debug的时候,我看见了这个.....Program received sign ...

  4. Program received signal SIGSEGV, Segmentation fault.

    GDB调试的时候出现了: Program received signal SIGSEGV, Segmentation fault.(程序收到信号SIGSEGV,分段故障) SIGSEGV:在POSIX ...

  5. error: Program received signal SIGSEGV, Segmentation fault. (Codeblocks, C++)(2)

    之前,针对这个问题也总结过:"error: Program received signal SIGSEGV, Segmentation fault. (Codeblocks, C++)&qu ...

  6. error: Program received signal SIGSEGV, Segmentation fault. (Codeblocks, C++)

    关于"error: Program received signal SIGSEGV, Segmentation fault.". 之前多次遇到的情况都是:对空指针进行了操作. 比如 ...

  7. dev c++ 中的Program received signal SIGSEGV Segmentation fault

    在编写程序的时候程序不能正确输出结果或者程序无法运行 在debug的时候系统提示 系统提示报错Segmentation fault 从字面上理解 SIGSEGV是是当一个进程执行了一个无效的内存引用, ...

  8. Debug:Program received signal SIGSEGV,Segmentation fault.

    错误描述 最近在用Dev-C++编写程序时,程序能够编译运行,奈何本该接收键盘输入数据的程序,运行之后直接显示"请按任意键继续-"字样结束运行了.调试后发现了报错信息"P ...

  9. cuda-gdb 调试 Program terminated with signal SIGKILL, Killed. The program no longer exists.

    问题简介: cuda-gdb 调试 Program terminated with signal SIGKILL, Killed. The program no longer exists. 问题背景 ...

最新文章

  1. 对多个button触发enter操作,执行不同的操作
  2. 什么是php数组,php 数组写法是什么
  3. 【突破移动端性能极限】
  4. 定时/计数器(定时和计数的功能)、定时器中断
  5. 您基于JEE的Web项目的结构是什么?
  6. vba批量合并指定的sheet_用VBA实现把多个Excel文件合并到一个Excel文件的多个工作表(Sheet)里...
  7. 【软考信息系统项目管理师】必背重点之信息化和信息系统
  8. 在解压缩某些文件时出现问题检查计算机上,rar文件解压缩失败解压末端出现错误的解决方法...
  9. Chfs 文件共享工具
  10. ijk基于exo_github上十二款最著名的Android播放器开源项目
  11. windows下载并安装JDK
  12. 服务器问题网站拔毛,网站被百度拔毛的经验分析
  13. 大白话 同步阻塞、同步非阻塞、异步非阻塞
  14. 基于51单片机无线门铃控制系统设计(毕设课设)
  15. java onmouseover_第8天:javascriptDOM小 案例、onmouseover 、onmouseout
  16. windows10下安装MSYS2+MinGW64
  17. 三相四线相位表查错误接线方法与步骤
  18. [MicroPython]TurniBit开发板DIY自动窗帘模拟系统
  19. 学生公寓管理java_基于JAVA的学生公寓管理系统需要用到那些技术?
  20. 一台电脑主机怎样连接两个显示器

热门文章

  1. 80后创业故事之:兄弟散伙,创业失败(转)
  2. linux硬件时间修改与查看
  3. dasblog的安装
  4. CodeForces - 1213E Two Small Strings(暴力+构造)
  5. CodeForces - 1000D Yet Another Problem On a Subsequence(动态规划+组合数学)
  6. 证件照排版软件_证件照小程序换背景(制作免费版)
  7. oracle 默认 服务器,Oracle的默认用户密码
  8. android actviity模糊,Framework启动过程浅析
  9. 28.特性trait.rs
  10. 27.泛型generics.rs