svadev AT lists.siebelschool.illinois.edu
Subject: Svadev mailing list
List archive
- From: Santosh Nagarakatte <santosh.nagarakatte AT gmail.com>
- To: svadev AT cs.uiuc.edu, Baozeng <sploving1 AT gmail.com>
- Subject: [svadev] How to test SoftBound in SAFECode (Baozeng)
- Date: Mon, 7 May 2012 11:53:32 -0400
- List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
- List-id: <svadev.cs.uiuc.edu>
Baozeng,
SoftBoundCETS is tested only on 64-bit machines. Hence most likely it
will not work on 32 bit machines.
My current plan is to support only 64-bit compilations with SoftBoundCETS.
I am in the process of making few changes to SoftBoundCETS in the
SafeCode repository.
I will update the instructions for running SoftBoundCETS with Safecode
on 64-bit machines.
Let me know if you have trouble running SoftBoundCETS on 64-bit machines.
Santosh
>
> Message: 1
> Date: Mon, 7 May 2012 19:06:41 +0800
> From: Baozeng
> <sploving1 AT gmail.com>
> Subject: [svadev] How to test SoftBound in SAFECode
> To: mentor
> <criswell AT illinois.edu>
> Cc:
> svadev AT cs.illinois.edu
> Message-ID:
>
> <CAP=GMUHxzpRxZoWOq9dHjhXgpgbZoH2o8RBgacOpTK9zBg2U0g AT mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear mentor,
> Before enable BBC in SAFECode, I would like to dive into SoftBound source
> code first. In its README file, it says there are two ways to compile a
> program with SoftBound:
>
> 1. STEP0: Generate softbound instrumentation bitcode
>
> a) Copy softboundcets.c, softboundcets-checks.c and
> softboundcets-wrappers.c softboundcets.h to the current working
> directory. Then execute the following set of commands:
>
>
> clang -c -emit-llvm -D__SOFTBOUNDCETS_TRIE
> -D__SOFTBOUNDCETS_SPATIAL_TEMPORAL softboundcets-checks.c -o
> softboundcets-checks.bc
> clang -c -emit-llvm -D__SOFTBOUNDCETS_TRIE
> -D__SOFTBOUNDCETS_SPATIAL_TEMPORAL softboundcets.c -o softboundcets.bc
> clang -c -emit-llvm -D__SOFTBOUNDCETS_TRIE
> -D__SOFTBOUNDCETS_SPATIAL_TEMPORAL softboundcets-wrappers.c -o
> softboundcets-wrappers.bc
>
> STEP1: compile each individual source file
>
> clang -c -emit-llvm test/test1a.c -o test1a.bc
> clang -c -emit-llvm test/test1b.c -o test1b.bc
>
> STEP2: create a single module using llvm-ld by using all the source files
>
> llvm-ld test1a.bc test1b.bc -o test1
>
> STEP3: link the softbound checks file
>
> llvm-link softboundcets-checks.bc test1.bc > test-linked.bc
>
> STEP4: run the softbound instrumentation
>
> SoftBoundCETS -softboundcets_spatial_safety
> -softboundcets_temporal_safety test-linked.bc
>
> STEP5: link the wrappers
>
> llvm-link softboundcets.bc test-linked.bc.sbpass.bc
> softboundcets-wrappers.bc > test-softbound.bc
>
> STEP6: generate native code
>
> llvm-ld -native -lm -lcrypt -lpthread test-softbound.bc -o
> test-softbound.out -lm
> ./test-softbound.out
>
>
> 2. Use clang with -fsoftbound as the flag to run SoftBound+CETS.
>
> If I understand it correctly, -fsoftbound in the second way does all the
> things in the first way, am I right? so I tried the second way, like this:
> clang -g -fsoftbound -o test test.c (the test file is the example in the
> safecode/docs/UsersGuide.html)
>
> it shows the following error:
>
> /usr/local/lib/libsoftbound_rt.a(softboundcets-wrappers.o): In function
> `__softboundcets_metadata_store':
> /home/sploving/llvm/projects/safecode/runtime/SoftBoundRuntime/softboundcets.h:636:
> multiple definition of `__softboundcets_metadata_store'
> /usr/local/lib/libsoftbound_rt.a(softboundcets.o):/home/sploving/llvm/projects/safecode/runtime/SoftBoundRuntime/softboundcets.h:636:
> first defined here
> /usr/local/lib/libsoftbound_rt.a(softboundcets-wrappers.o): In function
> `__softboundcets_metadata_load':
> /home/sploving/llvm/projects/safecode/runtime/SoftBoundRuntime/softboundcets.h:722:
> multiple definition of `__softboundcets_metadata_load'
> /usr/local/lib/libsoftbound_rt.a(softboundcets.o):/home/sploving/llvm/projects/safecode/runtime/SoftBoundRuntime/softboundcets.h:722:
> first defined here
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
>
> What is the matter? It says that SoftBound has been
> tested with LLVM-3.0 on 64-bit x86 machines with a 64-bit linux OS, then in
> my 32-bit Linux (FC16), does it not work?
> thanks.
>
>
>
>
>
>
> --
> Best Regards,
> Baozeng
> Ding
>
> OSTG,NFS,ISCAS
--
Santosh G Nagarakatte,
PhD Student,
Computer and Information Science Department
University of Pennsylvania,
Philadelphia-19104
http://www.cis.upenn.edu/~santoshn
- [svadev] How to test SoftBound in SAFECode (Baozeng), Santosh Nagarakatte, 05/07/2012
Archive powered by MHonArc 2.6.16.