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

mon: DIVIDE_BY_ZERO in PGMapDigest::dump_pool_stats_full() #15622

Merged
merged 1 commit into from Jun 16, 2017

Conversation

Projects
None yet
3 participants
@joscollin
Member

joscollin commented Jun 12, 2017

Fixed:

** CID 1412576:  Integer handling issues  (DIVIDE_BY_ZERO)
ceph/src/mon/PGMap.cc: 683 in PGMapDigest::dump_pool_stats_full(const OSDMap &,
std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>> *,
ceph::Formatter *, bool) const()

In expression "avail * k / (m + k)", division by expression "m + k" which may be zero has undefined behavior.

Signed-off-by: Jos Collin jcollin@redhat.com

mon: DIVIDE_BY_ZERO in PGMapDigest::dump_pool_stats_full()
Fixed:

** CID 1412576:  Integer handling issues  (DIVIDE_BY_ZERO)
ceph/src/mon/PGMap.cc: 683 in PGMapDigest::dump_pool_stats_full(const OSDMap &,
std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>> *,
ceph::Formatter *, bool) const()

In expression "avail * k / (m + k)", division by expression "m + k" which may be zero has undefined behavior.

Signed-off-by: Jos Collin <jcollin@redhat.com>
@tchaikov

This comment has been minimized.

Contributor

tchaikov commented Jun 16, 2017

@tchaikov tchaikov merged commit 84d57eb into ceph:master Jun 16, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details

@joscollin joscollin deleted the joscollin:wip-CID1412576-divide-by-zero branch Jun 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment