|
180 | 180 |
|
181 | 181 | if [ "${ARROW_FUZZING}" == "ON" ]; then |
182 | 182 | # Fuzzing regression tests |
| 183 | + |
| 184 | + # This will display any errors generated during fuzzing. These errors are |
| 185 | + # usually not bugs (most fuzz files are invalid and hence generate errors |
| 186 | + # when trying to read them), which is why they are hidden by default when |
| 187 | + # fuzzing. |
| 188 | + export ARROW_FUZZING_VERBOSITY=1 |
183 | 189 | # Some fuzz regression files may trigger huge memory allocations, |
184 | 190 | # let the allocator return null instead of aborting. |
185 | 191 | export ASAN_OPTIONS="$ASAN_OPTIONS allocator_may_return_null=1" |
186 | | - export ARROW_FUZZING_VERBOSITY=1 |
| 192 | + |
| 193 | + # 1. Generate seed corpuses |
| 194 | + "${source_dir}/build-support/fuzzing/generate_corpuses.sh" "${binary_output_dir}" |
| 195 | + |
| 196 | + # 2. Run fuzz targets on seed corpus entries |
| 197 | + function run_fuzz_target_on_seed_corpus() { |
| 198 | + fuzz_target_basename=$1 |
| 199 | + corpus_dir=${binary_output_dir}/${fuzz_target_basename}_seed_corpus |
| 200 | + mkdir -p "${corpus_dir}" |
| 201 | + rm -f "${corpus_dir}"/* |
| 202 | + unzip "${binary_output_dir}"/"${fuzz_target_basename}"_seed_corpus.zip -d "${corpus_dir}" |
| 203 | + "${binary_output_dir}"/"${fuzz_target_basename}" -rss_limit_mb=4000 "${corpus_dir}"/* |
| 204 | + } |
| 205 | + run_fuzz_target_on_seed_corpus arrow-csv-fuzz |
| 206 | + run_fuzz_target_on_seed_corpus arrow-ipc-file-fuzz |
| 207 | + run_fuzz_target_on_seed_corpus arrow-ipc-stream-fuzz |
| 208 | + run_fuzz_target_on_seed_corpus arrow-ipc-tensor-stream-fuzz |
| 209 | + run_fuzz_target_on_seed_corpus parquet-arrow-fuzz |
| 210 | + run_fuzz_target_on_seed_corpus parquet-encoding-fuzz |
| 211 | + |
| 212 | + # 3. Run fuzz targets on regression files from arrow-testing |
187 | 213 | # Run golden IPC integration files: these should ideally load without errors, |
188 | 214 | # though some very old ones carry invalid data (such as decimal values |
189 | 215 | # larger than their advertised precision). |
|
0 commit comments