Hi,
Please find the latest report on new defect(s) introduced to Pike-master found with Coverity Scan.
20 new defect(s) introduced to Pike-master found with Coverity Scan. 12 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan Showing 20 of 20 defect(s)
** CID 1465072: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 355 in f_exp()
________________________________________________________________________________________________________ *** CID 1465072: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 355 in f_exp() 349 *! 350 *! @seealso 351 *! @[pow()], @[log()] 352 */ 353 void f_exp(INT32 args) 354 {
CID 1465072: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
355 ARG_CHECK("exp"); 356 SET_SVAL(sp[-1], T_FLOAT, 0, float_number, FL(exp)(sp[-1].u.float_number)); 357 } 358 359 /*! @decl int|float pow(float|int n, float|int x) 360 *! @decl mixed pow(object n, float|int|object x)
** CID 1465071: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 338 in f_log()
________________________________________________________________________________________________________ *** CID 1465071: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 338 in f_log() 332 *! 333 *! @seealso 334 *! @[pow()], @[exp()] 335 */ 336 void f_log(INT32 args) 337 {
CID 1465071: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
338 ARG_CHECK("log"); 339 if(sp[-1].u.float_number <=0.0) 340 Pike_error("Log on number less or equal to zero.\n"); 341 342 sp[-1].u.float_number = FL(log)(sp[-1].u.float_number); 343 }
** CID 1465070: (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/operators.c: 1466 in pair_add() /home/covbuilder/pike/Pike-v8.1-snapshot/src/operators.c: 1458 in pair_add()
________________________________________________________________________________________________________ *** CID 1465070: (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/operators.c: 1466 in pair_add() 1460 } 1461 } 1462 else if( TYPEOF(Pike_sp[-1]) == PIKE_T_FLOAT ) 1463 { 1464 if( TYPEOF(Pike_sp[-2]) == PIKE_T_INT ) 1465 {
CID 1465070: (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-2].u.integer" to "Pike_interpreter_pointer->stack_pointer[-2].u.float_number", which have overlapping memory locations and different types.
1466 Pike_sp[-2].u.float_number = Pike_sp[-2].u.integer; 1467 TYPEOF(Pike_sp[-2]) = PIKE_T_FLOAT; 1468 } 1469 } 1470 1471 if (TYPEOF(Pike_sp[-2]) != TYPEOF(Pike_sp[-1])) /home/covbuilder/pike/Pike-v8.1-snapshot/src/operators.c: 1458 in pair_add() 1452 stack_swap(); 1453 } 1454 else if( TYPEOF(Pike_sp[-2]) == PIKE_T_FLOAT ) 1455 { 1456 if( TYPEOF(Pike_sp[-1]) == PIKE_T_INT ) 1457 {
CID 1465070: (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "Pike_interpreter_pointer->stack_pointer[-1].u.float_number", which have overlapping memory locations and different types.
1458 Pike_sp[-1].u.float_number = Pike_sp[-1].u.integer; 1459 TYPEOF(Pike_sp[-1]) = PIKE_T_FLOAT; 1460 } 1461 } 1462 else if( TYPEOF(Pike_sp[-1]) == PIKE_T_FLOAT ) 1463 {
** CID 1465069: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 384 in f_floor()
________________________________________________________________________________________________________ *** CID 1465069: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 384 in f_floor() 378 *! 379 *! @seealso 380 *! @[ceil()], @[round()] 381 */ 382 void f_floor(INT32 args) 383 {
CID 1465069: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
384 ARG_CHECK("floor"); 385 sp[-1].u.float_number = FL(floor)(sp[-1].u.float_number); 386 } 387 388 /*! @decl float ceil(int|float f) 389 *!
** CID 1465068: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 115 in f_acos()
________________________________________________________________________________________________________ *** CID 1465068: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 115 in f_acos() 109 *! 110 *! @seealso 111 *! @[cos()], @[asin()] 112 */ 113 void f_acos(INT32 args) 114 {
CID 1465068: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
115 ARG_CHECK("acos"); 116 if ((sp[-1].u.float_number >= -1.0) && 117 (sp[-1].u.float_number <= 1.0)) { 118 sp[-1].u.float_number = FL(acos)(sp[-1].u.float_number); 119 } else { 120 sp[-1].u.float_number = (FLOAT_TYPE) MAKE_NAN();
** CID 1465067: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 135 in f_tan()
________________________________________________________________________________________________________ *** CID 1465067: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 135 in f_tan() 129 *! @seealso 130 *! @[atan()], @[sin()], @[cos()] 131 */ 132 void f_tan(INT32 args) 133 { 134 FLOAT_ARG_TYPE f;
CID 1465067: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
135 ARG_CHECK("tan"); 136 137 f = (sp[-1].u.float_number-M_PI/2) / M_PI; 138 if(f==floor(f+0.5)) 139 { 140 Pike_error("Impossible tangent.\n");
** CID 1465066: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 191 in f_sinh()
________________________________________________________________________________________________________ *** CID 1465066: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 191 in f_sinh() 185 *! 186 *! @seealso 187 *! @[asinh()], @[cosh()], @[tanh()] 188 */ 189 void f_sinh(INT32 args) 190 {
CID 1465066: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
191 ARG_CHECK("sinh"); 192 sp[-1].u.float_number = FL(sinh)(sp[-1].u.float_number); 193 } 194 195 /*! @decl float asinh(int|float f) 196 *!
** CID 1465065: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 401 in f_ceil()
________________________________________________________________________________________________________ *** CID 1465065: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 401 in f_ceil() 395 *! 396 *! @seealso 397 *! @[floor()], @[round()] 398 */ 399 void f_ceil(INT32 args) 400 {
CID 1465065: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
401 ARG_CHECK("ceil"); 402 sp[-1].u.float_number = FL(ceil)(sp[-1].u.float_number); 403 } 404 405 /*! @decl float round(int|float f) 406 *!
** CID 1465064: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/Image/image.c: 1784 in image_tuned_box_topbottom()
________________________________________________________________________________________________________ *** CID 1465064: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/Image/image.c: 1784 in image_tuned_box_topbottom() 1778 memcpy(dest,dest-xsize,length*sizeof(rgb_group)); 1779 dest+=xsize; 1780 } else { 1781 from = dest; 1782 for(x=0; x<64; x++) *(dest++) = color; 1783 for(;x<length-64;x+=64,dest+=64)
CID 1465064: Memory - corruptions (OVERLAPPING_COPY) Copying 192 bytes from "from" to "dest", which point to overlapping memory locations.
1784 memcpy(dest, from, 64*sizeof(rgb_group)); 1785 for(;x<length; x++) *(dest++) = color; 1786 dest += xsize-length; 1787 old = color; 1788 } 1789 }
** CID 1465063: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 156 in f_atan()
________________________________________________________________________________________________________ *** CID 1465063: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 156 in f_atan() 150 *! 151 *! @seealso 152 *! @[tan()], @[asin()], @[acos()], @[atan2()] 153 */ 154 void f_atan(INT32 args) 155 {
CID 1465063: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
156 ARG_CHECK("atan"); 157 sp[-1].u.float_number = FL(atan)(sp[-1].u.float_number); 158 } 159 160 /*! @decl float atan2(float f1, float f2) 161 *!
** CID 1465062: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 68 in f_sin()
________________________________________________________________________________________________________ *** CID 1465062: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 68 in f_sin() 62 *! 63 *! @seealso 64 *! @[asin()], @[cos()], @[tan()] 65 */ 66 void f_sin(INT32 args) 67 {
CID 1465062: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
68 ARG_CHECK("sin"); 69 sp[-1].u.float_number = FL(sin)(sp[-1].u.float_number); 70 } 71 72 /*! @decl float asin(int|float f) 73 *!
** CID 1465061: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 230 in f_acosh()
________________________________________________________________________________________________________ *** CID 1465061: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 230 in f_acosh() 224 *! 225 *! @seealso 226 *! @[cosh()], @[asinh()] 227 */ 228 void f_acosh(INT32 args) 229 {
CID 1465061: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
230 ARG_CHECK("acosh"); 231 sp[-1].u.float_number = FL(acosh)(sp[-1].u.float_number); 232 } 233 234 /*! @decl float tanh(int|float f) 235 *!
** CID 1465060: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 256 in f_atanh()
________________________________________________________________________________________________________ *** CID 1465060: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 256 in f_atanh() 250 *! 251 *! @seealso 252 *! @[tanh()], @[asinh()], @[acosh()] 253 */ 254 void f_atanh(INT32 args) 255 {
CID 1465060: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
256 ARG_CHECK("atanh"); 257 sp[-1].u.float_number = FL(atanh)(sp[-1].u.float_number); 258 } 259 260 /*! @decl float sqrt(float f) 261 *! @decl int sqrt(int i)
** CID 1465059: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 82 in f_asin()
________________________________________________________________________________________________________ *** CID 1465059: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 82 in f_asin() 76 *! 77 *! @seealso 78 *! @[sin()], @[acos()] 79 */ 80 void f_asin(INT32 args) 81 {
CID 1465059: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
82 ARG_CHECK("asin"); 83 if ((sp[-1].u.float_number >= -1.0) && 84 (sp[-1].u.float_number <= 1.0)) { 85 sp[-1].u.float_number = FL(asin)(sp[-1].u.float_number); 86 } else { 87 sp[-1].u.float_number = (FLOAT_TYPE) MAKE_NAN();
** CID 1465058: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 217 in f_cosh()
________________________________________________________________________________________________________ *** CID 1465058: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 217 in f_cosh() 211 *! 212 *! @seealso 213 *! @[acosh()], @[sinh()], @[tanh()] 214 */ 215 void f_cosh(INT32 args) 216 {
CID 1465058: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
217 ARG_CHECK("cosh"); 218 sp[-1].u.float_number = FL(cosh)(sp[-1].u.float_number); 219 } 220 221 /*! @decl float acosh(int|float f) 222 *!
** CID 1465057: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 101 in f_cos()
________________________________________________________________________________________________________ *** CID 1465057: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 101 in f_cos() 95 *! 96 *! @seealso 97 *! @[acos()], @[sin()], @[tan()] 98 */ 99 void f_cos(INT32 args) 100 {
CID 1465057: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
101 ARG_CHECK("cos"); 102 sp[-1].u.float_number = FL(cos)(sp[-1].u.float_number); 103 } 104 105 /*! @decl float acos(int|float f) 106 *!
** CID 1465056: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 204 in f_asinh()
________________________________________________________________________________________________________ *** CID 1465056: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 204 in f_asinh() 198 *! 199 *! @seealso 200 *! @[sinh()], @[acosh()] 201 */ 202 void f_asinh(INT32 args) 203 {
CID 1465056: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
204 ARG_CHECK("asinh"); 205 sp[-1].u.float_number = FL(asinh)(sp[-1].u.float_number); 206 } 207 208 /*! @decl float cosh(int|float f) 209 *!
** CID 1465055: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 243 in f_tanh()
________________________________________________________________________________________________________ *** CID 1465055: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 243 in f_tanh() 237 *! 238 *! @seealso 239 *! @[atanh()], @[sinh()], @[cosh()] 240 */ 241 void f_tanh(INT32 args) 242 {
CID 1465055: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
243 ARG_CHECK("tanh"); 244 sp[-1].u.float_number = FL(tanh)(sp[-1].u.float_number); 245 } 246 247 /*! @decl float atanh(int|float f) 248 *!
** CID 1465054: (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/operators.c: 2104 in float_promote() /home/covbuilder/pike/Pike-v8.1-snapshot/src/operators.c: 2099 in float_promote()
________________________________________________________________________________________________________ *** CID 1465054: (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/operators.c: 2104 in float_promote() 2098 { 2099 SET_SVAL(Pike_sp[-2], T_FLOAT, 0, float_number, (FLOAT_TYPE)Pike_sp[-2].u.integer); 2100 return 1; 2101 } 2102 else if(TYPEOF(Pike_sp[-1]) == T_INT && TYPEOF(Pike_sp[-2]) == T_FLOAT) 2103 {
CID 1465054: (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
2104 SET_SVAL(Pike_sp[-1], T_FLOAT, 0, float_number, (FLOAT_TYPE)Pike_sp[-1].u.integer); 2105 return 1; 2106 } 2107 2108 if(is_bignum_object_in_svalue(Pike_sp-2) && TYPEOF(Pike_sp[-1]) == T_FLOAT) 2109 { /home/covbuilder/pike/Pike-v8.1-snapshot/src/operators.c: 2099 in float_promote() 2093 } 2094 2095 static int float_promote(void) 2096 { 2097 if(TYPEOF(Pike_sp[-2]) == T_INT && TYPEOF(Pike_sp[-1]) == T_FLOAT) 2098 {
CID 1465054: (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-2].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
2099 SET_SVAL(Pike_sp[-2], T_FLOAT, 0, float_number, (FLOAT_TYPE)Pike_sp[-2].u.integer); 2100 return 1; 2101 } 2102 else if(TYPEOF(Pike_sp[-1]) == T_INT && TYPEOF(Pike_sp[-2]) == T_FLOAT) 2103 { 2104 SET_SVAL(Pike_sp[-1], T_FLOAT, 0, float_number, (FLOAT_TYPE)Pike_sp[-1].u.integer);
** CID 1465053: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 418 in f_round()
________________________________________________________________________________________________________ *** CID 1465053: Memory - corruptions (OVERLAPPING_COPY) /home/covbuilder/pike/Pike-v8.1-snapshot/src/modules/_math/math.c: 418 in f_round() 412 *! 413 *! @seealso 414 *! @[floor()], @[ceil()] 415 */ 416 void f_round(INT32 args) 417 {
CID 1465053: Memory - corruptions (OVERLAPPING_COPY) Assigning "Pike_interpreter_pointer->stack_pointer[-1].u.integer" to "__sv_ptr->u.float_number", which have overlapping memory locations and different types.
418 ARG_CHECK("round"); 419 sp[-1].u.float_number = FL(rint)(sp[-1].u.float_number); 420 } 421 422 423 /*! @decl int|float|object limit(int|float|object minval, int|float|object x, int|float|object maxval)
________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/ls/click?upn=nJaKvJSIH-2FPAfmty-2BK5tYpPklA...