Skip to content

fix(RedisStreamBuf): SIGSEGV when socket dies during std::getline() #…#5218

Merged
aleks-f merged 3 commits intomainfrom
5217-redis-segv
Feb 23, 2026
Merged

fix(RedisStreamBuf): SIGSEGV when socket dies during std::getline() #…#5218
aleks-f merged 3 commits intomainfrom
5217-redis-segv

Conversation

@aleks-f
Copy link
Copy Markdown
Member

@aleks-f aleks-f commented Feb 22, 2026

…5217

@aleks-f aleks-f added this to the Release 1.15.1 milestone Feb 22, 2026
@aleks-f aleks-f self-assigned this Feb 22, 2026
@aleks-f aleks-f added the bug label Feb 22, 2026
@aleks-f aleks-f requested a review from Copilot February 22, 2026 15:44
@aleks-f aleks-f linked an issue Feb 22, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Handles socket/Redis I/O failures in RedisStreamBuf by converting exceptions from sendBytes/receiveBytes into return values, aiming to prevent crashes during stream reads (e.g., std::getline()).

Changes:

  • Added Poco/Exception.h include for exception types.
  • Wrapped receiveBytes and sendBytes in try/catch blocks.
  • Returned sentinel/error values on timeout and other exceptions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aleks-f aleks-f merged commit 66fc805 into main Feb 23, 2026
102 checks passed
@aleks-f aleks-f deleted the 5217-redis-segv branch February 23, 2026 00:19
matejk pushed a commit that referenced this pull request Feb 23, 2026
#5218)

* fix(RedisStreamBuf): SIGSEGV when socket dies during std::getline() #5217

* fix(RedisStreamBuf): always return -1 on exception (errors are positive numbers) #5217

* fix(RedisStreamBuf): return type mismatch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RedisStreamBuf: SIGSEGV when socket dies during std::getline()

2 participants