forked from aufover/rpm-symbiotic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhotfix.patch
83 lines (72 loc) · 3.01 KB
/
hotfix.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Build with default Fedora build flags
diff --git a/scripts/build-utils.sh b/scripts/build-utils.sh
index 3a43d55..60597d0 100644
--- a/scripts/build-utils.sh
+++ b/scripts/build-utils.sh
@@ -53,7 +53,7 @@ clean_and_exit()
build()
{
- make $OPTS CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" $@ || exitmsg "Failed build"
+ make $OPTS CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" $@ || exitmsg "Failed build"
return 0
}
diff --git a/scripts/precompile_bitcode_files.sh b/scripts/precompile_bitcode_files.sh
index c662433..e84e123 100755
--- a/scripts/precompile_bitcode_files.sh
+++ b/scripts/precompile_bitcode_files.sh
@@ -10,22 +10,21 @@ fi
# precompile instrumentation files
FILES=
-ORIG_CPPFLAGS="$CPPFLAGS"
for LLVM in $PREFIX/llvm-*; do
CLANG=$LLVM/bin/clang
LLVM_VERSION=${LLVM#*llvm-*}
INCLUDE_DIR="$LLVM/lib/clang/${LLVM_VERSION}/include/"
- CPPFLAGS="-I ${INCLUDE_DIR} $ORIG_CPPFLAGS"
+ CPPFLAGS="-I ${INCLUDE_DIR}"
for F in `find $INSTR/instrumentations/ -name '*.c'`; do
NAME=`basename $F`
OUT=${NAME%*.c}.bc
mkdir -p "$LLVM/lib" "$LLVM/lib32"
FILES="$FILES ${LLVM#install/}/lib/$OUT"
- $CLANG $CPPFLAGS -O3 -emit-llvm -c $F -o $LLVM/lib/$OUT $CPPFLAGS $CFLAGS $LDFLAGS
+ $CLANG $CPPFLAGS -O3 -emit-llvm -c $F -o $LLVM/lib/$OUT
FILES="$FILES ${LLVM#install/}/lib32/$OUT"
- $CLANG $CPPFLAGS -O3 -emit-llvm -c $F -m32 -o $LLVM/lib32/$OUT $CPPFLAGS $CFLAGS $LDFLAGS
+ $CLANG $CPPFLAGS -O3 -emit-llvm -c $F -m32 -o $LLVM/lib32/$OUT
done
done
@@ -34,18 +33,18 @@ for LLVM in $PREFIX/llvm-*; do
CLANG=$LLVM/bin/clang
LLVM_VERSION=${LLVM#*llvm-*}
INCLUDE_DIR="$LLVM/lib/clang/${LLVM_VERSION}/include/"
- CPPFLAGS="-I ${INCLUDE_DIR} -Iinclude/ $ORIG_CPPFLAGS"
+ CPPFLAGS="-I ${INCLUDE_DIR} -Iinclude/"
for F in `find $LIBS -name '*.c'`; do
NAME=`basename $F`
OUT="${F#*/}" # strip the lib/ prefix
OUT="${OUT%*.c}.bc" # change .c for .bc
mkdir -p "$(dirname $LLVM/lib/$OUT)"
- $CLANG $CPPFLAGS -O3 -emit-llvm -c $F -o $LLVM/lib/$OUT $CPPFLAGS $CFLAGS $LDFLAGS
+ $CLANG $CPPFLAGS -O3 -emit-llvm -c $F -o $LLVM/lib/$OUT
FILES="$FILES ${LLVM#install/}/lib/$OUT"
mkdir -p "$(dirname $LLVM/lib32/$OUT)"
- $CLANG $CPPFLAGS -O3 -emit-llvm -c $F -m32 -o $LLVM/lib32/$OUT $CPPFLAGS $CFLAGS $LDFLAGS
+ $CLANG $CPPFLAGS -O3 -emit-llvm -c $F -m32 -o $LLVM/lib32/$OUT
FILES="$FILES ${LLVM#install/}/lib32/$OUT"
done
done
# Print absolute paths in output.
diff --git a/klee/lib/Module/InstructionInfoTable.cpp b/klee/lib/Module/InstructionInfoTable.cpp
index 48575c82..091359e6 100644
--- a/klee/lib/Module/InstructionInfoTable.cpp
+++ b/klee/lib/Module/InstructionInfoTable.cpp
@@ -144,8 +144,9 @@ public:
auto dl = Inst.getDebugLoc();
// Check if a valid debug location is assigned to the instruction.
+ auto* deb_loc = dl.get();
if (dl.get() != nullptr) {
- auto full_path = dl.get()->getFilename();
+ auto full_path = getFullPath(deb_loc->getDirectory(), deb_loc->getFilename());
auto line = dl.getLine();
auto column = dl.getCol();