LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 687|回复: 4

可恶的段错误

[复制链接]
发表于 2003-11-9 14:16:27 | 显示全部楼层 |阅读模式
我的程序在win下执行正常,到linux下,提示说有段错误。可是结果是正确的,段错误到底是什么错误啊?
发表于 2003-11-9 18:36:30 | 显示全部楼层
gdb
 楼主| 发表于 2003-11-9 19:49:43 | 显示全部楼层
我用insight调试的,一直都正常,到程序结束的时候才弹出一个对话框,我忘记了,好像是没找到breakpoint,根本没有那个错误,可是运行的时候就有。
发表于 2003-11-9 21:23:12 | 显示全部楼层
那就调试core了
发表于 2003-11-10 18:46:52 | 显示全部楼层

welcome to the world of segmentation fault!

most probably you used an crazy pointer which points to some forbidden area, for example, a NULL pointer or a pointer that doesn't even exist!

Mr. kernel would send your program a SEGV signal 11 to kill it.

be careful when dealing with pointers!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表