@@ -79,7 +79,7 @@ index d0f45bb73..388563180 100755
7979 export AR=llvm-ar
8080 export NM=llvm-nm
8181 export RANLIB=llvm-ranlib
82- @@ -210,10 +220,19 @@ if [ "$SANITIZER" = "introspector" ]; then
82+ @@ -210,10 +220,27 @@ if [ "$SANITIZER" = "introspector" ]; then
8383
8484 apt-get install -y libjpeg-dev zlib1g-dev libyaml-dev
8585 python3 -m pip install --upgrade pip setuptools
@@ -88,12 +88,20 @@ index d0f45bb73..388563180 100755
8888 python3 -m pip install --prefer-binary matplotlib
8989
9090- 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+ +
9197+ if [ "$FUZZING_LANGUAGE" = "python" ]; then
9298+ python3 /fuzz-introspector/src/main.py light --language=python
9399+ elif [ "$FUZZING_LANGUAGE" = "jvm" ]; then
94100+ python3 /fuzz-introspector/src/main.py light --language=jvm
95101+ elif [ "$FUZZING_LANGUAGE" = "rust" ]; then
96102+ 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
97105+ else
98106+ python3 /fuzz-introspector/src/main.py light
99107+ fi
@@ -110,7 +118,7 @@ index d0f45bb73..388563180 100755
110118 unset CXXFLAGS
111119 unset CFLAGS
112120 export G_ANALYTICS_TAG="G-8WTFM1Y62J"
113- @@ -295,6 +314,21 @@ if [ "$SANITIZER" = "introspector" ]; then
121+ @@ -295,6 +316,31 @@ if [ "$SANITIZER" = "introspector" ]; then
114122 mkdir -p $SRC/my-fi-data
115123 find $OUT/ -name *.data -exec mv {} $SRC/my-fi-data/ \;
116124 find $OUT/ -name *.data.yaml -exec mv {} $SRC/my-fi-data/ \;
@@ -129,10 +137,20 @@ index d0f45bb73..388563180 100755
129137+
130138+ # Restore the sanitizer flag for rust
131139+ 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/ \;
132150 fi
133151
134152 mkdir -p $SRC/inspector
135- @@ -335,6 +369,12 @@ if [ "$SANITIZER" = "introspector" ]; then
153+ @@ -335,6 +388,18 @@ if [ "$SANITIZER" = "introspector" ]; then
136154 REPORT_ARGS="$REPORT_ARGS --language=jvm"
137155 python3 /fuzz-introspector/src/main.py report $REPORT_ARGS
138156 rsync -avu --delete "$SRC/inspector/" "$OUT/inspector"
@@ -141,8 +159,13 @@ index d0f45bb73..388563180 100755
141159+ REPORT_ARGS="$REPORT_ARGS --target_dir=$SRC/inspector"
142160+ REPORT_ARGS="$REPORT_ARGS --language=rust"
143161+ 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
144168+ rsync -avu --delete "$SRC/inspector/" "$OUT/inspector"
145169 else
146170 # C/C++
147171
148-
0 commit comments