You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by vy...@apache.org on 2024/09/12 08:50:50 UTC

(logging-log4j2) branch fuzzing updated: Try to fix the build script

This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch fuzzing
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/fuzzing by this push:
     new b383895880 Try to fix the build script
b383895880 is described below

commit b3838958809ab43cda1d7d57dafaa4e587cb9115
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Thu Sep 12 10:51:14 2024 +0200

    Try to fix the build script
---
 oss-fuzz-build.sh | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/oss-fuzz-build.sh b/oss-fuzz-build.sh
index fb43956ce3..9bd61ef88b 100755
--- a/oss-fuzz-build.sh
+++ b/oss-fuzz-build.sh
@@ -133,7 +133,7 @@ set -euo pipefail
 IFS=\$'\n\t'
 
 # Report the build
-echo "Produced using the commit ID: $commitId"
+echo "INFO: Produced using the commit ID: $commitId"
 
 # Switch to the script directory
 cd -- "\$(dirname -- "\${BASH_SOURCE[0]}")"
@@ -168,9 +168,13 @@ java -version
 
 # Dump some debugging aid
 dump_debug() {
+  echo "DEBUG: Dumping environment variables..."
   export
   for filePath in . "\${CRASH_STACKTRACES_DIR:-}" "\${CRASH_STACKTRACES_DIR:-}" "\${DATA_BUNDLES_DIR:-}" "\${FUZZ_INPUTS:-}"; do
-    ls -al "\$filePath"
+    if [ -e "\$filePath" ]; then
+      echo "DEBUG: Listing \"\$filePath\"..."
+      ls -al "\$filePath"
+    fi
   done
 }
 dump_debug
@@ -190,8 +194,8 @@ jazzer_driver \\
   2>&1 | tee "\$cmdOutputFile" || {
     retCode=\$?;
     if grep -q "A fatal error has been detected by the Java Runtime Environment" "\$cmdOutputFile"; then
-      echo "Detected JRE crash; it doesn't qualify as a fuzzing failure."
-      echo "Cleaning up crash reports and exiting with success..."
+      echo "WARN: Detected JRE crash; it doesn't qualify as a fuzzing failure."
+      echo "WARN: Cleaning up crash reports and exiting with success..."
       dump_debug
       exit 0
     else