无限循环检测 [英] infinite loop detection

查看:37
本文介绍了无限循环检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个程序在一两天后总是死了,我想

在某个地方,一段代码怀疑涉及到一个

无限循环。但由于某种原因,调试非常困难。所以我可能会有一些工具可以静态分析代码和

如果发现这种潜在的问题请注意我。有什么建议吗? (

i更喜欢linux开源工具)


谢谢。


-

木质

i have a program which always run dead after one or two days, i think
somewhere a piece of the code is suspicious of involving into a
infinite loop. but for some reason, it is very hard to debug. so i
thing there might be tool which can statically analysis the code and
notice me this kind of potential problems if found. any suggestion? (
i prefer linux open source tools )

thanks.

-
woody

推荐答案

文章< 11 ******************* **@m79g2000cwm.googlegroups。 com>,

Steven Woody< na ******** @ gmail.comwrote:
In article <11*********************@m79g2000cwm.googlegroups. com>,
Steven Woody <na********@gmail.comwrote:

>我有一个在一两天后总是运行死的程序,我认为在某个地方,一段代码怀疑涉及到无限循环。但由于某种原因,调试非常困难。所以我可能有工具可以静态分析代码,并注意到如果发现这种潜在的问题。有什么建议吗? (
我更喜欢linux开源工具)
>i have a program which always run dead after one or two days, i think
somewhere a piece of the code is suspicious of involving into a
infinite loop. but for some reason, it is very hard to debug. so i
thing there might be tool which can statically analysis the code and
notice me this kind of potential problems if found. any suggestion? (
i prefer linux open source tools )

http://en.wikipedia.org/wiki/Halting_problem

-

编程是在你忙于制定其他计划的时候发生的事情。

http://en.wikipedia.org/wiki/Halting_problem
--
Programming is what happens while you''re busy making other plans.


Walter Roberson< ro ****** @ ibd.nrc-cnrc.gc.cawrote:
Walter Roberson <ro******@ibd.nrc-cnrc.gc.cawrote:

Steven Woody< na ******** @ gmail.comwrote:
Steven Woody <na********@gmail.comwrote:

i有一个程序在一两天后总是死了,我想想

在某个地方,一段代码怀疑涉及到一个

无限循环。但由于某种原因,调试非常困难。所以我可能会有一些工具可以静态分析代码和

如果发现这种潜在的问题请注意我。有什么建议吗? (

i更喜欢linux开源工具)
i have a program which always run dead after one or two days, i think
somewhere a piece of the code is suspicious of involving into a
infinite loop. but for some reason, it is very hard to debug. so i
thing there might be tool which can statically analysis the code and
notice me this kind of potential problems if found. any suggestion? (
i prefer linux open source tools )



1)正如沃尔特指出的那样,你的问题没有一般性的< br $> b $ b解决方案。


2)有可能有一些开源代码分析工具

可以使用一个启发式方法来识别潜在的错误,但是这个新闻组不是一个可以询问它的地方:

http://www.ungerhu.com/jxh/clc.welcome.txt
http://c-faq.com
http://benpfaff.org/writings/clc/off-topic.html


3)即使你找到了这样一个工具,是什么让你认为你的b $ b问题是一个无限循环?你怎么知道你没有内存泄漏的内存泄漏?


4)我肯定comp.unix.programmer会是能够建议好的

调试工具和技术来帮助你解决问题。


-

C. Benson Manica |我*应该*知道我在说什么 - 如果我

cbmanica(at)gmail.com |不,我需要知道。火焰欢迎。

1) As Walter pointed out, your problem does not have a general
solution.

2) It is possible that there is some open-source code analysis tool
that may be able to use a heuristic to identify potential bugs, but
this newsgroup is not the place to ask about it:

http://www.ungerhu.com/jxh/clc.welcome.txt
http://c-faq.com
http://benpfaff.org/writings/clc/off-topic.html

3) Even if you found such a tool, what makes you think that your
problem is an infinite loop? How do you know that you do not have a
memory leak, for exmaple?

4) I''m sure comp.unix.programmer would be able to suggest good
debugging tools and techniques to help you solve your problem.

--
C. Benson Manica | I *should* know what I''m talking about - if I
cbmanica(at)gmail.com | don''t, I need to know. Flames welcome.


Steven Woody< na ******** @ gmail.comwrote:


(道歉对于那些看到此消息重复的人,原来的

被错误地发布为对Walter的帖子而不是OP的回复。)
Steven Woody <na********@gmail.comwrote:

(Apologies to those who see a duplicate of this message, the original
was mis-posted as a reply to Walter''s post rather than to OP.)

i有一个程序在一两天后总是运行死亡,我想

某个地方的某段代码可疑涉及到

无限循环。但由于某种原因,调试非常困难。所以我可能会有一些工具可以静态分析代码和

如果发现这种潜在的问题请注意我。有什么建议吗? (

i更喜欢linux开源工具)
i have a program which always run dead after one or two days, i think
somewhere a piece of the code is suspicious of involving into a
infinite loop. but for some reason, it is very hard to debug. so i
thing there might be tool which can statically analysis the code and
notice me this kind of potential problems if found. any suggestion? (
i prefer linux open source tools )



1)正如沃尔特指出的那样,你的问题没有一般性的

解决方案。


2)有可能有一些开源代码分析工具

可能能够使用启发式识别潜在的错误,但

这个新闻组不是这个问题的地方:

http://www.ungerhu.com/jxh/clc.welcome.txt
http://c-faq.com
http://benpfaff.org/writings/clc/off-topic.html


3)即使你找到了这样一个工具,是什么让你觉得你的问题是一个无限循环?你怎么知道你没有内存泄漏的内存泄漏?


4)我肯定comp.unix.programmer会是能够建议好的

调试工具和技术来帮助你解决问题。


-

C. Benson Manica |我*应该*知道我在说什么 - 如果我

cbmanica(at)gmail.com |不,我需要知道。火焰欢迎。


-

C. Benson Manica |我*应该*知道我在说什么 - 如果我

cbmanica(at)gmail.com |不,我需要知道。火焰欢迎。

1) As Walter pointed out, your problem does not have a general
solution.

2) It is possible that there is some open-source code analysis tool
that may be able to use a heuristic to identify potential bugs, but
this newsgroup is not the place to ask about it:

http://www.ungerhu.com/jxh/clc.welcome.txt
http://c-faq.com
http://benpfaff.org/writings/clc/off-topic.html

3) Even if you found such a tool, what makes you think that your
problem is an infinite loop? How do you know that you do not have a
memory leak, for exmaple?

4) I''m sure comp.unix.programmer would be able to suggest good
debugging tools and techniques to help you solve your problem.

--
C. Benson Manica | I *should* know what I''m talking about - if I
cbmanica(at)gmail.com | don''t, I need to know. Flames welcome.

--
C. Benson Manica | I *should* know what I''m talking about - if I
cbmanica(at)gmail.com | don''t, I need to know. Flames welcome.


这篇关于无限循环检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆