Skip to content

Commit

Permalink
surrealdb: use nightly Rust (#11777)
Browse files Browse the repository at this point in the history
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
#11681 breaks fuzzing due to SurrealDB now requiring Rust
1.77 after surrealdb/surrealdb#3591, leading to
a bump in the MSRV in surrealdb/surrealdb#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.
  • Loading branch information
gguillemas committed Apr 5, 2024
1 parent d710f6f commit 32f1d4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions projects/surrealdb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
2 changes: 1 addition & 1 deletion projects/surrealdb/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 32f1d4d

Please sign in to comment.