chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Chicken git egg: bug & patch


From: Kristian Lein-Mathisen
Subject: Re: Chicken git egg: bug & patch
Date: Mon, 14 Jun 2021 01:29:53 +0200


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.

On Sun, Jun 13, 2021 at 11:19 PM Evan Hanson <evhan@foldling.org> wrote:
Hi Kristian,

On 2021-06-12 15:36, Kristian Lein-Mathisen wrote:
> I think I may have come across a bug in the git egg.

You're right! THanks for pointing this out, I guess you must be the
first person to use that `frombuffer` procedure.

Everything you've said looks correct to me, I'll try to publish a fix
for this soon.

Evan

Attachment: 0001-Fix-mismatched-blob-create-frombuffer-signature.patch
Description: Text Data

Attachment: 0003-Fix-for-memory-corruption.patch
Description: Text Data

Attachment: 0002-Fix-blob-function-reference-typo.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]