From 32f1d4deadc82279ec9001a837f2424e185c69a2 Mon Sep 17 00:00:00 2001 From: Gerard Guillemas Martos Date: Fri, 5 Apr 2024 15:53:05 +0200 Subject: [PATCH] surrealdb: use nightly Rust (#11777) The rust-lang/rust#110475 issue referenced is no longer a problem since the `geo` crate has been updated in SurrealDB. However, the change in default Rust version in the image builder implemented in google/oss-fuzz#11681 breaks fuzzing due to SurrealDB now requiring Rust 1.77 after https://github.com/surrealdb/surrealdb/pull/3591, leading to a bump in the MSRV in https://github.com/surrealdb/surrealdb/pull/3778. I have replaced the obsolete `--cfg uuid_unstable` for the generic `--cfg surrealdb_unstable`, which will allow fuzzing any features still deemed unstable in SurrealDB including the new experimental parser. --- projects/surrealdb/Dockerfile | 8 ++++---- projects/surrealdb/build.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/surrealdb/Dockerfile b/projects/surrealdb/Dockerfile index 541573860d41..2df8e825bb5d 100644 --- a/projects/surrealdb/Dockerfile +++ b/projects/surrealdb/Dockerfile @@ -18,10 +18,10 @@ FROM gcr.io/oss-fuzz-base/base-builder-rust RUN git clone --depth 1 https://github.com/surrealdb/surrealdb surrealdb RUN git clone --depth 1 https://github.com/surrealdb/docs.surrealdb.com.git surrealdb_website WORKDIR surrealdb -# TODO(surrealdb/surrealdb#1873): Remove `RUN rustup.*` lines once -# rust-lang/rust#110475 is fixed. -RUN rustup install nightly-2023-04-21 -RUN rustup default nightly-2023-04-21 +# TODO(gguillemas): Remove `RUN rustup.*` lines once +# google/oss-fuzz#11681 is reverted to use nightly in image builder. +RUN rustup install nightly +RUN rustup default nightly # needed for MSAN and coverage build RUN rustup component add rust-src COPY build.sh $SRC/ diff --git a/projects/surrealdb/build.sh b/projects/surrealdb/build.sh index 0ef714b388cc..c5c02070fc0c 100755 --- a/projects/surrealdb/build.sh +++ b/projects/surrealdb/build.sh @@ -20,7 +20,7 @@ cd lib cp fuzz/fuzz_targets/*.dict $OUT/ || true # Add additional compiler flags required for a successful build. -export RUSTFLAGS="$RUSTFLAGS --cfg uuid_unstable" +export RUSTFLAGS="$RUSTFLAGS --cfg surrealdb_unstable" cargo fuzz build -O --debug-assertions