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

Added missing asserts for seq.index() < capacity_ and unified their usage based on has_element(). #781

Merged
merged 2 commits into from
Sep 23, 2020

Conversation

ethician
Copy link
Contributor

In a highly specific situation the call to find() was found to be stuck in an infinite cycle as it never checked whether probe_seq::index_ as accessed by seq.index() exceeded capacity_.

This situation arose after a call to a faulty implementation of std::memset (using uClibc's v0.9.32.1 memset, ARM platform) in reset_ctrl() which ended up setting the control block to 0xffffff80 0xffffff80 ... as opposed to 0x80808080 0x80808080 ....

The reordering of calls in find_first_non_full() is simply to prevent one extra, unnecessary traversal.

@fowles
Copy link
Contributor

fowles commented Sep 14, 2020

LGTM for the code. Derek can you pull this in and to test run?

@derekmauro
Copy link
Member

Thanks for reviewing. It is actually @rogeeff's turn to pull this in.

@derekmauro derekmauro assigned rogeeff and unassigned fowles and derekmauro Sep 14, 2020
absl-federation-github pushed a commit that referenced this pull request Sep 20, 2020
--
1829e203300191671abd4b478ca189019e6f88b1 by Abseil Team <absl-team@google.com>:

Don't return true from Demangle() when we didn't actually produce demangled output.

PiperOrigin-RevId: 332544020

--
239b617bd8322cfda69d0dcdd3d78499ed61206d by Abseil Team <absl-team@google.com>:

Minor documentation fix.

PiperOrigin-RevId: 332517877

--
d566c156619bbdceaf6e84bd0d3aa575d5e790f8 by Gennadiy Rozental <rogeeff@google.com>:

Added missing asserts for seq.index() < capacity_ and unified their usage based on has_element().

Import of #781

PiperOrigin-RevId: 332229369
GitOrigin-RevId: 1829e203300191671abd4b478ca189019e6f88b1
Change-Id: I5bb1f713497fef54a7abaf2020be91cb32e87b93
@derekmauro derekmauro merged commit 7680a5f into abseil:master Sep 23, 2020
rongjiecomputer pushed a commit to rongjiecomputer/abseil-cpp that referenced this pull request Oct 8, 2020
--
1829e203300191671abd4b478ca189019e6f88b1 by Abseil Team <absl-team@google.com>:

Don't return true from Demangle() when we didn't actually produce demangled output.

PiperOrigin-RevId: 332544020

--
239b617bd8322cfda69d0dcdd3d78499ed61206d by Abseil Team <absl-team@google.com>:

Minor documentation fix.

PiperOrigin-RevId: 332517877

--
d566c156619bbdceaf6e84bd0d3aa575d5e790f8 by Gennadiy Rozental <rogeeff@google.com>:

Added missing asserts for seq.index() < capacity_ and unified their usage based on has_element().

Import of abseil#781

PiperOrigin-RevId: 332229369
GitOrigin-RevId: 1829e203300191671abd4b478ca189019e6f88b1
Change-Id: I5bb1f713497fef54a7abaf2020be91cb32e87b93
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.

None yet

6 participants