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

Potential error #130

Open
kazachkovaanna opened this issue Jan 13, 2019 · 1 comment
Open

Potential error #130

kazachkovaanna opened this issue Jan 13, 2019 · 1 comment

Comments

@kazachkovaanna
Copy link

/// Max node height. The actual node height should be in range <tt>[0 .. c_nMaxHeight)</tt>
/**
The max height is specified by \ref skip_list::random_level_generator "random level generator" constant \p m_nUpperBound
but it should be no more than 32 (\p skip_list::c_nHeightLimit).
*/
static unsigned int const c_nMaxHeight = std::conditional<
(random_level_generator::c_nUpperBound <= skip_list::c_nHeightLimit),
std::integral_constant< unsigned int, random_level_generator::c_nUpperBound >,
std::integral_constant< unsigned int, skip_list::c_nHeightLimit >
>::type::value;
//@cond
static unsigned int const c_nMinHeight = 3;
//@endcond

m_nMinHeight must not be less than m_nMaxHeight. This could be possible with custom random generator [0..n], n < 3.

Possibly leading to segmentation fault.

@kazachkovaanna
Copy link
Author

@eugenyk please be aware that we raised this issue

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

No branches or pull requests

1 participant