Skip to content

Commit

Permalink
Rust: Compile miniz_oxide and flate2 dependencies with optimizations,…
Browse files Browse the repository at this point in the history
… always

This seems to be some recent regression, possibly in 1.84.0
Debug builds crash the iOS tests, specifically the `testPendingDeletionRequestPingsAreSentOnStartup` test with a real hard crash:

    Thread 2: EXC_BAD_ACCESS (code=2, address=0x16d3ebfb0)

pointing deep inside `library/alloc/src/boxed.rs` here: https://github.com/rust-lang/rust/blob/3ff1b6410e87a237559ab76ecd50f180afbe861f/library/alloc/src/boxed.rs#L1733

Tracing that upwards leads us to `Box::default()` in miniz_oxide, were T
is a struct containing 3 arrays, with a total size of 164098.

I can only assume that this somehow blows the stack.
Why now? I don't know. We had a successful CI run on 29e1722,
followed by failures starting with c46917a.
From my quick look that's the exact same environment: xcode:15.1.0, rustc 1.84.0
Yet it fails on CI. And locally.
rustc 1.83 is fine. So is a release build.
  • Loading branch information
badboy committed Jan 13, 2025
1 parent f67be3e commit 3df4f34
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ default-members = [
opt-level = "s"
debug = false
lto = true

[profile.dev.package.miniz_oxide]
opt-level = 3

[profile.dev.package.flate2]
opt-level = 3

0 comments on commit 3df4f34

Please sign in to comment.