Skip to content

Commit

Permalink
🔨 zv: Don't enable gvariant feature for dbus fuzz target
Browse files Browse the repository at this point in the history
Otherwise, it can enable Maybe singature support, which will fail with an
assertion when used with dbus ser/de.
  • Loading branch information
zeenix committed Sep 1, 2024
1 parent 8bacdbd commit 03a25db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ jobs:
run: |
cargo --locked install cargo-fuzz
cargo --locked fuzz run --fuzz-dir zvariant/fuzz dbus -- -max_total_time=30 -max_len=100M
cargo --locked fuzz run --fuzz-dir zvariant/fuzz gvariant -- -max_total_time=30 -max_len=100M
cargo --locked fuzz run --fuzz-dir zvariant/fuzz --features gvariant gvariant -- -max_total_time=30 -max_len=100M
doc_build:
runs-on: ubuntu-latest
Expand Down
7 changes: 6 additions & 1 deletion zvariant/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ edition = "2021"
[package.metadata]
cargo-fuzz = true

[features]
# `gvariant` is only needed for the `gvariant` fuzz target. However, we don't want it to
# be enabled for running the `dbus` fuzz target, as that can cause certain assertions to fail.
# FIXME: Is there a better way to do this?
gvariant = ["zvariant/gvariant"]

[dependencies]
libfuzzer-sys = "0.4.7"
endi = "1.1.0"

[dependencies.zvariant]
path = ".."
features = ["gvariant"]

# Prevent this from interfering with workspaces
[workspace]
Expand Down

0 comments on commit 03a25db

Please sign in to comment.