Coverity-updates archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
New Defects reported by Coverity Scan for NetBSD-amd64-user
Hi,
Please find the latest report on new defect(s) introduced to NetBSD-amd64-user found with Coverity Scan.
200 new defect(s) introduced to NetBSD-amd64-user found with Coverity Scan.
160 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 200 defect(s)
** CID 20288: Explicit null dereferenced (FORWARD_NULL)
/external/mit/xorg/lib/dri/obj/glcpp/glcpp-parse.c: 1321 in yysyntax_error()
** CID 20297: Negative array index read (REVERSE_NEGATIVE)
/external/mit/xorg/lib/dri/obj/glcpp/glcpp-parse.c: 1351 in yysyntax_error()
** CID 401322: Destination buffer too small (BUFFER_SIZE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_context.c: 343 in draw_set_clip_state()
** CID 401327: Unchecked return value (CHECKED_RETURN)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/glx/indirect_glx.c: 370 in indirect_create_context()
** CID 401334: Logically dead code (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 166 in gs_run()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 211 in gs_run()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 261 in gs_run()
** CID 401335: Logically dead code (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 166 in gs_run_elts()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 211 in gs_run_elts()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 261 in gs_run_elts()
** CID 401336: Logically dead code (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 305 in so_run_elts()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 316 in so_run_elts()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 333 in so_run_elts()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 346 in so_run_elts()
** CID 401337: Logically dead code (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 305 in so_run_linear()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 316 in so_run_linear()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 333 in so_run_linear()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 346 in so_run_linear()
** CID 401340: Logically dead code (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c: 294 in pb_cache_manager_create_buffer()
** CID 401355: Logically dead code (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/main/glformats.c: 1537 in _mesa_error_check_format_and_type()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/main/glformats.c: 1598 in _mesa_error_check_format_and_type()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/main/glformats.c: 1601 in _mesa_error_check_format_and_type()
** CID 401360: Logically dead code (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/swrast/s_span.c: 1471 in _swrast_read_rgba_span()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/swrast/s_span.c: 1479 in _swrast_read_rgba_span()
** CID 401380: Explicit null dereferenced (FORWARD_NULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/util/u_linkage.c: 88 in util_semantic_set_from_program_file()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/util/u_linkage.c: 101 in util_semantic_set_from_program_file()
** CID 401384: Dereference after null check (FORWARD_NULL)
/external/mit/xorg/lib/gallium/obj/DRIVERrbug_core.c: 580 in rbug_shader_info()
** CID 401386: Dereference after null check (FORWARD_NULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/softpipe/sp_state_shader.c: 335 in softpipe_delete_gs_state()
** CID 401393: Dereference after null check (FORWARD_NULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/glx/dri2_glx.c: 1323 in dri2CreateScreen()
** CID 401394: Dereference after null check (FORWARD_NULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/glx/drisw_glx.c: 735 in driswCreateScreen()
** CID 401399: Explicit null dereferenced (FORWARD_NULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/state_tracker/st_cb_blit.c: 314 in st_BlitFramebuffer()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/state_tracker/st_cb_blit.c: 296 in st_BlitFramebuffer()
** CID 401410: Missing break in switch (MISSING_BREAK)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/main/get.c: 1278 in _mesa_GetBooleanv()
** CID 401414: Missing break in switch (MISSING_BREAK)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/main/get.c: 1642 in _mesa_GetDoublev()
** CID 401418: Missing break in switch (MISSING_BREAK)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/main/get.c: 1366 in _mesa_GetFloatv()
________________________________________________________________________________________________________
*** CID 20288: Explicit null dereferenced (FORWARD_NULL)
/external/mit/xorg/lib/dri/obj/glcpp/glcpp-parse.c: 1321 in yysyntax_error()
1315
1316
1317
1318
1319
1320
>>> CID 20288: Explicit null dereferenced (FORWARD_NULL)
>>> Assigning: "yyformat" = "NULL".
________________________________________________________________________________________________________
*** CID 20297: Negative array index read (REVERSE_NEGATIVE)
/external/mit/xorg/lib/dri/obj/glcpp/glcpp-parse.c: 1351 in yysyntax_error()
1345
1346
1347
1348
1349
1350
>>> CID 20297: Negative array index read (REVERSE_NEGATIVE)
>>> You might be using variable "yytoken" before verifying that it is >= 0.
________________________________________________________________________________________________________
*** CID 401322: Destination buffer too small (BUFFER_SIZE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_context.c: 343 in draw_set_clip_state()
337 */
338 void draw_set_clip_state( struct draw_context *draw,
339 const struct pipe_clip_state *clip )
340 {
341 draw_do_flush(draw, DRAW_FLUSH_PARAMETER_CHANGE);
342
>>> CID 401322: Destination buffer too small (BUFFER_SIZE)
>>> You might overrun the 16 byte destination string "draw->plane[6]" by writing the maximum 128 bytes from "clip->ucp".
343 memcpy(&draw->plane[6], clip->ucp, sizeof(clip->ucp));
344 }
345
346
347 /**
348 * Set the draw module's viewport state.
________________________________________________________________________________________________________
*** CID 401327: Unchecked return value (CHECKED_RETURN)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/glx/indirect_glx.c: 370 in indirect_create_context()
364 gc = calloc(1, sizeof *gc);
365 if (!gc) {
366 /* Out of memory */
367 return NULL;
368 }
369
>>> CID 401327: Unchecked return value (CHECKED_RETURN)
>>> No check of the return value of "glx_context_init(gc, psc, mode)".
370 glx_context_init(gc, psc, mode);
371 gc->isDirect = GL_FALSE;
372 gc->vtable = &indirect_context_vtable;
373 state = calloc(1, sizeof(struct __GLXattributeRec));
374 gc->renderType = renderType;
375
________________________________________________________________________________________________________
*** CID 401334: Logically dead code (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 166 in gs_run()
160 TRIANGLE(flags, idx[1], idx[2], idx[0]);
161 }
162 }
163 }
164 break;
165
>>> CID 401334: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "case 7U:".
166 case PIPE_PRIM_QUADS:
167 if (last_vertex_last) {
168 for (i = 0; i + 3 < count; i += 4) {
169 idx[0] = GET_ELT(i);
170 idx[1] = GET_ELT(i + 1);
171 idx[2] = GET_ELT(i + 2);
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 211 in gs_run()
205 else
206 TRIANGLE(flags, idx[0], idx[2], idx[3]);
207 }
208 }
209 break;
210
>>> CID 401334: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "case 8U:".
211 case PIPE_PRIM_QUAD_STRIP:
212 if (count >= 4) {
213 idx[2] = GET_ELT(0);
214 idx[3] = GET_ELT(1);
215
216 if (last_vertex_last) {
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 261 in gs_run()
255 TRIANGLE(flags, idx[0], idx[1], idx[3]);
256 }
257 }
258 }
259 break;
260
>>> CID 401334: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "case 9U:".
261 case PIPE_PRIM_POLYGON:
262 if (count >= 3) {
263 ushort edge_next, edge_finish;
264
265 if (last_vertex_last) {
266 flags = (DRAW_PIPE_RESET_STIPPLE |
________________________________________________________________________________________________________
*** CID 401335: Logically dead code (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 166 in gs_run_elts()
160 TRIANGLE(flags, idx[1], idx[2], idx[0]);
161 }
162 }
163 }
164 break;
165
>>> CID 401335: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "case 7U:".
166 case PIPE_PRIM_QUADS:
167 if (last_vertex_last) {
168 for (i = 0; i + 3 < count; i += 4) {
169 idx[0] = GET_ELT(i);
170 idx[1] = GET_ELT(i + 1);
171 idx[2] = GET_ELT(i + 2);
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 211 in gs_run_elts()
205 else
206 TRIANGLE(flags, idx[0], idx[2], idx[3]);
207 }
208 }
209 break;
210
>>> CID 401335: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "case 8U:".
211 case PIPE_PRIM_QUAD_STRIP:
212 if (count >= 4) {
213 idx[2] = GET_ELT(0);
214 idx[3] = GET_ELT(1);
215
216 if (last_vertex_last) {
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 261 in gs_run_elts()
255 TRIANGLE(flags, idx[0], idx[1], idx[3]);
256 }
257 }
258 }
259 break;
260
>>> CID 401335: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "case 9U:".
261 case PIPE_PRIM_POLYGON:
262 if (count >= 3) {
263 ushort edge_next, edge_finish;
264
265 if (last_vertex_last) {
266 flags = (DRAW_PIPE_RESET_STIPPLE |
________________________________________________________________________________________________________
*** CID 401336: Logically dead code (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 305 in so_run_elts()
299 else
300 TRIANGLE(flags, idx[0], idx[1], idx[2]);
301 }
302 }
303 break;
304
>>> CID 401336: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "case 10U:".
305 case PIPE_PRIM_LINES_ADJACENCY:
306 flags = DRAW_PIPE_RESET_STIPPLE;
307 for (i = 0; i + 3 < count; i += 4) {
308 idx[0] = GET_ELT(i);
309 idx[1] = GET_ELT(i + 1);
310 idx[2] = GET_ELT(i + 2);
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 316 in so_run_elts()
310 idx[2] = GET_ELT(i + 2);
311 idx[3] = GET_ELT(i + 3);
312 LINE_ADJ(flags, idx[0], idx[1], idx[2], idx[3]);
313 }
314 break;
315
>>> CID 401336: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "case 11U:".
316 case PIPE_PRIM_LINE_STRIP_ADJACENCY:
317 if (count >= 4) {
318 flags = (prim_flags & DRAW_SPLIT_BEFORE) ? 0 : DRAW_PIPE_RESET_STIPPLE;
319 idx[1] = GET_ELT(0);
320 idx[2] = GET_ELT(1);
321 idx[3] = GET_ELT(2);
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 333 in so_run_elts()
327 idx[3] = GET_ELT(i + 2);
328 LINE_ADJ(flags, idx[0], idx[1], idx[2], idx[3]);
329 }
330 }
331 break;
332
>>> CID 401336: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "case 12U:".
333 case PIPE_PRIM_TRIANGLES_ADJACENCY:
334 flags = DRAW_PIPE_RESET_STIPPLE | DRAW_PIPE_EDGE_FLAG_ALL;
335 for (i = 0; i + 5 < count; i += 6) {
336 idx[0] = GET_ELT(i);
337 idx[1] = GET_ELT(i + 1);
338 idx[2] = GET_ELT(i + 2);
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 346 in so_run_elts()
340 idx[4] = GET_ELT(i + 4);
341 idx[5] = GET_ELT(i + 5);
342 TRIANGLE_ADJ(flags, idx[0], idx[1], idx[2], idx[3], idx[4], idx[5]);
343 }
344 break;
345
>>> CID 401336: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "case 13U:".
346 case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY:
347 if (count >= 6) {
348 flags = DRAW_PIPE_RESET_STIPPLE | DRAW_PIPE_EDGE_FLAG_ALL;
349 idx[0] = GET_ELT(1);
350 idx[2] = GET_ELT(0);
351 idx[4] = GET_ELT(2);
________________________________________________________________________________________________________
*** CID 401337: Logically dead code (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 305 in so_run_linear()
299 else
300 TRIANGLE(flags, idx[0], idx[1], idx[2]);
301 }
302 }
303 break;
304
>>> CID 401337: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "case 10U:".
305 case PIPE_PRIM_LINES_ADJACENCY:
306 flags = DRAW_PIPE_RESET_STIPPLE;
307 for (i = 0; i + 3 < count; i += 4) {
308 idx[0] = GET_ELT(i);
309 idx[1] = GET_ELT(i + 1);
310 idx[2] = GET_ELT(i + 2);
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 316 in so_run_linear()
310 idx[2] = GET_ELT(i + 2);
311 idx[3] = GET_ELT(i + 3);
312 LINE_ADJ(flags, idx[0], idx[1], idx[2], idx[3]);
313 }
314 break;
315
>>> CID 401337: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "case 11U:".
316 case PIPE_PRIM_LINE_STRIP_ADJACENCY:
317 if (count >= 4) {
318 flags = (prim_flags & DRAW_SPLIT_BEFORE) ? 0 : DRAW_PIPE_RESET_STIPPLE;
319 idx[1] = GET_ELT(0);
320 idx[2] = GET_ELT(1);
321 idx[3] = GET_ELT(2);
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 333 in so_run_linear()
327 idx[3] = GET_ELT(i + 2);
328 LINE_ADJ(flags, idx[0], idx[1], idx[2], idx[3]);
329 }
330 }
331 break;
332
>>> CID 401337: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "case 12U:".
333 case PIPE_PRIM_TRIANGLES_ADJACENCY:
334 flags = DRAW_PIPE_RESET_STIPPLE | DRAW_PIPE_EDGE_FLAG_ALL;
335 for (i = 0; i + 5 < count; i += 6) {
336 idx[0] = GET_ELT(i);
337 idx[1] = GET_ELT(i + 1);
338 idx[2] = GET_ELT(i + 2);
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_decompose_tmp.h: 346 in so_run_linear()
340 idx[4] = GET_ELT(i + 4);
341 idx[5] = GET_ELT(i + 5);
342 TRIANGLE_ADJ(flags, idx[0], idx[1], idx[2], idx[3], idx[4], idx[5]);
343 }
344 break;
345
>>> CID 401337: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "case 13U:".
346 case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY:
347 if (count >= 6) {
348 flags = DRAW_PIPE_RESET_STIPPLE | DRAW_PIPE_EDGE_FLAG_ALL;
349 idx[0] = GET_ELT(1);
350 idx[2] = GET_ELT(0);
351 idx[4] = GET_ELT(2);
________________________________________________________________________________________________________
*** CID 401340: Logically dead code (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c: 294 in pb_cache_manager_create_buffer()
288 else if(os_time_timeout(curr_buf->start, curr_buf->end, now))
289 _pb_cache_buffer_destroy(curr_buf);
290 else
291 /* This buffer (and all hereafter) are still hot in cache */
292 break;
293 if (ret == -1)
>>> CID 401340: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "break;".
294 break;
295 curr = next;
296 next = curr->next;
297 }
298
299 /* keep searching in the hot buffers */
________________________________________________________________________________________________________
*** CID 401355: Logically dead code (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/main/glformats.c: 1537 in _mesa_error_check_format_and_type()
1531 /* OK by GL_EXT_texture_type_2_10_10_10_REV */
1532 return (ctx->API == API_OPENGLES2)
1533 ? GL_NO_ERROR : GL_INVALID_ENUM;
1534 case GL_UNSIGNED_INT_5_9_9_9_REV:
1535 return ctx->Extensions.EXT_texture_shared_exponent
1536 ? GL_NO_ERROR : GL_INVALID_ENUM;
>>> CID 401355: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "case 35899U:".
1537 case GL_UNSIGNED_INT_10F_11F_11F_REV:
1538 return ctx->Extensions.EXT_packed_float
1539 ? GL_NO_ERROR : GL_INVALID_ENUM;
1540 default:
1541 return GL_INVALID_ENUM;
1542 }
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/main/glformats.c: 1598 in _mesa_error_check_format_and_type()
1592 return GL_NO_ERROR;
1593 else
1594 return GL_INVALID_OPERATION;
1595
1596 case GL_DEPTH_STENCIL:
1597 if (type == GL_UNSIGNED_INT_24_8)
>>> CID 401355: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "return 0U;".
1598 return GL_NO_ERROR;
1599 else if (ctx->Extensions.ARB_depth_buffer_float &&
1600 type == GL_FLOAT_32_UNSIGNED_INT_24_8_REV)
1601 return GL_NO_ERROR;
1602 else
1603 return GL_INVALID_ENUM;
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/main/glformats.c: 1601 in _mesa_error_check_format_and_type()
1595
1596 case GL_DEPTH_STENCIL:
1597 if (type == GL_UNSIGNED_INT_24_8)
1598 return GL_NO_ERROR;
1599 else if (ctx->Extensions.ARB_depth_buffer_float &&
1600 type == GL_FLOAT_32_UNSIGNED_INT_24_8_REV)
>>> CID 401355: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "return 0U;".
1601 return GL_NO_ERROR;
1602 else
1603 return GL_INVALID_ENUM;
1604
1605 /* integer-valued formats */
1606 case GL_RED_INTEGER_EXT:
________________________________________________________________________________________________________
*** CID 401360: Logically dead code (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/swrast/s_span.c: 1471 in _swrast_read_rgba_span()
1465
1466 assert(srb->Map);
1467
1468 src = _swrast_pixel_address(rb, x + skip, y);
1469
1470 if (dstType == GL_UNSIGNED_BYTE) {
>>> CID 401360: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "_mesa_unpack_ubyte_rgba_row...".
1471 _mesa_unpack_ubyte_rgba_row(rb->Format, length, src,
1472 (GLubyte (*)[4]) rgba + skip);
1473 }
1474 else if (dstType == GL_FLOAT) {
1475 _mesa_unpack_rgba_row(rb->Format, length, src,
1476 (GLfloat (*)[4]) rgba + skip);
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/swrast/s_span.c: 1479 in _swrast_read_rgba_span()
1473 }
1474 else if (dstType == GL_FLOAT) {
1475 _mesa_unpack_rgba_row(rb->Format, length, src,
1476 (GLfloat (*)[4]) rgba + skip);
1477 }
1478 else {
>>> CID 401360: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "_mesa_problem(ctx, "unexpec...".
1479 _mesa_problem(ctx, "unexpected type in _swrast_read_rgba_span()");
1480 }
1481 }
1482 }
1483
1484
________________________________________________________________________________________________________
*** CID 401380: Explicit null dereferenced (FORWARD_NULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/util/u_linkage.c: 88 in util_semantic_set_from_program_file()
82 unsigned i;
83 for(i = 0; i < finst->Instruction.NumDstRegs; ++i)
84 {
85 if(finst->Dst[i].Register.File == file)
86 {
87 unsigned idx = finst->Dst[i].Register.Index;
>>> CID 401380: Explicit null dereferenced (FORWARD_NULL)
>>> Dereferencing null pointer "semantic_name".
88 if(semantic_name[idx] == TGSI_SEMANTIC_GENERIC)
89 {
90 if(!util_semantic_set_test_and_set(set, semantic_index[idx]))
91 ++count;
92 }
93 }
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/util/u_linkage.c: 101 in util_semantic_set_from_program_file()
95
96 for(i = 0; i < finst->Instruction.NumSrcRegs; ++i)
97 {
98 if(finst->Src[i].Register.File == file)
99 {
100 unsigned idx = finst->Src[i].Register.Index;
>>> CID 401380: Explicit null dereferenced (FORWARD_NULL)
>>> Dereferencing null pointer "semantic_name".
101 if(semantic_name[idx] == TGSI_SEMANTIC_GENERIC)
102 {
103 if(!util_semantic_set_test_and_set(set, semantic_index[idx]))
104 ++count;
105 }
106 }
________________________________________________________________________________________________________
*** CID 401384: Dereference after null check (FORWARD_NULL)
/external/mit/xorg/lib/gallium/obj/DRIVERrbug_core.c: 580 in rbug_shader_info()
574 }
575
576 /* just in case */
577 assert(sizeof(struct tgsi_token) == 4);
578
579 original_len = tgsi_num_tokens(tr_shdr->tokens);
>>> CID 401384: Dereference after null check (FORWARD_NULL)
>>> Comparing "tr_shdr->replaced_tokens" to null implies that "tr_shdr->replaced_tokens" might be null.
580 if (tr_shdr->replaced_tokens)
581 replaced_len = tgsi_num_tokens(tr_shdr->replaced_tokens);
582 else
583 replaced_len = 0;
584
585 rbug_send_shader_info_reply(tr_rbug->con, serial,
________________________________________________________________________________________________________
*** CID 401386: Dereference after null check (FORWARD_NULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/softpipe/sp_state_shader.c: 335 in softpipe_delete_gs_state()
329 struct sp_geometry_shader *state =
330 (struct sp_geometry_shader *)gs;
331
332 draw_delete_geometry_shader(softpipe->draw,
333 (state) ? state->draw_data : 0);
334
>>> CID 401386: Dereference after null check (FORWARD_NULL)
>>> Dereferencing null pointer "state".
335 FREE((void *) state->shader.tokens);
336 FREE(state);
337 }
338
339
340 static void
________________________________________________________________________________________________________
*** CID 401393: Dereference after null check (FORWARD_NULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/glx/dri2_glx.c: 1323 in dri2CreateScreen()
1317
1318 if (configs)
1319 glx_config_destroy_list(configs);
1320 if (visuals)
1321 glx_config_destroy_list(visuals);
1322 if (psc->driScreen)
>>> CID 401393: Dereference after null check (FORWARD_NULL)
>>> Dereferencing null pointer "psc->core".
1323 psc->core->destroyScreen(psc->driScreen);
1324 psc->driScreen = NULL;
1325 if (psc->fd >= 0)
1326 close(psc->fd);
1327 if (psc->driver)
1328 dlclose(psc->driver);
________________________________________________________________________________________________________
*** CID 401394: Dereference after null check (FORWARD_NULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/glx/drisw_glx.c: 735 in driswCreateScreen()
729 handle_error:
730 if (configs)
731 glx_config_destroy_list(configs);
732 if (visuals)
733 glx_config_destroy_list(visuals);
734 if (psc->driScreen)
>>> CID 401394: Dereference after null check (FORWARD_NULL)
>>> Dereferencing null pointer "psc->core".
735 psc->core->destroyScreen(psc->driScreen);
736 psc->driScreen = NULL;
737
738 if (psc->driver)
739 dlclose(psc->driver);
740 glx_screen_cleanup(&psc->base);
________________________________________________________________________________________________________
*** CID 401399: Explicit null dereferenced (FORWARD_NULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/state_tracker/st_cb_blit.c: 314 in st_BlitFramebuffer()
308 else {
309 /* blitting depth and stencil separately */
310
311 if (mask & GL_DEPTH_BUFFER_BIT) {
312 blit.mask = PIPE_MASK_Z;
313
>>> CID 401399: Explicit null dereferenced (FORWARD_NULL)
>>> Dereferencing null pointer "dstDepthSurf".
314 blit.dst.resource = dstDepthSurf->texture;
315 blit.dst.level = dstDepthSurf->u.tex.level;
316 blit.dst.box.z = dstDepthSurf->u.tex.first_layer;
317 blit.dst.format = dstDepthSurf->format;
318
319 blit.src.resource = srcDepthRb->texture;
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/state_tracker/st_cb_blit.c: 296 in st_BlitFramebuffer()
290 blit.mask = 0;
291 if (mask & GL_DEPTH_BUFFER_BIT)
292 blit.mask |= PIPE_MASK_Z;
293 if (mask & GL_STENCIL_BUFFER_BIT)
294 blit.mask |= PIPE_MASK_S;
295
>>> CID 401399: Explicit null dereferenced (FORWARD_NULL)
>>> Dereferencing null pointer "dstDepthSurf".
296 blit.dst.resource = dstDepthSurf->texture;
297 blit.dst.level = dstDepthSurf->u.tex.level;
298 blit.dst.box.z = dstDepthSurf->u.tex.first_layer;
299 blit.dst.format = dstDepthSurf->format;
300
301 blit.src.resource = srcDepthRb->texture;
________________________________________________________________________________________________________
*** CID 401410: Missing break in switch (MISSING_BREAK)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/main/get.c: 1278 in _mesa_GetBooleanv()
1272 params[0] = INT_TO_BOOLEAN(d->offset);
1273 break;
1274
1275 case TYPE_FLOAT_4:
1276 case TYPE_FLOATN_4:
1277 params[3] = FLOAT_TO_BOOLEAN(((GLfloat *) p)[3]);
>>> CID 401410: Missing break in switch (MISSING_BREAK)
>>> The above case falls through to this one.
1278 case TYPE_FLOAT_3:
1279 case TYPE_FLOATN_3:
1280 params[2] = FLOAT_TO_BOOLEAN(((GLfloat *) p)[2]);
1281 case TYPE_FLOAT_2:
1282 case TYPE_FLOATN_2:
1283 params[1] = FLOAT_TO_BOOLEAN(((GLfloat *) p)[1]);
________________________________________________________________________________________________________
*** CID 401414: Missing break in switch (MISSING_BREAK)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/main/get.c: 1642 in _mesa_GetDoublev()
1636 params[0] = d->offset;
1637 break;
1638
1639 case TYPE_FLOAT_4:
1640 case TYPE_FLOATN_4:
1641 params[3] = ((GLfloat *) p)[3];
>>> CID 401414: Missing break in switch (MISSING_BREAK)
>>> The above case falls through to this one.
1642 case TYPE_FLOAT_3:
1643 case TYPE_FLOATN_3:
1644 params[2] = ((GLfloat *) p)[2];
1645 case TYPE_FLOAT_2:
1646 case TYPE_FLOATN_2:
1647 params[1] = ((GLfloat *) p)[1];
________________________________________________________________________________________________________
*** CID 401418: Missing break in switch (MISSING_BREAK)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/mesa/main/get.c: 1366 in _mesa_GetFloatv()
1360 params[0] = (GLfloat) d->offset;
1361 break;
1362
1363 case TYPE_FLOAT_4:
1364 case TYPE_FLOATN_4:
1365 params[3] = ((GLfloat *) p)[3];
>>> CID 401418: Missing break in switch (MISSING_BREAK)
>>> The above case falls through to this one.
1366 case TYPE_FLOAT_3:
1367 case TYPE_FLOATN_3:
1368 params[2] = ((GLfloat *) p)[2];
1369 case TYPE_FLOAT_2:
1370 case TYPE_FLOATN_2:
1371 params[1] = ((GLfloat *) p)[1];
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, http://scan.coverity.com/projects/1449?tab=overview
To manage Coverity Scan email notifications for "coverity-updates%netbsd.org@localhost", click http://scan.coverity.com/subscriptions/edit?email=coverity-updates%40netbsd.org&token=487286ca1a9a4f4bd485d16f66b5e782 .
Home |
Main Index |
Thread Index |
Old Index