Skip to content

Commit

Permalink
Update the Gson project to use JDK 17 (#9554)
Browse files Browse the repository at this point in the history
Should fix the error in this
[PR](google/gson#2308)
  • Loading branch information
MaicolAntali authored Feb 2, 2023
1 parent d6dd123 commit 6e21448
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion projects/gson/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
################################################################################

FROM gcr.io/oss-fuzz-base/base-builder-jvm
RUN apt-get update && apt-get install -y make autoconf automake libtool wget
RUN apt-get update && apt-get install -y make autoconf automake libtool wget openjdk-17-jdk

RUN curl -L https://downloads.apache.org/maven/maven-3/3.8.7/binaries/apache-maven-3.8.7-bin.zip -o maven.zip && \
unzip maven.zip -d $SRC/maven && \
Expand Down
7 changes: 6 additions & 1 deletion projects/gson/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
#
################################################################################

export JAVA_HOME="$OUT/open-jdk-17"
mkdir -p $JAVA_HOME
rsync -aL --exclude=*.zip "/usr/lib/jvm/java-17-openjdk-amd64/" "$JAVA_HOME"

# Skip ProGuard because it is only needed for tests (which are skipped as well) and
# because it would fail since `jmods` JDK folder is removed from this Docker image
MAVEN_ARGS="-DskipTests -Dproguard.skip"
Expand Down Expand Up @@ -42,7 +46,8 @@ if [[ \"\$@\" =~ (^| )-runs=[0-9]+($| ) ]]; then
else
mem_settings='-Xmx2048m:-Xss1024k'
fi
LD_LIBRARY_PATH=\"$JVM_LD_LIBRARY_PATH\":\$this_dir \
JAVA_HOME=\"\$this_dir/open-jdk-17/\" \
LD_LIBRARY_PATH=\"\$this_dir/open-jdk-17/lib/server\":\$this_dir \
\$this_dir/jazzer_driver --agent_path=\$this_dir/jazzer_agent_deploy.jar \
--cp=$RUNTIME_CLASSPATH \
--target_class=$fuzzer_basename \
Expand Down

0 comments on commit 6e21448

Please sign in to comment.