Skip to content

fl_audio_detectors macOS-arm64 unit test failing on master since PR #3282 (deque refactor) #3286

Closed

Description

@zackees

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

Suggested next steps

  1. Run bash test fl_audio_detectors --debug on 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).
  2. Grep src/fl/audio/detector/ for fl::deque usage. If TempoAnalyzer holds a fl::deque<T> and ever takes &dq[0] or relies on adjacent elements being contiguous in memory, that's the regression point.
  3. Compare against refactor(deque): chunked map-of-fixed-size-blocks layout (closes #3270) #3282's json::to_string_native fix for the canonical "fix the contiguity assumption" pattern.

References

Activity

  1. moved this from Triage to Done in FastLED Trackeron Jun 19, 2026
  2. added a commit that references this issue on Jun 20, 2026
    5c9662a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions