Check out my latest product, BuildFactory

you can call me the exterminator

I've been working on consulting code for a company that will rename nameless. They contracted some of their software development out of firm a while back, and have been hampered with this set of code ever since, and brought me in to fix their Mac and Linux code. The code has been a true exercise in futility, I've had sub-processes SIGSEGV shortly after attaching gdb(1) to them, and watched as modules would die out for no apparent reason.

After days and days of staring at code, screaming, watching logging output, pagan rituals, and general debuggery, I finally found the bug.

I isolated the bug to a specific module, and then to a helper process that is run along side that module, and eventually found the problem, about 8 or 9 lines of code that resemble this:

someToken = strtok(NULL, "\t ");
someVar = atoi(someToken);


Yikes.

[tags: , , , , ]
  • Posted: 24/08/06 05:53PM
  • Category: Lost Bugs

Replies

Awesome!

<grumpy_engineer> Our code is written in standard C and it's great! What is this NSString of which you speak?

One thing that's always struck me as interesting is how no real equivalent to Foundation has ever caught on in the open-source cross-platform world. Or, perhaps, too many of them caught on, but you know what I mean.
boost.org :)

Write reply

This item is closed, it's not possible to add new comments to it or to vote on it
www.flickr.com