Skip to content

Commit

Permalink
Update the Gson project to use JDK 17 (google#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 and eamonnmcmanus committed Mar 15, 2023
1 parent be3cf62 commit 14e2a0f
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.9.0/binaries/apache-maven-3.9.0-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 14e2a0f

Please sign in to comment.