代码复制有风险
来源:互联网 发布:mac系统重装教程 编辑:程序博客网 时间:2024/04/28 12:55
程序原来支持IPv4,现在要支持IPv6,只有IP地址转换部分有区别,因此偷懒(时间也的确紧。。。)直接复制了原来代码修改,结果连续踩坑,v6好了,v4不能用了。。。
[DEBUG] &pgl:0x7ffef31e3868[DEBUG] pgl:0x100a1a0 tid:0 rid:0 q:0x7ffef31e57c0 header:0x7fff7820262a msg:0x7ffef31e6110 rbuff:0x100e258 rbuff_len:0x7ffef31e5334 t:1489484783[DEBUG] pgl->pgl:0x7ffe58df0010[DEBUG]&(pgl->pgl->sp_lock):0x7ffe597fa0d8[DEBUG] &pgl:0x7ffef31e3868[DEBUG] &pgl:0x7ffef31e3868[DEBUG] pgl:0x100a1a0 tid:0 rid:0 q:0x7ffef31e57c0 header:0x7fff7820262a msg:0x7ffef31e6110 rbuff:0x100e258 rbuff_len:0x7ffef31e5334 t:1489484783[DEBUG] pgl->pgl:0x7ffe58df0010[DEBUG]&(pgl->pgl->sp_lock):0x7ffe597fa0d8[DEBUG]pthread_rwlock_unlock pgl:0x100a1a0[DEBUG]pthread_rwlock_unlock pgl->pgl:0x7ffe58df0010[DEBUG]pthread_rwlock_unlock &(pgl->pgl->sp_lock):0x7ffe597fa0d8[DEBUG] &pgl:0x7ffef31e3868[DEBUG] pgl:0x100a1a0 tid:0 rid:0 q:0x7ffef31e57c0 header:0x7fff782013aa msg:0x7ffef31e6110 rbuff:0x100e258 rbuff_len:0x7ffef31e5334 t:1489484783[DEBUG] pgl->pgl:0x7ffe58df0010[DEBUG]&(pgl->pgl->sp_lock):0x7ffe597fa0d8[DEBUG] &pgl:0x7ffef31e3868[DEBUG] &pgl:0x7ffef31e3868[DEBUG] pgl:0x100a1a0 tid:0 rid:0 q:0x7ffef31e57c0 header:0x7fff782013aa msg:0x7ffef31e6110 rbuff:0x100e258 rbuff_len:0x7ffef31e5334 t:1489484783[DEBUG] pgl->pgl:0x7ffe58df0010[DEBUG]&(pgl->pgl->sp_lock):0x7ffe597fa0d8[DEBUG]pthread_rwlock_unlock pgl:0x100a1a0[DEBUG]pthread_rwlock_unlock pgl->pgl:0x7ffe58df0010[DEBUG]pthread_rwlock_unlock &(pgl->pgl->sp_lock):0x7ffe597fa0d8[DEBUG] &pgl:0x7ffef31e3868[DEBUG] pgl:0x100a1a0 tid:0 rid:0 q:0x7ffef31e57c0 header:0x7fff78200a6a msg:0x7ffef31e6110 rbuff:0x100e258 rbuff_len:0x7ffef31e5334 t:1489484783[DEBUG] pgl->pgl:0x7ffe58df0010[DEBUG]&(pgl->pgl->sp_lock):0x7ffe597fa0d8[DEBUG] &pgl:0x7ffef31e3868[DEBUG] &pgl:0x653666363a2ebeProgram received signal SIGBUS, Bus error.[Switching to Thread 0x7ffef31e7700 (LWP 38714)]dns_f2c_process (pgl=<error reading variable: Cannot access memory at address 0x653666363a2ebe>, pgl@entry=<error reading variable: Cannot access memory at address 0x653666363a393e>, tid=<error reading variable: Cannot access memory at address 0x653666363a2eba>, tid@entry=<error reading variable: Cannot access memory at address 0x653666363a393e>, rid=<error reading variable: Cannot access memory at address 0x653666363a2eb6>, rid@entry=<error reading variable: Cannot access memory at address 0x653666363a393e>, q=<error reading variable: Cannot access memory at address 0x653666363a2eae>, q@entry=<error reading variable: Cannot access memory at address 0x653666363a393e>, header=<error reading variable: Cannot access memory at address 0x653666363a2ea6>, header@entry=<error reading variable: Cannot access memory at address 0x653666363a393e>, msg=<error reading variable: Cannot access memory at address 0x653666363a2e9e>, msg@entry=<error reading variable: Cannot access memory at address 0x653666363a393e>, rbuff=<error reading variable: Cannot access memory at address 0x653666363a3946>, rbuff@entry=<error reading variable: Cannot access memory at address 0x653666363a393e>, rbuff_len=<error reading variable: Cannot access memory at address 0x653666363a394e>, rbuff_len@entry=<error reading variable: Cannot access memory at address 0x653666363a393e>, t=<error reading variable: Cannot access memory at address 0x653666363a3956>, t@entry=<error reading variable: Cannot access memory at address 0x653666363a393e>) at plug_dns_process.c:780780printf("[DEBUG] pgl:%p tid:%d rid:%d q:%p header:%p msg:%p rbuff:%p rbuff_len:%p t:%d\n",pgl, tid, rid, q, header, msg, rbuff, rbuff_len, t);Missing separate debuginfos, use: debuginfo-install glibc-2.17-105.el7.x86_64折腾了一天,通过笨方法,printf,夹逼到问题代码段,一眼就看出了问题
v4中原来是sp_value =(char*)inet_ntop(AF_INET,value,ip,48);
v6中是sp_value =(char*)inet_ntop(AF_INET6,value,ip,48);
结果修改v6的时候把v4也改成sp_value =(char*)inet_ntop(AF_INET6,value,ip,48);了
0 0
- 代码复制有风险
- 复制粘贴有风险使用需谨慎
- 代码复制到底有没有加速开发
- 【醒】复制粘贴代码有大隐患
- 穿越有风险
- 入侵有风险,放马需谨慎
- 网上创业亦有风险
- 使用JAVA发多人邮件,有附件,有完整代码,复制便可用
- 投资理财:货币基金也有风险
- 股市有风险,入市需谨慎
- Foxmail7.0.1.86升级有风险
- 将有更少的财务损失风险
- 外链图片也有风险吗
- 外链图片也有风险吗?
- 使用Linux的安全风险有哪些
- 测试计划中风险有哪些?
- “楼市有风险 离婚需谨慎”
- java有风险 跳槽需谨慎!!!
- Android,在争议中逃离 Linux 内核的 GPL 约束
- Oracle日期比较:2015/6/3 19:18:29 DATE类型 与 20161128095601 VARCHAR2(16)类型
- Android Studio中导入Eclipse项目
- 项目架构开发:服务层
- 【Linux基础】Linux C编程环境
- 代码复制有风险
- 【第二十一课】流----System类中SetErr和SetOut方法的使用
- 2017年春招途牛前端初面面经
- Linux第二课总结
- Web开发中常见的认证机制
- IOC基础
- eclipse虚拟机内存溢出解决方法
- 《java语言程序设计》第八章学习总结
- Android 安卓设计中的.9.png