tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] tricky little bounds-checking bug


From: Joe Soroka
Subject: Re: [Tinycc-devel] tricky little bounds-checking bug
Date: Thu, 7 Apr 2011 23:09:46 -0700

On Thu, Apr 7, 2011 at 7:05 AM, grischka <address@hidden> wrote:
>> Before you invest too much time however note that Fabrice once said
>> that there is some flaw in the implementation of in the bounds checker
>> with (as I understood it) possible impact on reliability of detection.
>> I don't know what exactly he meant though.
>
> FYI, this was Fabrice's original message (from 2007/11):
>
> "Another point is that I realized that the bound check region algorithm
> used in TCC is completely broken (the code to search the region associated
> to a pointer does not work in all cases). I think the only way to make it
> work reliably is to tag each allocated byte with one bit."

Thanks, I appreciate it.  I'm not too concerned with making
bounds-checking work globally, though...  I just wanted to get VLA
working with bounds checking, since the last VLA patch didn't, and I
stumbled upon the fact that tcc itself doesn't run under bounds-checks
and went off on that tangent.  I see now what needs to change to get
tcc running under bounds-checks but I want to get VLA in first.

Basically, Thomas' patch said that it didn't work with bounds-checking
and had a warning, but it actually appears to work just fine with
bounds-checking on, so no problem there.  I just have a couple of
changes to make to Thomas patch and that should do it for now.  I was
planning to push VLA tonight.

Thanks for your help.

Joe



reply via email to

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