Hi Evan,
And thanks for getting back to me. I found another problem related to memory corruption and I've been digging around. I have patches for that too, but I don't know if they suffice. They sort of break existing conventions of everything in libgit2 being foreigners and c-pointers.
I'm attaching my patches here in case you have time to look into this.
The attachments here include the fixes in the previous mail too, so please ignore that one.
From what I gather, there is no way to allocate memory and return a pointer to it, safely, in CHICKEN.
Won't the garbage collector potentially overwrite whatever region was allocated since it has no way of knowing it?
That's why I made (make-oid) and friends return chicken blobs instead. Let me know if there's a better way!
K.