简体   繁体   English

强行迫使程序因输入不同而崩溃的策略是什么?

[英]What's the strategy called of brute forcing a program to crash with different inputs?

I recall hearing about an effective testing strategy that helps find bugs in software. 我记得曾经听说过一种有效的测试策略,该策略可以帮助您发现软件中的错误。 It involved using another program to generate various inputs. 它涉及使用另一个程序来生成各种输入。 By trying thousands of different inputs, we hopefully cause the program to go down an execution path that it does not normally go down. 通过尝试数千种不同的输入,我们希望使程序沿正常情况下不会执行的执行路径执行。 The goal being to get programs to crash, or throw exceptions, giving us insight to improve the quality of software. 目标是使程序崩溃或引发异常,从而使我们能够洞悉提高软件质量。 I believe it was even had some kind of heuristic, where it was able to know whether it was getting somewhere different in the code based on the inputs it was sending. 我相信它甚至具有某种启发式的功能,它能够根据发送的输入信息知道它在代码中是否有所不同。

I can't learn more about it, because I can't recall what this method of testing was called. 我无法了解更多,因为我不记得这种测试方法被称为什么。

If it helps, I think it was mentioned in regards to C++. 如果有帮助,我认为它是在C ++方面提到的。 Maybe it was a compiler extension. 也许是编译器扩展。 I remember the speaker showing how he would write some kind of test rule, then the implementation, and then brute force it to show edge cases that he missed. 我记得演讲者展示了他将如何编写某种测试规则,然后是实现,然后通过蛮力展示了他错过的一些极端情况。

这称为模糊测试,您可以在此处找到更多信息: https : //en.wikipedia.org/wiki/Fuzz_testing

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM