Skip to Content.
Sympa Menu

svadev - Re: [svadev] Fwd: BBC _barebone_boundscheck function

svadev AT lists.siebelschool.illinois.edu

Subject: Svadev mailing list

List archive

Re: [svadev] Fwd: BBC _barebone_boundscheck function


Chronological Thread 
  • From: Baozeng <sploving1 AT gmail.com>
  • To: John Criswell <criswell AT illinois.edu>
  • Cc: svadev AT cs.illinois.edu
  • Subject: Re: [svadev] Fwd: BBC _barebone_boundscheck function
  • Date: Fri, 25 May 2012 21:59:17 +0800
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
  • List-id: <svadev.cs.uiuc.edu>



2012/5/25 John Criswell <criswell AT illinois.edu>
On 5/24/12 8:54 PM, Baozeng wrote:


[snip]


Dest's size is 32-bit. I use Dest = (Dest | 0xc0000000); It works. So SET_MASK may be not set to be 0xc0000000 as expected.
I change the code in safecode/runtime/include/BBRuntime.h as the following:
 #if defined(_LP64)
#define UNSET_MASK 0x7fffffffffff
#define SET_MASK 0xffff800000000000
#else
#define UNSET_MASK  0xbfffffff
#define SET_MASK  0xc0000000
#endif

Then I "make -j8 && make install" in the safecode dir, but it still does not work. It still output 0 when I use printf("SET_MASK is %d", SET_MASK);

Try using %ld instead of %d.

Also, use a #warning or #error direction as Alex suggested to verify that _LP64 isn't defined.
I know the reason. There are two files named BBRuntime.h. One is in include/safecode/runtime, the other one is in runtime/include. I changed the SET_MASK both, (see the commit), then it works. I wonder why there are two files BBRuntime.h? Their content is nearly the same,except the included head file. Can we delete one?


I'm guessing that Dest is too small to hold the result, and so the top bits get chopped off.  However, I could be wrong.  Where in the code is this again?

  Dest = (Dest | SET_MASK) code is in safecode/runtime/BBRuntime/RuntimeChecks.cpp 's _barebone_boundscheck function.

Just to make sure we're on the same page, you've verified that val is true (if val is false, then the Dest = (Dest | SET_MASK) won't be executed).

-- John T.



-- John T.




--
     Best Regards,
                                                                 Baozeng Ding
                                                                 OSTG,NFS,ISCAS






--
     Best Regards,
                                                                 Baozeng Ding
                                                                 OSTG,NFS,ISCAS





Archive powered by MHonArc 2.6.16.

Top of Page