Nitesh on Nostr: For all the smart devs out there, can anyone give me ideas on how to debug a segfault ...
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.
Published at
2025-02-23 23:44:39Event JSON
{
"id": "1b326f59f8a0390d4665e4e9ee580df054a93bee7ba77a307555727a5b43df3e",
"pubkey": "021d7ef7aafc034a8fefba4de07622d78fd369df1e5f9dd7d41dc2cffa74ae02",
"created_at": 1740354279,
"kind": 1,
"tags": [],
"content": "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. \n\nOn ios, it works fine. On android it segfaults saying null pointer dereference. \nWeird part is, if I build and use a static lib for android it works fine. \nNow 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. ",
"sig": "a7ee040f4666c70c92ea0d05b70b32cc4188d071f1e824cb406f454934bbd49cde2f8efb18039bc0e8f11f6ce19a6d738c56a2cc5f49087dc8cf611bf4dd785f"
}