svadev AT lists.siebelschool.illinois.edu
Subject: Svadev mailing list
List archive
- From: John Criswell <criswell AT illinois.edu>
- To: Matthew Wala <wala1 AT illinois.edu>
- Cc: "svadev AT cs.uiuc.edu" <svadev AT cs.uiuc.edu>
- Subject: Re: [svadev] string transform and complete flag
- Date: Tue, 05 Apr 2011 22:43:04 -0600
- List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
- List-id: <svadev.cs.uiuc.edu>
- Organization: University of Illinois at Urbana-Champaign
On 4/5/2011 7:56 PM, Matthew Wala wrote:
Hi everyone:
What's the purpose of the "complete" byte which is passed as an
argument and the end of the pool_* string
functions?
The Complete flag is a DSA flag set on a DSNode. It indicates that the DSA information computed for the DSNode is as complete as it can be: everything that can be known about the memory object has been computed.
In what I've done so far I haven't used it at all, I just
ignored it and it didn't seem to cause any
issues until now. However I realized that whenever I try to pass a
NULL pointer directly as an argument to a
string function that has runtime checks, sometimes I get the following
error, which happens during the computation
of the complete flag, and I don't think any of my changes are causing this:
sc: String.cpp:280: unsigned int
safecode::StringTransform::getDSFlags(const llvm::Value*, const
llvm::Function*): Assertion `DSN&& "getDSFlags(): No DSNode for the
specified value!\n"' failed.
This is a problem because passing NULL pointers is legitimate for
certain functions that should have their own
runtime checks (eg., strtok). How do I fix this?
This is a problem unrelated to completeness. In this case, DSA does not create a DSNode for the null pointer constant. In this instance, you should create a NULL Pool handle and pass that in. If the string function is supposed to handle NULL string pointers, then your run-time checks should be adjusted to take NULL pool handles and NULL pointers into account.
For a NULL constant pointer, you can consider it Complete since it is trivial to know everything about it that we care to know.
-- John T.
Matt
_______________________________________________
svadev mailing list
svadev AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/svadev
- [svadev] string transform and complete flag, Matthew Wala, 04/05/2011
- Re: [svadev] string transform and complete flag, John Criswell, 04/05/2011
- Re: [svadev] string transform and complete flag, Matthew Wala, 04/06/2011
- Re: [svadev] string transform and complete flag, John Criswell, 04/06/2011
- Re: [svadev] string transform and complete flag, Matthew Wala, 04/06/2011
- Re: [svadev] string transform and complete flag, John Criswell, 04/05/2011
Archive powered by MHonArc 2.6.16.