about summary refs log tree commit diff
path: root/qemu_mode/build_qemu_support.sh
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-03-06 18:47:58 +0100
committerGitHub <noreply@github.com>2021-03-06 18:47:58 +0100
commit976cb3e36c130dc31fb189e9bb4f036730fca7ee (patch)
tree94143e3775e23597abe00b1ad9373c6c90b62632 /qemu_mode/build_qemu_support.sh
parentbd0a23de73011a390714b9f3836a46443054fdd5 (diff)
parent9b3d8c327d33191b181219ffce411b40bdbe8902 (diff)
downloadafl++-976cb3e36c130dc31fb189e9bb4f036730fca7ee.tar.gz
Merge pull request #778 from AFLplusplus/dev
This fixes 3 different crash issues
Diffstat (limited to 'qemu_mode/build_qemu_support.sh')
-rwxr-xr-xqemu_mode/build_qemu_support.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/qemu_mode/build_qemu_support.sh b/qemu_mode/build_qemu_support.sh
index 815e77d6..4d3d9bf6 100755
--- a/qemu_mode/build_qemu_support.sh
+++ b/qemu_mode/build_qemu_support.sh
@@ -131,9 +131,13 @@ test -d qemuafl || { echo "[-] Not checked out, please install git or check your
 echo "[+] Got qemuafl."
 
 cd "qemuafl" || exit 1
-echo "[*] Checking out $QEMUAFL_VERSION"
-sh -c 'git stash && git stash drop' 1>/dev/null 2>/dev/null
-git checkout "$QEMUAFL_VERSION" || echo Warning: could not check out to commit $QEMUAFL_VERSION
+if [ -n "$NO_CHECKOUT" ]; then
+  echo "[*] Skipping checkout to $QEMUAFL_VERSION"
+else
+  echo "[*] Checking out $QEMUAFL_VERSION"
+  sh -c 'git stash' 1>/dev/null 2>/dev/null
+  git checkout "$QEMUAFL_VERSION" || echo Warning: could not check out to commit $QEMUAFL_VERSION
+fi
 
 echo "[*] Making sure imported headers matches"
 cp "../../include/config.h" "./qemuafl/imported/" || exit 1