File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed
Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,12 @@ RUN curl -L https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-
1818 -o maven.zip && \
1919 unzip maven.zip -d $SRC/maven && \
2020 rm maven.zip
21- ENV MVN $SRC/maven/apache-maven-3.6.3/bin/mvn
21+ ENV MVN=$SRC/maven/apache-maven-3.6.3/bin/mvn
22+ RUN apt-get update && apt-get install -y openjdk-21-jdk \
23+ && update-alternatives --set java /usr/lib/jvm/java-21-openjdk-amd64/bin/java \
24+ && update-alternatives --set javac /usr/lib/jvm/java-21-openjdk-amd64/bin/javac
25+ ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
26+ ENV PATH="$JAVA_HOME/bin:$PATH"
2227RUN git clone --depth 1 https://github.com/checkstyle/checkstyle checkstyle
2328COPY *.sh *Fuzzer.java $SRC/
2429WORKDIR $SRC/checkstyle
Original file line number Diff line number Diff line change 1616# #########################################################################
1717export TARGET_PACKAGE_PREFIX=" com.puppycrawl.tools.checkstyle."
1818
19- MAVEN_ARGS=" -Dmaven.test.skip=true -Djavac.src.version=15 -Djavac.target.version=15 --update-snapshots"
19+ MAVEN_ARGS=" -Dmaven.test.skip=true -Djavac.src.version=21 -Djavac.target.version=21 --update-snapshots"
2020$MVN clean package $MAVEN_ARGS
2121
2222BUILD_CLASSPATH=
5050 cp $SRC /$fuzzer_basename .class $OUT /
5151
5252 # Create an execution wrapper that executes Jazzer with the correct arguments.
53- echo " #!/bin/bash
53+ cat << EOF > $OUT /$fuzzer_basename
54+ #!/bin/bash
5455
5556 # LLVMFuzzerTestOneInput for fuzzer detection.
5657 this_dir=\$ (dirname "\$ 0")
6162 mem_settings='-Xmx2048m:-Xss1024k'
6263 fi
6364
64- LD_LIBRARY_PATH=\" $JVM_LD_LIBRARY_PATH \" :\$ this_dir \
65+ export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
66+ export PATH="\$ JAVA_HOME/bin:\$ PATH"
67+ LD_LIBRARY_PATH="$JVM_LD_LIBRARY_PATH ":\$ this_dir \
6568 \$ this_dir/jazzer_driver --agent_path=\$ this_dir/jazzer_agent_deploy.jar \
66- --cp=$RUNTIME_CLASSPATH \
67- --target_class=$fuzzer_basename \
68- --jvm_args=\"\$ mem_settings\" \
69- \$ @" > $OUT /$fuzzer_basename
69+ --cp="$RUNTIME_CLASSPATH " \
70+ --target_class="$fuzzer_basename " \
71+ --jvm_args="\$ mem_settings" \
72+ "\$ @"
73+ EOF
7074
7175 chmod u+x $OUT /$fuzzer_basename
7276done
You can’t perform that action at this time.
0 commit comments