Skip to content
Snippets Groups Projects
Commit 672b1c40 authored by an7s's avatar an7s
Browse files

Check for exit code 134 as well as 139 when classifying inputs as bad


Former-commit-id: a0660f72c60f14c0511b05c7fa761ee2cce825a7
parent 5385ff7e
No related branches found
No related tags found
No related merge requests found
......@@ -72,13 +72,24 @@ do
STRATA_PC_CONFINE=1 STRATA_DETECTOR_POLICY="continue" STRATA_LOG="detectors" STRATA_OUTPUT_FILE=$integer_diagnostics STRATA_SPRI_FILE="$BSPRI" timeout $REPLAYER_TIMEOUT "$GRACE_HOME/concolic/bin/replayer" --timeout=$REPLAYER_TIMEOUT --symbols=$TOP_LEVEL/a.sym --stdout=stdout.$input --stderr=stderr.$input --logfile=exit_status --engine=sdt $STRATAFIED_BINARY $i
# classify input: if segfault or failed PC confinement, then don't treat C1/Integer Detector for a given instruction as a false positive
#if exited with 139, ignore input
grep -i "status 139" exit_status
if [ ! $? -eq 0 ]; then
grep -i "PC failed confinement" $integer_diagnostics
if [ ! $? -eq 0 ]; then
cat $integer_diagnostics | grep -i diagnos | grep class | grep C1 | sed 's/.*diagnosis.*PC:\(.*\)/\1/' | cut -d' ' -f1 >> $INTEGER_WARN_INSTRUCTIONS
fi
if [ $? -eq 0 ]; then
continue
fi
#if exited with 134, ignore input
grep -i "status 134" exit_status
if [ $? -eq 0 ]; then
continue
fi
# if PC failed confinement, ignore input
grep -i "PC failed confinement" $integer_diagnostics
if [ $? -eq 0 ]; then
continue
fi
cat $integer_diagnostics | grep -i diagnos | grep class | grep C1 | sed 's/.*diagnosis.*PC:\(.*\)/\1/' | cut -d' ' -f1 >> $INTEGER_WARN_INSTRUCTIONS
mv stderr.$input $REPLAY_DIR/$input_number/stderr.$input
mv stdout.$input $REPLAY_DIR/$input_number/stdout.$input
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment