Hello folks,
I have been getting AFL setup for cjdns fuzzing and I encountered the dreaded:
clang: error: unable to execute command: Segmentation fault
In case it might be useful to anyone else, this seems to be caused by LLVM
attempting to free memory belonging to a shared object after it has called
dlclose() on the object. I have filed a bug with everything I learned here:
https://bugs.llvm.org/show_bug.cgi?id=39321
In the mean time, there is a simple workaround which works on all machines I
have tested, just LD_PRELOAD hook ldclose() and do nothing:
https://github.com/cjdelisle/cjdnslop/blob/master/afl/catch-dlclose.patch
Hope this helps someone.
Thanks,
Caleb