mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-15 06:58:50 +00:00
Update skeleton
This commit is contained in:
@@ -21,7 +21,7 @@ REPLACE_DICT = {
|
||||
"extern ": "",
|
||||
"__restrict": "",
|
||||
"long __undefined;": "",
|
||||
"return 0;": "return crc32_context % 128;",
|
||||
"return 0;": "return (unsigned char)(crc32_context);",
|
||||
r"__attribute__\s*\(\(.*\)\)": "",
|
||||
"_Float128": "double",
|
||||
"long double": "double",
|
||||
|
||||
@@ -1,4 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
rm -f out*.txt
|
||||
|
||||
#ulimit -t 3000
|
||||
#ulimit -v 2000000
|
||||
|
||||
if
|
||||
[ $FUZZ_ARG = '-i' ] &&\
|
||||
(! clang -pedantic -Wall -Werror=strict-prototypes -O1 -c test_reduced.c > out.txt 2>&1 ||\
|
||||
grep 'main-return-type' out.txt ||\
|
||||
grep 'conversions than data arguments' out.txt ||\
|
||||
grep 'int-conversion' out.txt ||\
|
||||
grep 'incompatible redeclaration' out.txt ||\
|
||||
grep 'ordered comparison between pointer and zero' out.txt ||\
|
||||
grep 'ordered comparison between pointer and integer' out.txt ||\
|
||||
grep 'eliding middle term' out.txt ||\
|
||||
grep 'end of non-void function' out.txt ||\
|
||||
grep 'invalid in C99' out.txt ||\
|
||||
grep 'specifies type' out.txt ||\
|
||||
grep 'should return a value' out.txt ||\
|
||||
grep 'uninitialized' out.txt ||\
|
||||
grep 'incompatible pointer to' out.txt ||\
|
||||
grep 'incompatible integer to' out.txt ||\
|
||||
grep 'type specifier missing' out.txt ||\
|
||||
grep 'implicit-function-declaration' out.txt ||\
|
||||
grep 'infinite-recursion' out.txt ||\
|
||||
grep 'pointer-bool-conversion' out.txt ||\
|
||||
grep 'non-void function does not return a value' out.txt ||\
|
||||
grep 'too many arguments in call' out.txt ||\
|
||||
! gcc -Wall -Wextra -O2 test_reduced.c > outa.txt 2>&1 ||\
|
||||
grep 'uninitialized' outa.txt ||\
|
||||
grep 'without a cast' outa.txt ||\
|
||||
grep 'control reaches end' outa.txt ||\
|
||||
grep 'return type defaults' outa.txt ||\
|
||||
grep 'cast from pointer to integer' outa.txt ||\
|
||||
grep 'useless type name in empty declaration' outa.txt ||\
|
||||
grep 'no semicolon at end' outa.txt ||\
|
||||
grep 'type defaults to' outa.txt ||\
|
||||
grep 'too few arguments for format' outa.txt ||\
|
||||
grep 'incompatible pointer' outa.txt ||\
|
||||
grep 'ordered comparison of pointer with integer' outa.txt ||\
|
||||
grep 'declaration does not declare anything' outa.txt ||\
|
||||
grep 'expects type' outa.txt ||\
|
||||
grep 'pointer from integer' outa.txt ||\
|
||||
grep 'incompatible implicit' outa.txt ||\
|
||||
grep 'excess elements in struct initializer' outa.txt ||\
|
||||
grep 'comparison between pointer and integer' outa.txt ||\
|
||||
! gcc -O1 test_reduced.c > cc_out1.txt 2>&1 ||\
|
||||
! gcc -O2 test_reduced.c > cc_out2.txt 2>&1)
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cargo run --manifest-path $PROJECT_DIR/Cargo.toml --release -- --parse test_reduced.c >/dev/null 2>&1 &&\
|
||||
! cargo run --manifest-path $PROJECT_DIR/Cargo.toml --release --bin fuzz -- $FUZZ_ARG test_reduced.c
|
||||
|
||||
Reference in New Issue
Block a user