[llvm-commits] [llvm] r61019 - in /llvm/trunk:	docs/AliasAnalysis.html docs/LangRef.html	include/llvm/Attributes.h lib/AsmParser/LLLexer.cpp	lib/AsmParser/llvmAsmParser.y lib/Bitcode/Reader/BitcodeReader.cpp	lib/Bitcode/Writer/BitcodeWriter.cpp lib/VMCore/Attributes.cpp
    Duncan Sands 
    baldrick at free.fr
       
    Tue Dec 16 00:01:49 PST 2008
    
    
  
Hi Nick,
> > I think you should mention that callee does not copy even one bit.  Because if
> > it is allowed to, it is easy to construct examples where the whole pointer value
> > escapes through multiple calls.
> 
> It's not allowed to. The pointer can be used, copied, etc., as much as 
> you want by the callee and its tree of callees, so long as not one bit 
> of the pointer is after the call has completed (so the copies made must 
> be destroyed before returning).
yes, that's what I meant.
> I'm not sure I want to go into such detail in the LangRef. I think that 
> if somebody really does write a function that leaks 1 bit of a pointer, 
> marks it nocapture, then calls it in a loop, reconstitutes a pointer and 
> makes a program that miscompiles, we can inform them that they have 
> misused nocapture.
:)
> It's esoteric enough that I think explaining it in the LangRef will lead 
> to more confusion, not more understanding. If you can come up with 
> wording that would clarify the intent I think that'd be great, but I 
> don't think it's needed.
I agree.
Ciao,
Duncan.
    
    
More information about the llvm-commits
mailing list