Advice on diagnosing segfaults?

Adrian Cochrane adrian at openwork.nz
Sun Oct 1 20:47:52 UTC 2023


Hi,

I've got a segfault in one of the language bindings I'm developing 
(fontconfig-pure), and I'm struggling to locate it.

I see it occur in another project calling the language binding (so 
unfortunately I don't know what exactly is causing it), but GDB tells me 
that it occurs within a particular function I'm language binding to (and 
nothing more). I've attempted a few theoretical fixes without 
improvement (beyond triggering an infinite loop instead). And setting a 
breakpoint on the wrapper-function I added to create a better ABI to 
language bind to shows that dozens (if not more) of these calls 
successfully before I hit the segfault.

I'm not sure how to diagnose this issue, any help would be appreciated!

Cheers,

Adrian Cochrane

OpenWork Ltd

libdggs spatial analysis

Rhapsode & Haphaestus web browsers



More information about the FFI mailing list