Repository navigation
Description
Symptom
The fl_audio_detectors unit test fails on the unit tests macos workflow (macOS-arm64 runner). Stack trace top frame is fl::audio::detector::TempoAnalyzer::update(fl::shared_ptr<fl::audio::Context>).
247.58 [11/248] ✗ fl_audio_detectors FAILED
#7 0x000104e9af94 in fl::audio::detector::TempoAnalyzer::update(fl::shared_ptr<fl::audio::Context>) (.build/meson-debug/ci/meson/native/fastled.dylib:arm64+0xb22f94)
#8 0x000102740c54 in _fl_func_60() (.build/meson-debug/tests/fl_audio_detectors.dylib:arm64+0x34c54)
#9 0x00010274c4a0 in void fl::function<void ()>::functor_invoker<void (*)()>(void const*) (.build/meson-debug/tests/fl_audio_detectors.dylib:arm64+0x404a0)
(Reproduced on multiple reruns — not a flake.)
Bisect
The failure window is between two adjacent master commits:
| Commit | Date | macos result |
|---|---|---|
7a719c07c1 |
2026-06-19T19:10Z | ✅ success (fix(esp32/parlio): IRAM default in boards.py — #3276) |
a8b5cac9a6 |
2026-06-19T19:16Z | ❌ first failure (refactor(deque): chunked map-of-fixed-size-blocks layout — #3282 / closes #3270) |
7c31205e0e |
later | ❌ still failing |
820fab060f |
later | ❌ still failing |
Breaking commit: a8b5cac / PR #3282. The squash-merge replaced fl::deque<T>'s vector-style contiguous-ring storage with a chunked map-of-fixed-size-blocks layout. The commit message itself flags one UB case it fixed in json::to_string_native (which "was UB even on the old layout after a wraparound; the chunked layout makes it an immediate buffer overrun"). Plausible that the audio path has a similar latent assumption about fl::deque<T> being contiguous.
Why only macOS-arm64?
The Linux x86-64 test / build jobs pass on the same commit. macOS-arm64 has stricter pointer-alignment + ASan/UBSan behavior than Linux x86-64 in some configurations, so a latent contiguity / pointer-stability assumption can manifest as a crash there first. Worth verifying the macOS workflow doesn't run with extra sanitizer flags that other jobs skip.
Failing CI runs
- Master: run 27844235661 (commit a8b5cac) — first failure after merge
- Master: run 27844526463 (commit 7c31205) — confirms persistence
- PR chore(lockdown): require justification on every change to root platformio.ini #3280 (unrelated lockdown PR, merged via
--admin): runs 27844490296, 27844490286 — same failure
Suggested next steps
- Run
bash test fl_audio_detectors --debugon an arm64 Mac with ASan/UBSan enabled to capture the full sanitizer report (the truncated stack here only shows the call chain, not the actual UB site). - Grep
src/fl/audio/detector/forfl::dequeusage. IfTempoAnalyzerholds afl::deque<T>and ever takes&dq[0]or relies on adjacent elements being contiguous in memory, that's the regression point. - Compare against refactor(deque): chunked map-of-fixed-size-blocks layout (closes #3270) #3282's
json::to_string_nativefix for the canonical "fix the contiguity assumption" pattern.
References
- Breaking PR: refactor(deque): chunked map-of-fixed-size-blocks layout (closes #3270) #3282
- Closes/replaces: [Container shape] fl::deque<T> should be chunked, not 2x-doubling vector-ring #3270 (original deque feature ticket)
- Discovered while merging unrelated lockdown PR chore(lockdown): require justification on every change to root platformio.ini #3280 via
--admin
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(deque): free orphaned chunks in grow_map to stop chunked-deque le…
fix(lint): follow member-qualified receivers in container_ptr (#3287)