[Top][All Lists]

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

Re: [Tinycc-devel] Tinycc from git still can't compile fossil-scm

From: Michael Matz
Subject: Re: [Tinycc-devel] Tinycc from git still can't compile fossil-scm
Date: Sun, 30 Mar 2014 00:20:07 +0100 (CET)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)


On Sat, 29 Mar 2014, Domingo Alvarez Duarte wrote:

Thanks for pointing it and show an example to test !
Now going back to the original problem the original tcc implementation leaks
memory on:
void *__va_copy(struct __va_list_struct *src)
    struct __va_list_struct *dest =
        (struct __va_list_struct *)malloc(sizeof(struct __va_list_struct));
    *dest = *src;
    return dest;

No, that's not leaking memory, because a va_copy _must_ be paired with a va_end call in client code. And that one will release the allocated memory.

And I'll continue investigating a way to make it work with fossil-scm for the X86_64, the problem that I saw is that there is a double free when the process fork somehow the fossil compiled by tcc seem to not duplicate the malloced strioneng and both the parent and child free the same string.

That's no double free, because the process space will be unshared after fork. I don't know what tool you used that pointed out a double free in this specific situation, but if it really thought this situation is a double free then it's buggy.


reply via email to

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