-
Notifications
You must be signed in to change notification settings - Fork 259
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
TopicPartitionList::elements violates unsafe precondition in slice::from_raw_parts_mut #681
Open
hadronzoo opened this issue
May 5, 2024
· 0 comments
· Fixed by hadronzoo/rust-rdkafka#1 · May be fixed by #686
Open
TopicPartitionList::elements violates unsafe precondition in slice::from_raw_parts_mut #681
hadronzoo opened this issue
May 5, 2024
· 0 comments
· Fixed by hadronzoo/rust-rdkafka#1 · May be fixed by #686
Comments
hadronzoo
added a commit
to hadronzoo/rust-rdkafka
that referenced
this issue
May 5, 2024
hadronzoo
added a commit
to hadronzoo/rust-rdkafka
that referenced
this issue
May 5, 2024
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following panics on rebalance when compiled with Rust 1.78.0:
Panic message:
It appears to be caused by the
slice::from_raw_parts_mut
call inTopicPartitionList::elements
:It looks like
elems
can be null:If I check
elements
capacity and return if it's 0, this panic does not occur:It appears that
TopicPartitionList::elements
should check thatcnt
is greater than zero before callingslice::from_raw_parts_mut
.The text was updated successfully, but these errors were encountered: