Smart phone RIL
After tinkering with cameras and solar power systems, it was time to play around a bit with Android – in the form of CyanogenMod. After setting up a build environment for my i9100 (a Galaxy S2 in marketing terms), I decided to help figure out a problem with open-sourcifying one of the libraries for it, namely libril (part of the radio interface layer).
This device has a history of freaking out OSS people, and libril was no different, as can be seen in the code review for the library. While the same code would work perfectly fine on similar devices with similar radios, it kept crashing on the i9100 upon dialing out. After some debugging, I found out that the UUS (user-to-user signaling) handling was causing the crash – a MEMMAP SIGSEV error!
Namely, it was memset(&uusInfo, 0, sizeof(RIL_UUS_Info));
that caused the kernel to freak. Intermediate solution? Remove the UUS information, as it is not really mandatory. The question remains: why can’t the phone allocate the (little) memory required for this struct? Might have something to do with heap/stack allocation…