Reply to post: Timer not running

'I bet Russian hackers weren't expecting their target to suck so epically hard as this'

FatGerman

Timer not running

I recall finding a bug in a proprietary mobile OS emulator, in the days when there was more than just iOS and Android*

The OS used POSIX signalling. A lot. Timers were a very important part of this. You'd create a timer, which would be given an ID by the OS. And then some time later you'd get a signal saying your timer had expired and which ID it was. Quite neat, quite useful. Except that the timer ID was a 32 bit unsigned number, automatically incremented by the OS every time a timer was created. And the ID where every bit was '1' was used to indicate 'this timer has expired, please clean up the memory associated with it'. But the routine that assigned the IDs was blissfully unaware of this fact, meaning that while running our test suite, every 38 hours or so a timer would be created with an ID that would mean it would never expire. Took me a week of scouring debug logs to twig that one.

*Yes I know there's Windows Phone, but I'm expecting that to be dead by the time I finish typing.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon