@@ -79,7 +79,7 @@ index d0f45bb73..388563180 100755
79
79
export AR=llvm-ar
80
80
export NM=llvm-nm
81
81
export RANLIB=llvm-ranlib
82
- @@ -210,10 +220,19 @@ if [ "$SANITIZER" = "introspector" ]; then
82
+ @@ -210,10 +220,27 @@ if [ "$SANITIZER" = "introspector" ]; then
83
83
84
84
apt-get install -y libjpeg-dev zlib1g-dev libyaml-dev
85
85
python3 -m pip install --upgrade pip setuptools
@@ -88,12 +88,20 @@ index d0f45bb73..388563180 100755
88
88
python3 -m pip install --prefer-binary matplotlib
89
89
90
90
- python3 /fuzz-introspector/src/main.py light
91
+ + # Install Fuzz-Introspector
92
+ + pushd /fuzz-introspector/src
93
+ + python3 -m pip install -r /fuzz-introspector/requirements.txt
94
+ + python3 -m pip install .
95
+ + popd
96
+ +
91
97
+ if [ "$FUZZING_LANGUAGE" = "python" ]; then
92
98
+ python3 /fuzz-introspector/src/main.py light --language=python
93
99
+ elif [ "$FUZZING_LANGUAGE" = "jvm" ]; then
94
100
+ python3 /fuzz-introspector/src/main.py light --language=jvm
95
101
+ elif [ "$FUZZING_LANGUAGE" = "rust" ]; then
96
102
+ python3 /fuzz-introspector/src/main.py light --language=rust
103
+ + elif [ "$FUZZING_LANGUAGE" = "go" ]; then
104
+ + python3 /fuzz-introspector/src/main.py light --language=go
97
105
+ else
98
106
+ python3 /fuzz-introspector/src/main.py light
99
107
+ fi
@@ -110,7 +118,7 @@ index d0f45bb73..388563180 100755
110
118
unset CXXFLAGS
111
119
unset CFLAGS
112
120
export G_ANALYTICS_TAG="G-8WTFM1Y62J"
113
- @@ -295,6 +314,21 @@ if [ "$SANITIZER" = "introspector" ]; then
121
+ @@ -295,6 +316,31 @@ if [ "$SANITIZER" = "introspector" ]; then
114
122
mkdir -p $SRC/my-fi-data
115
123
find $OUT/ -name *.data -exec mv {} $SRC/my-fi-data/ \;
116
124
find $OUT/ -name *.data.yaml -exec mv {} $SRC/my-fi-data/ \;
@@ -129,10 +137,20 @@ index d0f45bb73..388563180 100755
129
137
+
130
138
+ # Restore the sanitizer flag for rust
131
139
+ export SANITIZER="introspector"
140
+ + elif [ "$FUZZING_LANGUAGE" = "go" ]; then
141
+ + echo "GOING go route"
142
+ +
143
+ + # Run the go frontend
144
+ + python3 -m fuzz_introspector.frontends.src.oss_fuzz --language go --target-dir $SRC
145
+ +
146
+ + # Move files temporarily to fix workflow of other languages.
147
+ + mkdir -p $SRC/my-fi-data
148
+ + find ./ -name "*.data" -exec mv {} $SRC/my-fi-data/ \;
149
+ + find ./ -name "*.data.yaml" -exec mv {} $SRC/my-fi-data/ \;
132
150
fi
133
151
134
152
mkdir -p $SRC/inspector
135
- @@ -335,6 +369,12 @@ if [ "$SANITIZER" = "introspector" ]; then
153
+ @@ -335,6 +388,18 @@ if [ "$SANITIZER" = "introspector" ]; then
136
154
REPORT_ARGS="$REPORT_ARGS --language=jvm"
137
155
python3 /fuzz-introspector/src/main.py report $REPORT_ARGS
138
156
rsync -avu --delete "$SRC/inspector/" "$OUT/inspector"
@@ -141,8 +159,13 @@ index d0f45bb73..388563180 100755
141
159
+ REPORT_ARGS="$REPORT_ARGS --target_dir=$SRC/inspector"
142
160
+ REPORT_ARGS="$REPORT_ARGS --language=rust"
143
161
+ python3 /fuzz-introspector/src/main.py report $REPORT_ARGS
162
+ + rsync -avu --delete "$SRC/inspector/" "$OUT/inspector"
163
+ + elif [ "$FUZZING_LANGUAGE" = "go" ]; then
164
+ + echo "GOING go route"
165
+ + REPORT_ARGS="$REPORT_ARGS --target_dir=$SRC/inspector"
166
+ + REPORT_ARGS="$REPORT_ARGS --language=go"
167
+ + python3 /fuzz-introspector/src/main.py report $REPORT_ARGS
144
168
+ rsync -avu --delete "$SRC/inspector/" "$OUT/inspector"
145
169
else
146
170
# C/C++
147
171
148
-
0 commit comments