svadev AT lists.siebelschool.illinois.edu
Subject: Svadev mailing list
List archive
- From: Baozeng <sploving1 AT gmail.com>
- To: mentor <criswell AT illinois.edu>, "svadev AT cs.uiuc.edu" <svadev AT cs.uiuc.edu>
- Subject: [svadev] memory safety for Cling
- Date: Thu, 18 Apr 2013 09:18:31 +0800
- List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev/>
- List-id: <svadev.cs.uiuc.edu>
Hi John,
[cling]$ ? private:
[cling]$ ? int a;
[cling]$ ? public:
[cling]$ ? MyClass() : a(1){}
[cling]$ ? int getA(){return a;}
[cling]$ ? };
[cling]$ MyClass* my = 0;
[cling]$ my->getA()
Segmentation fault (core dumped)
Baozeng Ding
OSTG,NFS,ISCAS
Cling ( http://root.cern.ch/drupal/content/cling) is an interactive C++ interpreter, built on the top of LLVM and Clang libraries. Currently when a memory error happens, Cling will trap a segmentation fault. For instance:
[cling]$ extern "C" int printf(const char* fmt, ...);
[cling]$ class MyClass {[cling]$ ? private:
[cling]$ ? int a;
[cling]$ ? public:
[cling]$ ? MyClass() : a(1){}
[cling]$ ? int getA(){return a;}
[cling]$ ? };
[cling]$ MyClass* my = 0;
[cling]$ my->getA()
Segmentation fault (core dumped)
We want to improve Cling by detection such NULL pointer dereference errors. The expected results should be as the following:
[cling]$ my->getA()
warning: you want to dereference a NULL pointer. do you still want to proceed?[y/n]
warning: you want to dereference a NULL pointer. do you still want to proceed?[y/n]
Since SAFECode ensures memory safety based on LLVM and Clang. We want to link Cling with SAFECode to see whether we can get the expected results. (We also want to improve Cling by detecting other memory error, such as buffer overflow, double free and so on)
As we know, current SAFECode trunk is based on LLVM 3.2 and a modified version of Clang 3.2. Cling trunk is based on upcoming LLVM and Clang (which is about version 3.3). So we cannot link Cling with SAFECode directly. Could you tell me are the modifications in Clang that comes in the SAFECode distribution very much? One way is to bring SAFECode up to date and then Cling can use it. The other way is that just modify or adapting what we need in Cling. Could you give me some suggestions? Thanks.
--
Best Regards,Baozeng Ding
OSTG,NFS,ISCAS
- [svadev] memory safety for Cling, Baozeng, 04/17/2013
- Re: [svadev] memory safety for Cling, John Criswell, 04/18/2013
- Re: [svadev] memory safety for Cling, Baozeng, 04/22/2013
- Re: [svadev] memory safety for Cling, John Criswell, 04/22/2013
- Re: [svadev] memory safety for Cling, Vassil Vassilev, 04/22/2013
- Re: [svadev] memory safety for Cling, Baozeng, 04/22/2013
- Re: [svadev] memory safety for Cling, John Criswell, 04/18/2013
Archive powered by MHonArc 2.6.16.