Skip to Content.
Sympa Menu

svadev - Re: [svadev] Errors when "make" the safecode

svadev AT lists.siebelschool.illinois.edu

Subject: Svadev mailing list

List archive

Re: [svadev] Errors when "make" the safecode


Chronological Thread 
  • From: John Criswell <criswell AT uiuc.edu>
  • To: lucefe <noviceup AT gmail.com>
  • Cc: "svadev AT cs.uiuc.edu" <svadev AT cs.uiuc.edu>
  • Subject: Re: [svadev] Errors when "make" the safecode
  • Date: Wed, 28 Apr 2010 10:27:51 -0500
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
  • List-id: <svadev.cs.uiuc.edu>
  • Organization: University of Illinois

lucefe wrote:
> *Hi,*
> **
> *I want to use safecode's array bound checking, and before I do the
> "make ",*
> *I commentted "if 0, else, endif" away in sc.cpp file, because if not,
> when I use*
> *the "sc -static-abc=full" command, I will get an error*
> * "Assertion '0 && "Omega pass is not working right now!" ' failed ".*

The inter-procedural static array bounds checking pass (in
lib/ArrayBoundChecks/ArrayBoundCheck.cpp) doesn't even compile with LLVM
2.6 or LLVM 2.7. It had major issues even when it did compile with
earlier versions of LLVM 2.x, so we opted not to update it when I ported
SAFECode to LLVM 2.6. The Makefile in lib/ArrayBoundChecks skips over it
so that the rest of SAFECode can compile. That is why you're getting
missing symbols during the link.

(As an aside, the inter-procedural static array bounds checking pass
uses the Omega compiler for constraint solving; that is why the
assertion refers to it as the "Omega pass").

The inter-procedural static array bounds checking pass needs to be
overhauled or completely replaced. I suspect that some of the code can
be reused but major refactoring is probably needed to improve the code
quality. Someone was hoping to work on it as a Google Summer of Code
project, but it was not selected, so working on it is still an open project.

If you're interested in working on it, please email the list and let us
know what you'd like to do with it.

-- John T.


> **
> *So I do the next changes in the sc.cpp file:*
> **
> static void addStaticGEPCheckingPass(PassManager & Passes) {
> switch (SCConfig.staticCheckType()) {
> case SAFECodeConfiguration::ABC_CHECK_NONE:
> Passes.add(new ArrayBoundsCheckDummy());
> break;
> case SAFECodeConfiguration::ABC_CHECK_LOCAL:
> Passes.add(new ArrayBoundsCheckStruct());
> Passes.add(new ArrayBoundsCheckLocal());
> break;
> case SAFECodeConfiguration::ABC_CHECK_FULL:
> *//#if 0
> Passes.add(new ABCPreProcess());
> Passes.add(new ArrayBoundsCheckStruct());
> Passes.add(new ArrayBoundsCheck());
> //#else
> // assert (0 && "Omega pass is not working right now!");
> //#endif
> * break;
> }
> }
> **
> *But, when I do the "make" I got the next error informations:*
> **
> llvm[2]: Linking Debug executable sc
> /llvm-projects/llvm/projects/safecode/tools/Sc/Debug/sc.o: In function
> `ABCPreProcess':
> /llvm-projects/llvm/projects/safecode/include/ABCPreProcess.h:47:
> undefined reference to `safecode::ABCPreProcess::ID'
> /llvm-projects/llvm/projects/safecode/include/ABCPreProcess.h:47:
> undefined reference to `vtable for safecode::ABCPreProcess'
> /llvm-projects/llvm/projects/safecode/tools/Sc/Debug/sc.o: In function
> `ArrayBoundsCheck':
> /llvm-projects/llvm/projects/safecode/include/ArrayBoundsCheck.h:112:
> undefined reference to `safecode::ArrayBoundsCheck::ID'
> /llvm-projects/llvm/projects/safecode/include/ArrayBoundsCheck.h:112:
> undefined reference to `vtable for safecode::ArrayBoundsCheck'
> /llvm-projects/llvm/projects/safecode/include/ArrayBoundsCheck.h:112:
> undefined reference to `vtable for safecode::ArrayBoundsCheck'
> collect2: ld 返回 1
> make[2]: *** [/llvm-projects/llvm/projects/safecode/Debug/bin/sc] 错误 1
> make[2]:正在离开目录 /llvm-projects/llvm/projects/safecode/tools/Sc'
> make[1]: *** [Sc/.makeall] 错误 2
> make[1]:正在离开目录 /llvm-projects/llvm/projects/safecode/tools'
> make: *** [all] 错误 1
> *Who can help me?*





Archive powered by MHonArc 2.6.16.

Top of Page