> Once the executable code has been generated, it should be possible to
> say in a well-defined subset of cases whether the resultant binary is
> trying to perform a nonsense operation.
That would be a solution to the halting problem. So, no -- not possible.
What Every C Programmer Should Know About Undefined Behavior #3/3
Posted May 22, 2011 8:36 UTC (Sun) by nteon (subscriber, #53899)
[Link]
well, patches welcome of course :)
What Every C Programmer Should Know About Undefined Behavior #3/3
Posted May 23, 2011 15:19 UTC (Mon) by HelloWorld (guest, #56129)
[Link]
> That would be a solution to the halting problem.
How so?
What Every C Programmer Should Know About Undefined Behavior #3/3
Posted May 23, 2011 15:53 UTC (Mon) by vonbrand (subscriber, #4458)
[Link]
It is possible to find a set of conditions in which nothing strange happens (by simulating the program running in each case, or some sophisticated variation thereof). The problem is that doing so is a lot of work, and/or the resulting set of "safe" uses is disappointingly small.