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
On Mon, 2 Oct 2023, Adrian Cochrane wrote:
I've got a segfault in one of the language bindings I'm developing (fontconfig-pure), and I'm struggling to locate it.
I could solve some problems in my C library bindings using ltrace. It logs all calls to external C libraries together with the function parameters. You can create a config file in order to improve reporting of passed parameters. Another useful tool might be valgrind. I think it should also point you to the crashing function call.
participants (2)
-
Adrian Cochrane -
Henning Thielemann