[cfe-dev] my experience with clang

Christopher Lamb christopher.lamb at gmail.com
Tue Jan 8 21:19:08 PST 2008


On Jan 8, 2008, at 3:56 PM, Chris Lattner wrote:

>>> The checking of the parameters for PHP is also really nice.  With  
>>> not
>>> that much code you were able to write a custom check for a code
>>> base  that
>>> in practice can be really useful.
>>
>> Yes, I agree. It is quite simple and really useful (it can save a few
>> crashes and potential security bugs). I now need to port it to the
>> liveness
>> analyzer to get info about unititalized variables.
>> My initial idea was to extend this to user-space (I even sent a
>> proposal to
>> the gcc mailing list some time ago).
>
> One random and maybe interesting thought: the linux kernel people are
> marking pointers as user or kernel and using their 'sparse' tool to
> flag semantic violations.  Instead of adding special support to clang
> to handle something like this, I wonder if Christopher's alternate
> address space work could be used to handle this...

Interesting possibility! If this is something you're interested in  
I'll try to get my address spaces clang work committed sooner rather  
than later.

Another use of these types of pointer attributes is Microsoft's  
__ptr32/__ptr64, though I don't think that's so much for analysis as  
pure pointer hackery.
--
Christopher Lamb



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080108/a8d09d8d/attachment.html>


More information about the cfe-dev mailing list