You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "OxBat (via GitHub)" <gi...@apache.org> on 2026/02/02 11:35:43 UTC

Re: [PR] Fix: Deterministic Crash (SIGSEGV) in AsyncAppender when resizing buffer [logging-log4cxx]

OxBat commented on PR #586:
URL: https://github.com/apache/logging-log4cxx/pull/586#issuecomment-3834596643

   @rm5248  Added `testBufferResizeWraparound` to the PR. It reproduces the crash on master and confirms the fix works.
   
   @swebb2066  Valid point on quiescence. The problem is that even if we pause the thread perfectly, the logic is still broken: The reader uses `index % new_size`, but the data is sitting at `index % old_size`. So on resume, we read empty slots and crash immediately.
   
   This PR fixes the data alignment so resizing is actually possible. We can look at better locking/atomics in a follow-up, but this fixes the immediate segfault


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org