juanthropic opened a new pull request, #13808:
URL: https://github.com/apache/trafficserver/pull/13808
FixedStore::span() returned all N inline slots instead of the _count
constructed ones. Every caller trusted it as the element range, so:
- begin()/end() and range-for walked past the last element into
uninitialized slots.
- ~FixedStore() ran destructors on slots that were never constructed,
which is undefined behavior for non-trivial T.
The existing tests only used N=1 filled to capacity, where N equals
_count, so the bug never showed. This adds two tests on a partially
filled fixed store: one for iteration bounds, one for destructor
count.
Upstream libswoc has the same code.
--
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]