On Tue, Jun 09, 2015 at 03:26:35PM +0800, Oon-Ee Ng wrote: > How do I track down the issue? The library's source code is available, > but without knowing it well I'm unsure where to even begin. Try running a small program using the library in valgrind. The output should provide you with some hints. GDB (like Florian suggested) is also an option but, personally, I find valgrind a bit more convenient for such first quick checks. It also flags invalid memory accesses that do not cause your program to get killed. If valgrind turns out to be unusably slow, you might also try to build with ASan/AddressSanitizer enabled. Search the web for more info.