Tough bugs
Tuesday, July 15th, 2008I’m still working on fixing the remaining known problems in Macrobug’s Stray Event Scanner.
I don’t intend to try to make it perfect – because, when understanding code, there’s always an exponential effort required to understand the rarest features. For example, the tool will never support the C goto keyword where it skips backwards up a function. (The tool already supports forward gotos!)
But, I do want to enhance support for a few more things. For example, if code Leaves, it currently considers what happens when the code either leaves or it doesn’t. That’s usually correct, apart from when functions are used which are always guaranteed to leave (for example, User::Leave). Then the tool should only consider the code path which occurs if the function does leave, and any errors after that should not be reported (until of course the leave is trapped). Unfortunately, this is tricker than it sounds given the tool’s current architecture.
In short, I think I’ve fixed most of the easy bugs and I’m now facing the exponential curve of tricky obscure things to fix! Let’s see how far up that curve I get before giving up and rolling back down again. I want to make the tool output as good as possible, but it’s already much better than having no means to detect these problems.

