Commit 239818b
committed
Use BoringSSL 5.x's FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
BoringSSL 5.x consolidated the older
`BORINGSSL_UNSAFE_DETERMINISTIC_MODE` and
`BORINGSSL_UNSAFE_FUZZER_MODE` preprocessor switches into a single
`FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION` flag. The two old defines
no longer exist anywhere in the new BoringSSL tree.
With our build.rs still passing only the old defines when
`quiche/fuzzing` was enabled:
- The deterministic RNG implementation
(`crypto/rand/deterministic.cc`) is now guarded by
`OPENSSL_RAND_DETERMINISTIC`, which is in turn defined only when
`FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION` is set. So that file
compiled to nothing and `RAND_reset_for_fuzzing` was never
emitted.
- `quiche-fuzz/src/lib.rs` declares the function as `extern "C"`
and calls it, so `cargo fuzz build` failed at link time with
`undefined symbol: RAND_reset_for_fuzzing`.
Replace the two old defines with the new single one. Verified
locally that `cargo build -p quiche --features=fuzzing` succeeds and
the resulting `libcrypto.a` exports `RAND_reset_for_fuzzing`.1 parent 5116121 commit 239818b
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
390 | 395 | | |
391 | 396 | | |
392 | 397 | | |
| |||
0 commit comments