Skip to content

Instantly share code, notes, and snippets.

@chandlerc
Created August 5, 2014 09:19
Show Gist options
  • Save chandlerc/2bed8a27a24c82c17194 to your computer and use it in GitHub Desktop.
Save chandlerc/2bed8a27a24c82c17194 to your computer and use it in GitHub Desktop.
#!/bin/bash
SIZE=$(($RANDOM % 400))
SEED=$RANDOM
CMD="./bin/llc -o /dev/null $ARGS"
set pipefail
if ! ./bin/llvm-stress -size=$SIZE -seed=$SEED | $CMD; then
./bin/llvm-stress -size=$SIZE -seed=$SEED > /tmp/stress_crash_${SIZE}_${SEED}.ll
echo "CRASH: $CMD /tmp/stress_crash_${SIZE}_${SEED}.ll"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment