Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RingBuffer::resize() issues #270

Open
Tobias1595 opened this issue Sep 21, 2018 · 0 comments
Open

RingBuffer::resize() issues #270

Tobias1595 opened this issue Sep 21, 2018 · 0 comments
Labels

Comments

@Tobias1595
Copy link

Looking into Ringbuffer.inl I noticed that Ringbuffer::resize() simply resizes the internal buffer without any additional checks concerning head and tails. Resizing, especially shrinking a Ringbuffer after it was already used can have results ranging from loss or duplication of entries to crashes due to runtime errors. In short, shrinking a buffer such that the head or the tails are left at invalid (too high) indices should be avoided.

Currently, the RingBuffer is used for logging in glbinding-aux, and resizing this buffer is exposed in logging.h.

@cgcostume cgcostume added this to To do in glbinding-4.0.0 Oct 23, 2018
@cgcostume cgcostume added the bug label Oct 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants