- 论坛徽章:
- 0
|
问题来了,在移植djbdns的代码,跟踪到这里,发现在1111111111处停下来,如果注释掉111111111,那么就在222222222处停下来
按理说1111111111和222222222222都只是简单操作,111处为无返回值的操作,222处为简单赋值。程序运行也没有崩溃信息,只是正常退出
求解为什么退出?
- //**out是一段域名,如03www05baidu03com
- int dns_domain_copy(char **out,const char *in)
- {
- unsigned int len;
- char *x;
- printf("zengqjdebug file=%s, line = %d\r\n", __FILE__, __LINE__);
- len = dns_domain_length(in);
- printf("zengqjdebug file=%s, line = %d\r\n", __FILE__, __LINE__);
- x = alloc(len);
- printf("zengqjdebug file=%s, line = %d\r\n", __FILE__, __LINE__);
- if (!x) return 0;
- printf("zengqjdebug file=%s, line = %d\r\n", __FILE__, __LINE__);
- byte_copy(x,len,in);
- printf("zengqjdebug file=%s, line = %d\r\n", __FILE__, __LINE__);
- if (*out) alloc_free(*out);//1111111111111
- printf("zengqjdebug file=%s, line = %d\r\n", __FILE__, __LINE__);
- *out = x;//22222222222222
- printf("zengqjdebug file=%s, line = %d\r\n", __FILE__, __LINE__);
- return 1;
- }
复制代码 |
|