You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
see perpetual-ml/perpetual#34 for detail. Description
Both from_parent_child and from_parent_two_children functions use unsafe { hist_tree.get_unchecked(...) } to access elements of the hist_tree slice without bounds checking. This is unsafe and can result in undefined behavior (UB) if the provided indices (root_num, child_num, update_num, first_num, second_num) are out of bounds. The lack of bounds checking makes these functions unsound.
declear histogram as a pub mod and from_parent_child , from_parent_two_children as pub function cause the result. According to the authors, these two functions should not be used externally, so it is possible to fix these problems by changing them to pub(crate).
The text was updated successfully, but these errors were encountered:
see perpetual-ml/perpetual#34 for detail.
Description
Both from_parent_child and from_parent_two_children functions use unsafe { hist_tree.get_unchecked(...) } to access elements of the hist_tree slice without bounds checking. This is unsafe and can result in undefined behavior (UB) if the provided indices (root_num, child_num, update_num, first_num, second_num) are out of bounds. The lack of bounds checking makes these functions unsound.
declear
histogram
as a pub mod andfrom_parent_child
,from_parent_two_children
as pub function cause the result. According to the authors, these two functions should not be used externally, so it is possible to fix these problems by changing them to pub(crate).The text was updated successfully, but these errors were encountered: