Skip to content

fix(autoresearch): extend 16 KB loop stack to all ESP32 variants (#3576 Phase 9) - #3590

Merged
zackees merged 1 commit into
masterfrom
fix/p4-loop-stack-audit-3576
Jul 2, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/p4-loop-stack-audit-3576

Conversation

@zackees

@zackees zackees commented Jul 2, 2026 •

Copy link
Copy Markdown
Member

The #3569 loop-stack fix was gated to classic ESP32; ESP32-P4 ran the same ~8 KB-deep test chain on the 8 KB Arduino default and hit a hard Stack protection fault in loopTask (stack dump full of wave8 LUT bytes) on every SPI/UART/PARLIO test.

Bench verification (P4, COM25, GPIO5→6 jumper): SPI and UART went 0/4-with-panic → 4/4 byte-exact; RMT stays 4/4. PARLIO now runs without crashing but its capture failure matches the C6 signature — #3586 is cross-chip.

Refs #3576, #3569, #3586.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Broadened support for the larger loop task stack setting to cover the full ESP32 family, improving stability on more board variants.
    • Reduced the risk of stack protection faults during SPI, UART, and PARLIO testing on affected ESP32 devices.

… Phase 9)

The #3569 fix raised the AutoResearch loopTask stack to 16 KB on
classic ESP32 only. ESP32-P4 runs the same ~8 KB-deep
runSingleTest -> encode -> capture chain on the Arduino default 8 KB
stack and died with a hard "Stack protection fault" in loopTask (stack
dump full of wave8 LUT bytes) on every SPI/UART/PARLIO test. Gate is
now FL_IS_ESP32-wide.

Bench (P4, COM25, GPIO5->6): SPI and UART went 0/4-with-panic ->
4/4 byte-exact; RMT stays 4/4. PARLIO runs without crashing but its
capture failure matches the C6 signature (#3586 — now cross-chip).

Co-Authored-By: Claude Fable 5 <[email protected]>
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jul 2, 2026
@zackees
zackees merged commit b693ac3 into master Jul 2, 2026
7 checks passed
@coderabbitai

coderabbitai Bot commented Jul 2, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6e0bfd09-70d4-4ab4-8d68-a1c09c327d69

📥 Commits

Reviewing files that changed from the base of the PR and between 166f72a and 9a0cd3e.

📒 Files selected for processing (1)
  • examples/AutoResearch/AutoResearch.ino

📝 Walkthrough

Walkthrough

The preprocessor condition guarding an increased loop task stack size in AutoResearch.ino was broadened from targeting only FL_IS_ESP_32DEV to the wider FL_IS_ESP32 family, with accompanying comment updates describing the stack fault issue affecting additional ESP32 variants including ESP32-P4.

Changes

ESP32 Stack Size Guard Update

Layer / File(s) Summary
Broaden preprocessor guard for stack size increase
examples/AutoResearch/AutoResearch.ino
Condition changed from FL_IS_ESP_32DEV to FL_IS_ESP32 for enabling a 16KB loop task stack size, with comments updated to reflect the issue affecting more ESP32 variants including ESP32-P4.

Estimated code review effort: 1 (Trivial) | ~2 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/p4-loop-stack-audit-3576

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant