For all the smart devs out there, can anyone give me ideas on how to debug a segfault at runtime. The scenario is, I built a rust lib that calls into some C code. I compiled it into a static lib for ios and shared lib for android.

On ios, it works fine. On android it segfaults saying null pointer dereference.

Weird part is, if I build and use a static lib for android it works fine.

Now I have no idea how to debug this issue because I am not getting any logs or traces. I don't want to use a static lib for android because it makes the apk larger, ideally I want to use a dylib.

Reply to this note

Please Login to reply.

Discussion

Put a log statement between every line of code, the log that doesn't run is the line where the segfault is happening.