[readstat] Add dictionary files and update corpus location (#2498)

* Add fuzzing dictionaries for new ReadStat targets

They still need proper input corpuses, but this is a start.

* [readstat] Accommodate new file layout

corpus => fuzz/corpus

Dictionary files now included in source tree
This commit is contained in:
Evan Miller 2019-06-10 17:36:45 -04:00 committed by Abhishek Arya
parent 7250d70833
commit 7f94b5cf61
4 changed files with 115 additions and 6 deletions

View File

@ -24,12 +24,16 @@ make
make generate_corpus
./generate_corpus
zip $OUT/fuzz_format_dta_seed_corpus.zip corpus/dta*/test-case-*
zip $OUT/fuzz_format_por_seed_corpus.zip corpus/por/test-case-*
zip $OUT/fuzz_format_sav_seed_corpus.zip corpus/sav*/test-case-* corpus/zsav/test-case-*
zip $OUT/fuzz_format_sas7bcat_seed_corpus.zip corpus/sas7bcat/test-case-*
zip $OUT/fuzz_format_sas7bdat_seed_corpus.zip corpus/sas7bdat*/test-case-*
zip $OUT/fuzz_format_xport_seed_corpus.zip corpus/xpt*/test-case-*
zip $OUT/fuzz_format_dta_seed_corpus.zip ./fuzz/corpus/dta*/test-case-*
zip $OUT/fuzz_format_por_seed_corpus.zip ./fuzz/corpus/por/test-case-*
zip $OUT/fuzz_format_sav_seed_corpus.zip ./fuzz/corpus/sav*/test-case-* ./fuzz/corpus/zsav/test-case-*
zip $OUT/fuzz_format_sas7bcat_seed_corpus.zip ./fuzz/corpus/sas7bcat/test-case-*
zip $OUT/fuzz_format_sas7bdat_seed_corpus.zip ./fuzz/corpus/sas7bdat*/test-case-*
zip $OUT/fuzz_format_xport_seed_corpus.zip ./fuzz/corpus/xpt*/test-case-*
cp ./fuzz/dict/fuzz_format_spss_commands.dict $OUT/fuzz_format_spss_commands.dict
cp ./fuzz/dict/fuzz_format_stata_commands.dict $OUT/fuzz_format_stata_commands.dict
cp ./fuzz/dict/fuzz_format_sas_commands.dict $OUT/fuzz_format_sas_commands.dict
READSTAT_FUZZERS="
fuzz_compression_sav \

View File

@ -0,0 +1,37 @@
" "
"#"
"$"
"$CHAR"
"%LET"
"("
")"
"*/"
"/*"
";"
"@"
"ATTRIB"
"CLEAR"
"CONTENTS"
"DATA"
"DATE"
"FILENAME"
"FOOTNOTE"
"FORMAT"
"IF"
"INFILE"
"INPUT"
"INVALUE"
"LABEL"
"LENGTH"
"LIBNAME"
"LIST"
"MISSING"
"OPTIONS"
"OTHER"
"PRINT"
"PROC"
"RUN"
"VALUE"
"_ALL_"
"dlm"
"firstobs"

View File

@ -0,0 +1,46 @@
"("
"(NOMINAL)"
"(ORDINAL)"
"(SCALE)"
")"
"."
"/"
"/VARIABLES"
"="
" "
"A"
"ADATE"
"COMMENT"
"DATA"
"DATASET"
"DATE"
"DELIMITERS"
"DICTIONARY"
"DISPLAY"
"END"
"EXECUTE"
"F"
"FILE"
"FIRSTCASE"
"FIXED"
"FORMATS"
"HANDLE"
"IF"
"INPUT"
"LABEL"
"LABELS"
"LEVEL"
"LIST"
"NAME"
"OUTFILE"
"PROGRAM"
"RECODE"
"RECORD"
"SAVE"
"SELECT"
"SET"
"SYSMIS"
"TABLE"
"VALUE"
"VARIABLE"
"WINDOW"

View File

@ -0,0 +1,22 @@
" "
")"
"*/"
"/*"
"_column("
"_firstlineoffile("
"_line("
"_lines("
"_lrecl("
"_newline"
"_skip("
"byte"
"dictionary"
"double"
"float"
"infile"
"int"
"long"
"str"
"using"
"{"
"}"