Skip to Content.
Sympa Menu

svadev - Re: [svadev] Fix poolalloc compilation in Release configuration

svadev AT lists.siebelschool.illinois.edu

Subject: Svadev mailing list

List archive

Re: [svadev] Fix poolalloc compilation in Release configuration


Chronological Thread 
  • 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);







Archive powered by MHonArc 2.6.16.

Top of Page