From 9c827d9acb98839ddabd42925e994281c64f1709 Mon Sep 17 00:00:00 2001 From: Eugene Loh Date: Tue, 25 Jul 2017 12:52:19 -0700 Subject: [PATCH] dtrace: fix lquantize for 32-bit overflow on values Fix dtrace_aggregate_lquantize() so that it no longer truncates value to or computes bin index in 32 bits. Linux bug is 26268136 dtrace_aggregate_lquantize() suffers from 32-bit overflow It references a corresponding Solaris bug. Orabug: 26268136 Signed-off-by: Eugene Loh Reviewed-by: Kris Van Hees --- dtrace/dtrace_probe_ctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtrace/dtrace_probe_ctx.c b/dtrace/dtrace_probe_ctx.c index 5a539a18243f..53ac64f0f66f 100644 --- a/dtrace/dtrace_probe_ctx.c +++ b/dtrace/dtrace_probe_ctx.c @@ -166,7 +166,7 @@ void dtrace_aggregate_lquantize(uint64_t *lquanta, uint64_t nval, int32_t base = DTRACE_LQUANTIZE_BASE(arg); uint16_t step = DTRACE_LQUANTIZE_STEP(arg); uint16_t levels = DTRACE_LQUANTIZE_LEVELS(arg); - int32_t val = (int32_t)nval, level; + int64_t val = (int64_t)nval, level; ASSERT(step != 0); ASSERT(levels != 0); -- 2.50.1