Skip to Content.
Sympa Menu

svadev - [svadev] Fix poolalloc compilation in Release configuration

svadev AT lists.siebelschool.illinois.edu

Subject: Svadev mailing list

List archive

[svadev] Fix poolalloc compilation in Release configuration


Chronological Thread 
  • From: Pavel Borzenkov <pavel.borzenkov AT gmail.com>
  • To: svadev AT cs.uiuc.edu
  • Subject: [svadev] Fix poolalloc compilation in Release configuration
  • Date: Tue, 25 Oct 2011 15:11:34 +0400
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
  • List-id: <svadev.cs.uiuc.edu>

Hi.

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);


--
Pavel





Archive powered by MHonArc 2.6.16.

Top of Page