Skip to content

Conversation

@alexcrichton
Copy link
Member

I found while using LinearMap that it would often get its size out of sync with the actual number of elements. I found out that during pop the invocations of insert_opt_bucket might increment the size even though nothing new was being inserted.

I tried to create a simple test case or two, but I was unable to recreate the exact sequence of operations which would lead to the bug being triggered.

catamorphism added a commit that referenced this pull request Jan 29, 2013
Fix the len() method on LinearMap during popping
@catamorphism catamorphism merged commit f1e78c6 into rust-lang:incoming Jan 29, 2013
@catamorphism
Copy link
Contributor

Thanks! (If you figure out how to reproduce it, feel free to submit another pull request with the test :-)

@alexcrichton alexcrichton deleted the linearmap-len-fix branch January 29, 2013 18:39
RalfJung added a commit to RalfJung/rust that referenced this pull request Nov 8, 2025
Make pthread and other "native" synchronization objects more resilient
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants