Skip to content

Bugfix/10 console poll heap pressure - #11

Open
LK-Simon wants to merge 11 commits into
mainfrom
bugfix/10-console-poll-heap-pressure
Open

Bugfix/10 console poll heap pressure#11
LK-Simon wants to merge 11 commits into
mainfrom
bugfix/10-console-poll-heap-pressure

Conversation

@LK-Simon

Copy link
Copy Markdown
Contributor

Summary

Fixes a low-memory failure path in Console::Poll() discovered during ESP32 EventConsole-Lab stress testing.

Closes #10.

Problem

ConsoleConfig::MaximumLineLength bounds Console input, but the backing std::string previously grew incrementally from Console::Poll().

Under severe heap pressure, a normal std::string::push_back() could therefore require a late allocation and ultimately reach std::terminate() if memory was unavailable.

The observed ESP32 backtrace resolved through:

std::terminate
operator new
std::string::_M_create
std::string::_M_mutate
std::string::push_back
ESPressio::Serial::Console::Poll

@LK-Simon LK-Simon self-assigned this Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console::Poll can terminate under heap pressure while growing bounded input line

1 participant