[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: Domingo Alvarez Duarte
Subject: Re: [Tinycc-devel] Tinycc from git still can't compile fossil-scm
Date: Sun, 30 Mar 2014 16:10:48 +0100

First of all thanks for Daniel for the fix !

I followed the code on fossil-scm with printfs on va_start/va_end using the previous tcc stdargs implementation and it showed me that both the parent and child do va_end on the same pointer that's why the segfault.

And as I looked on the generated code by gcc/clang/pcc all of then do not us alloc/call all is inlined so no problem of double free.

So I'll not bother look any further on fossil-scm to find why it happens with the old tcc stdarg implementation.

Thanks again for all of you for this great work !

On Sat, Mar 29, 2014 at 11:37 PM, Michael Matz <address@hidden> wrote:

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

clang and pcc also generates inline assembly instead of call/alloc.

Yes.  I haven't said the relevant stdarg functions have to use malloc. They just need to interoperate with what the ABI says (and that's passing by pointer).  Daniel downthread is correct in that va_list itself doesn't have to be a pointer, that was merely TCCs way of fulfilling the ABI requirements.  So he fixed it meanwhile, so I'm fine.

The fossil-scm issue should still be investigated somewhen.  TCCs old implementation of stdarg was conforming, so changing it to something else shouldn't affect any correctly written code (meaning that I'd suspect either some different bug in TCC that now is merely hidden, or a bug in fossil-scm (perhaps in their usage of stdarg functions) that's now hidden).


Tinycc-devel mailing list

reply via email to

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