Linux C 几种异常问题解决方法

段错误

1.gdb调试

https://blog.csdn.net/oria_2006/article/details/80982704?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522160612186719725225060985%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=160612186719725225060985&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_v2~rank_blog_default-1-80982704.pc_v2_rank_blog_default&utm_term=gdb&spm=1018.2118.3001.4450

2.日志定位

3.objdump定位

4.打印堆栈信息

https://mp.csdn.net/editor/html/8242424

内存、句柄泄漏

1.使用内存池和连接池技术代替直接系统调用

2.单元测试工具

https://blog.csdn.net/oria_2006/article/details/9794395?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522160612186719725225060985%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=160612186719725225060985&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_v2~rank_blog_default-2-9794395.pc_v2_rank_blog_default&utm_term=gdb&spm=1018.2118.3001.4450

 

你可能感兴趣的:(C++)