svadev AT lists.siebelschool.illinois.edu
Subject: Svadev mailing list
List archive
- From: John Criswell <criswell AT illinois.edu>
- To: Pavel Borzenkov <pavel.borzenkov AT gmail.com>
- Cc: svadev AT cs.uiuc.edu
- Subject: Re: [svadev] Fix poolalloc compilation in Release configuration
- Date: Tue, 25 Oct 2011 10:12:34 -0500
- List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
- List-id: <svadev.cs.uiuc.edu>
- Organization: University of Illinois
On 10/25/11 6:11 AM, Pavel Borzenkov wrote:
Hi.
Thanks for finding and reporting this. I opted to put an abort() after the assert() to ensure that the program crashes where it should instead of allowing a NULL dereference in the CI->replaceAllUsesWith() call.
Please do an svn up and let me know if it works for you now.
-- John T.
The following error occurs when compiling poolalloc in the Release
configuration:
/home/pavel/projects/safecode/llvm/projects/poolalloc/lib/AssistDS/ArgCast.cpp:
In member function ‘virtual bool
llvm::ArgCast::runOnModule(llvm::Module&)’:
/home/pavel/projects/safecode/llvm/projects/poolalloc/lib/AssistDS/ArgCast.cpp:178:
error: ‘RetCast’ may be used uninitialized in this function
The error is due to the fact, that 'assert' macro is NOP in the
Release configuration.
Index: lib/AssistDS/ArgCast.cpp
===================================================================
--- lib/AssistDS/ArgCast.cpp (revision 142915)
+++ lib/AssistDS/ArgCast.cpp (working copy)
@@ -175,7 +175,7 @@
CINew->setCallingConv(CI->getCallingConv());
CINew->setAttributes(CI->getAttributes());
if(!CI->use_empty()) {
- CastInst *RetCast;
+ CastInst *RetCast = NULL;
if(CI->getType() != CINew->getType()) {
if(CI->getType()->isPointerTy()&& CINew->getType()->isPointerTy())
RetCast = CastInst::CreatePointerCast(CINew, CI->getType(), "",
CI);
- [svadev] Fix poolalloc compilation in Release configuration, Pavel Borzenkov, 10/25/2011
- Re: [svadev] Fix poolalloc compilation in Release configuration, John Criswell, 10/25/2011
Archive powered by MHonArc 2.6.16.