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: Sat, 26 Mar 2011 23:31:58 -0700

On Sat, Mar 26, 2011 at 5:13 AM, grischka <address@hidden> wrote:
>> Looking at the disassembly, it seems that the '!' operator causes a
>> register to be stomped on.  ...
>> I've tried to fix it, but I'm kinda lost in the bounds-checking logic.
>>  Anyone have any ideas?
>
> I recall there was a similar problem without bounds-checking:
>    http://landley.net/hg/tinycc/rev/3f48bed56ab4
>    +  437: Call 'saveregs()' before jumping with logical and/or/not

Thank you, it's much appreciated.  I was messing around blindly with
those saveregs() calls and a bunch of other stuff before realizing
that it isn't anything weird, it's exactly what it "looks" like.

In vstore(), the gbound() call should be done immediately before the
store(), not before the gv(rc) call, and certainly not outside of the
!nocode_wanted block, right?

Just moving the gbound() block down directly before the store(r, vtop
-1) solves the problem, it seems.

.



reply via email to

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