From d87a2c02d382730f94119bb43389a4256615264c Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Thu, 1 Nov 2007 14:49:38 +0000 Subject: [PATCH] clear the tarval buffer before fc_val_from_ieee754() fills bits in. There seems to be uninitialized bytes ... [r16407] --- ir/tv/fltcalc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ir/tv/fltcalc.c b/ir/tv/fltcalc.c index bed4dac97..431d573f1 100644 --- a/ir/tv/fltcalc.c +++ b/ir/tv/fltcalc.c @@ -1063,6 +1063,9 @@ fp_value *fc_val_from_ieee754(LLDBL l, char exp_size, char mant_size, fp_value * if (result == NULL) result = calc_buffer; temp = alloca(value_size); + /* CLEAR the buffer */ + memset(result, 0, fc_get_buffer_length()); + result->desc.exponent_size = exp_size; result->desc.mantissa_size = mant_size; -- 2.20.1