Hacker News new | past | comments | ask | show | jobs | submit login

Allowing one app to register more than one phone service provider smells like an Android API bug. Allowing an unlimited number definitely is a bug. Allowing the corresponding integer to overflow and... well... do we really need to argue this point?

A phone OS should never have to rely on good app behavior to not collapse like a house of cards. Much less one made by a corporation with a 71% worldwide market share.




The OS was bugged. The method that fetches the phone service providers for emergency services returned a sorted list of all service providers. Had the necessary filters been in place, the index issue wouldn't even have become a problem.

The integer overflow issue was part of a very flawed last resort branch of a piece of sorting code. It did underflow, but the underflow happened in a piece of code that basically sorted two objects by their memory addresses at that point. There was no way to recover from that, the problem should've been caught way before instead.

It's awful that code this important is this buggy, but no code is entirely bug free and hard coding behaviour would only hard code the bug further. This is a problem that can only be solved with higher standards, better testing, and better code analysis tools.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: