Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the Guava project to use JDK 17 rather than the default JDK 15. #8980

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion projects/guava/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

FROM gcr.io/oss-fuzz-base/base-builder-jvm

ENV JAVA_VERSION=17

RUN apt update && apt install -y openjdk-${JAVA_VERSION}-jdk

RUN curl -L https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.zip -o maven.zip && \
unzip maven.zip -d $SRC/maven && \
rm -rf maven.zip
Expand All @@ -26,4 +30,4 @@ RUN git clone --depth 1 https://github.com/google/guava

COPY build.sh $SRC/
COPY *Fuzzer.java $SRC/
WORKDIR $SRC/guava
WORKDIR $SRC/guava
7 changes: 5 additions & 2 deletions projects/guava/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
#
################################################################################

MAVEN_ARGS="-Djavac.src.version=15 -Djavac.target.version=15 -DskipTests"
MAVEN_ARGS="-Djavac.src.version=${JAVA_VERSION} -Djavac.target.version=${JAVA_VERSION} -DskipTests"
export JAVA_HOME=/usr/lib/jvm/java-${JAVA_VERSION}-openjdk-amd64

$MVN package $MAVEN_ARGS
CURRENT_VERSION=$($MVN org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate \
-Dexpression=project.version -q -DforceStdout)
Expand Down Expand Up @@ -44,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-$JAVA_VERSION" \
LD_LIBRARY_PATH=\"\$this_dir/open-jdk-$JAVA_VERSION/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