Skip to Content.
Sympa Menu

svadev - Re: [svadev] Using freed pointer

svadev AT lists.siebelschool.illinois.edu

Subject: Svadev mailing list

List archive

Re: [svadev] Using freed pointer


Chronological Thread 
  • From: John Criswell <criswell AT illinois.edu>
  • To: Thomas Sanchez <thomas.sanchz AT gmail.com>
  • Cc: svadev AT cs.uiuc.edu
  • Subject: Re: [svadev] Using freed pointer
  • Date: Thu, 18 Aug 2011 17:14:53 -0500
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
  • List-id: <svadev.cs.uiuc.edu>
  • Organization: University of Illinois

Dear Thomas,

Just an update on this issue. I successfully got the CompleteChecks pass to work on your test case, so the invalid load is detected and reported.

The code may still have some issues, but if you want to try it out, you can do the following (assuming you are using Mac OS X):

1) Check out and build SAFECode from the SVN repository.
2) Make a backup copy of /usr/lib/libLTO.dylib.
3) Copy the libLTO.dylib from the SAFECode build directory (usually Debug+Asserts/lib/libLTO.dylib) into /usr/lib.
4) Recompile using the new clang compiler you built.

Be sure to read the Install Guide (http://sva.cs.illinois.edu/docs/Install.html) if you attempt to do this.

-- John T.


On 8/18/11 11:33 AM, Thomas Sanchez wrote:
Hi,
I just read the mail on the clang mailing list talking about SAFE.
I'am pretty interested in this tool but the first test I did was not a
full success:

int main(int ac, char** av)
{

char* ptr = new char;
*ptr = 9;
delete ptr;
return *ptr;
}

$> ./bin/clang++ -g -fmemsafety test.cpp -Llib -lsc_dbg_rt
-lpoolalloc_bitmap -lstdc++
$> ./a.out
$> echo $?
9

Should'nt this code trigger some errors during the execution ?

I'm on Mac OS X 10.7.


Thank you !






Archive powered by MHonArc 2.6.16.

Top of Page