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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to