summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/base/statistics.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/base/statistics.hh b/src/base/statistics.hh
index 69a2afffc..6ddf7ff17 100644
--- a/src/base/statistics.hh
+++ b/src/base/statistics.hh
@@ -2533,6 +2533,9 @@ class Distribution : public DistBase<Distribution, DistStor>
params->min = min;
params->max = max;
params->bucket_size = bkt;
+ // Division by zero is especially serious in an Aarch64 host,
+ // where it gets rounded to allocate 32GiB RAM.
+ assert(bkt > 0);
params->buckets = (size_type)ceil((max - min + 1.0) / bkt);
this->setParams(params);
this->doInit();