libdrm-2.4.121-1.fc41
List of Defects
Error: CPPCHECK_WARNING: [#def1]
libdrm-2.4.121-build/libdrm-2.4.121/amdgpu/amdgpu_bo.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def2]
libdrm-2.4.121-build/libdrm-2.4.121/amdgpu/amdgpu_cs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def3]
libdrm-2.4.121-build/libdrm-2.4.121/amdgpu/amdgpu_device.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def4]
libdrm-2.4.121-build/libdrm-2.4.121/amdgpu/amdgpu_vamgr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
libdrm-2.4.121-build/libdrm-2.4.121/amdgpu/amdgpu_vamgr.c: scope_hint: In function ‘amdgpu_vamgr_init’
libdrm-2.4.121-build/libdrm-2.4.121/amdgpu/amdgpu_vamgr.c:56:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘n’
# 54| pthread_mutex_lock(&mgr->bo_va_mutex);
# 55| n = calloc(1, sizeof(struct amdgpu_bo_va_hole));
# 56|-> n->size = mgr->va_max - start;
# 57| n->offset = start;
# 58| list_add(&n->list, &mgr->va_holes);
Error: CPPCHECK_WARNING (CWE-401): [#def6]
libdrm-2.4.121-build/libdrm-2.4.121/amdgpu/amdgpu_vamgr.c:87: error[memleak]: Memory leak: n
# 85| hole->size -= (end_va - hole->offset);
# 86| hole->offset = end_va;
# 87|-> } else if (start_va > hole->offset) {
# 88| hole->size = start_va - hole->offset;
# 89| } else if (end_va - hole->offset < hole->size) {
Error: COMPILER_WARNING: [#def7]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c:47: included_from: Included from here.
libdrm-2.4.121-build/libdrm-2.4.121/include/drm/i915_drm.h:2233:1: warning[-Wpacked]: packed attribute is unnecessary for ‘i915_context_engines_load_balance’
# 2233 | } __attribute__((packed));
# | ^
# 2231|
# 2232| struct i915_engine_class_instance engines[];
# 2233|-> } __attribute__((packed));
# 2234|
# 2235| #define I915_DEFINE_CONTEXT_ENGINES_LOAD_BALANCE(name__, N__) struct { \
Error: COMPILER_WARNING: [#def8]
libdrm-2.4.121-build/libdrm-2.4.121/include/drm/i915_drm.h:2271:1: warning[-Wpacked]: packed attribute is unnecessary for ‘i915_context_engines_bond’
# 2271 | } __attribute__((packed));
# | ^
# 2269|
# 2270| struct i915_engine_class_instance engines[];
# 2271|-> } __attribute__((packed));
# 2272|
# 2273| #define I915_DEFINE_CONTEXT_ENGINES_BOND(name__, N__) struct { \
Error: COMPILER_WARNING: [#def9]
libdrm-2.4.121-build/libdrm-2.4.121/include/drm/i915_drm.h:2399:1: warning[-Wpacked]: packed attribute is unnecessary for ‘i915_context_engines_parallel_submit’
# 2399 | } __attribute__((packed));
# | ^
# 2397| struct i915_engine_class_instance engines[];
# 2398|
# 2399|-> } __attribute__((packed));
# 2400|
# 2401| #define I915_DEFINE_CONTEXT_ENGINES_PARALLEL_SUBMIT(name__, N__) struct { \
Error: COMPILER_WARNING: [#def10]
libdrm-2.4.121-build/libdrm-2.4.121/include/drm/i915_drm.h:2473:1: warning[-Wpacked]: packed attribute is unnecessary for ‘i915_context_param_engines’
# 2473 | } __attribute__((packed));
# | ^
# 2471| #define I915_CONTEXT_ENGINES_EXT_PARALLEL_SUBMIT 2 /* see i915_context_engines_parallel_submit */
# 2472| struct i915_engine_class_instance engines[0];
# 2473|-> } __attribute__((packed));
# 2474|
# 2475| #define I915_DEFINE_CONTEXT_PARAM_ENGINES(name__, N__) struct { \
Error: CPPCHECK_WARNING: [#def11]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def12]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c:553:18: warning[core.NullDereference]: Access to field 'block' results in a dereference of a null pointer (loaded from variable 'bo_fake')
# 551|
# 552| set_dirty(&bo_fake->bo);
# 553|-> bo_fake->block = NULL;
# 554|
# 555| free_block(bufmgr_fake, block, 0);
Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c: scope_hint: In function ‘evict_lru’
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c:553:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bo_fake’
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c:39: included_from: Included from here.
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c:1018:17: note: in expansion of macro ‘DBG’
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c:531:9: note: in expansion of macro ‘DBG’
# 551|
# 552| set_dirty(&bo_fake->bo);
# 553|-> bo_fake->block = NULL;
# 554|
# 555| free_block(bufmgr_fake, block, 0);
Error: CLANG_WARNING: [#def14]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c:576:18: warning[core.NullDereference]: Access to field 'block' results in a dereference of a null pointer (loaded from variable 'bo_fake')
# 574|
# 575| set_dirty(&bo_fake->bo);
# 576|-> bo_fake->block = NULL;
# 577|
# 578| free_block(bufmgr_fake, block, 0);
Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c: scope_hint: In function ‘evict_mru’
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c:576:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bo_fake’
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c:1018:17: note: in expansion of macro ‘DBG’
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c:531:9: note: in expansion of macro ‘DBG’
# 574|
# 575| set_dirty(&bo_fake->bo);
# 576|-> bo_fake->block = NULL;
# 577|
# 578| free_block(bufmgr_fake, block, 0);
Error: CLANG_WARNING: [#def16]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c:1362:56: warning[core.NullDereference]: Dereference of null pointer
# 1360| drm_intel_fake_bo_map_locked(bo, 1);
# 1361|
# 1362|-> *(uint32_t *) ((uint8_t *) bo->virtual + r->offset) =
# 1363| reloc_data;
# 1364|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c: scope_hint: In function ‘drm_intel_bufmgr_fake_init’
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c:1599:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bufmgr_fake’
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_fake.c:50: included_from: Included from here.
libdrm-2.4.121-build/libdrm-2.4.121/libdrm_lists.h:42:23: note: in definition of macro ‘DRMINITLISTHEAD’
# 1597| DRMINITLISTHEAD(&bufmgr_fake->lru);
# 1598|
# 1599|-> bufmgr_fake->low_offset = low_offset;
# 1600| bufmgr_fake->virtual = low_virtual;
# 1601| bufmgr_fake->size = size;
Error: CPPCHECK_WARNING: [#def18]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_gem.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def19]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_gem.c:438:8: warning[core.NullDereference]: Dereference of null pointer
# 436| bo_gem->kflags & EXEC_OBJECT_PINNED ? "*" : "",
# 437| bo_gem->name,
# 438|-> upper_32_bits(bo_gem->relocs[j].offset),
# 439| lower_32_bits(bo_gem->relocs[j].offset),
# 440| target_gem->gem_handle,
Error: CLANG_WARNING: [#def20]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_gem.c:774:3: warning[core.DivideZero]: Division by zero
# 772|
# 773| bo_gem->gem_handle = create.handle;
# 774|-> HASH_ADD(handle_hh, bufmgr_gem->handle_table,
# 775| gem_handle, sizeof(bo_gem->gem_handle),
# 776| bo_gem);
Error: CLANG_WARNING: [#def21]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_gem.c:862:3: warning[deadcode.DeadStores]: Value stored to 'aligned_y' is never read
# 860| * too so we try to be careful.
# 861| */
# 862|-> aligned_y = y;
# 863| height_alignment = 2;
# 864|
Error: CLANG_WARNING: [#def22]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_gem.c:947:2: warning[core.DivideZero]: Division by zero
# 945| bo_gem->stride = 0;
# 946|
# 947|-> HASH_ADD(handle_hh, bufmgr_gem->handle_table,
# 948| gem_handle, sizeof(bo_gem->gem_handle),
# 949| bo_gem);
Error: CLANG_WARNING: [#def23]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_gem.c:1126:2: warning[core.DivideZero]: Division by zero
# 1124| bo_gem->reusable = false;
# 1125|
# 1126|-> HASH_ADD(handle_hh, bufmgr_gem->handle_table,
# 1127| gem_handle, sizeof(bo_gem->gem_handle), bo_gem);
# 1128| HASH_ADD(name_hh, bufmgr_gem->name_table,
Error: CLANG_WARNING: [#def24]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_bufmgr_gem.c:1128:2: warning[core.DivideZero]: Division by zero
# 1126| HASH_ADD(handle_hh, bufmgr_gem->handle_table,
# 1127| gem_handle, sizeof(bo_gem->gem_handle), bo_gem);
# 1128|-> HASH_ADD(name_hh, bufmgr_gem->name_table,
# 1129| global_name, sizeof(bo_gem->global_name), bo_gem);
# 1130|
Error: CPPCHECK_WARNING: [#def25]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_decode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def26]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_decode.c:2082:5: warning[deadcode.DeadStores]: Value stored to 'dword' is never read
# 2080| dword & (1 << 0) ? " deinterlacer," :
# 2081| "");
# 2082|-> dword = data[i];
# 2083| instr_out(ctx, i++,
# 2084| "sampler %d SS4: border color\n",
Error: GCC_ANALYZER_WARNING (CWE-688): [#def27]
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_decode.c: scope_hint: In function ‘drm_intel_decode’
libdrm-2.4.121-build/libdrm-2.4.121/intel/intel_decode.c:3914:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘temp’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
# 3912| size = ctx->base_count * 4;
# 3913| temp = malloc(size + 4096);
# 3914|-> memcpy(temp, ctx->base_data, size);
# 3915| memset((char *)temp + size, 0xd0, 4096);
# 3916| ctx->data = temp;
Error: CPPCHECK_WARNING: [#def28]
libdrm-2.4.121-build/libdrm-2.4.121/intel/mm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-688): [#def29]
libdrm-2.4.121-build/libdrm-2.4.121/intel/test_decode.c: scope_hint: In function ‘compare_batch’
libdrm-2.4.121-build/libdrm-2.4.121/intel/test_decode.c:99:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ref_filename’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_sprintf’ must be non-null
# 97|
# 98| ref_filename = malloc(strlen(batch_filename) + strlen(ref_suffix) + 1);
# 99|-> sprintf(ref_filename, "%s%s", batch_filename, ref_suffix);
# 100|
# 101| /* Read the batch and reference. */
Error: CPPCHECK_WARNING: [#def30]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def31]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c: scope_hint: In function ‘abi16_chan_nv04’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c:38:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘obj’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c: scope_hint: In function ‘abi16_chan_nv04’
# 36| {
# 37| struct nouveau_drm *drm = nouveau_drm(obj);
# 38|-> struct nv04_fifo *nv04 = obj->data;
# 39| struct drm_nouveau_channel_alloc req = {
# 40| .fb_ctxdma_handle = nv04->vram,
Error: GCC_ANALYZER_WARNING (CWE-476): [#def32]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c: scope_hint: In function ‘abi16_chan_nvc0’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c:63:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘obj’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c: scope_hint: In function ‘abi16_chan_nvc0’
# 61| struct nouveau_drm *drm = nouveau_drm(obj);
# 62| struct drm_nouveau_channel_alloc req = {};
# 63|-> struct nvc0_fifo *nvc0 = obj->data;
# 64| int ret;
# 65|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def33]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c: scope_hint: In function ‘abi16_chan_nve0’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c:84:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘obj’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c: scope_hint: In function ‘abi16_chan_nve0’
# 82| struct nouveau_drm *drm = nouveau_drm(obj);
# 83| struct drm_nouveau_channel_alloc req = {};
# 84|-> struct nve0_fifo *nve0 = obj->data;
# 85| int ret;
# 86|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c: scope_hint: In function ‘abi16_engobj’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c:110:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘obj’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c: scope_hint: In function ‘abi16_engobj’
# 108| struct nouveau_drm *drm = nouveau_drm(obj);
# 109| struct drm_nouveau_grobj_alloc req = {
# 110|-> .channel = obj->parent->handle,
# 111| .handle = obj->handle,
# 112| .class = obj->oclass,
Error: GCC_ANALYZER_WARNING (CWE-476): [#def35]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c: scope_hint: In function ‘abi16_ntfy’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c:150:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘obj’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c: scope_hint: In function ‘abi16_ntfy’
# 148| {
# 149| struct nouveau_drm *drm = nouveau_drm(obj);
# 150|-> struct nv04_notify *ntfy = obj->data;
# 151| struct drm_nouveau_notifierobj_alloc req = {
# 152| .channel = obj->parent->handle,
Error: GCC_ANALYZER_WARNING (CWE-476): [#def36]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c: scope_hint: In function ‘abi16_delete’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c:221:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘obj’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/abi16.c: scope_hint: In function ‘abi16_delete’
# 219| {
# 220| struct nouveau_drm *drm = nouveau_drm(obj);
# 221|-> if (obj->oclass == NOUVEAU_FIFO_CHANNEL_CLASS) {
# 222| struct drm_nouveau_channel_free req;
# 223| req.channel = obj->handle;
Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/bufctx.c: scope_hint: In function ‘nouveau_bufctx_new’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/bufctx.c:74:24: warning[-Wanalyzer-malloc-leak]: leak of ‘priv’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/bufctx.c:32: included_from: Included from here.
libdrm-2.4.121-build/libdrm-2.4.121/libdrm_lists.h:42:23: note: in definition of macro ‘DRMINITLISTHEAD’
# 72| priv->base.client = client;
# 73| priv->nr_bins = bins;
# 74|-> *pbctx = &priv->base;
# 75| return 0;
# 76| }
Error: CPPCHECK_WARNING: [#def38]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def39]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:89:14: warning[core.UndefinedBinaryOperatorResult]: The left operand of '>=' is a garbage value
# 87| int ret = -ENOSYS;
# 88|
# 89|-> if (!(ret = nvif_unpack(ret, &data, &size, args->v0, 0, 0, true))) {
# 90| if (!obj->length) {
# 91| if (obj != &drm->client)
Error: GCC_ANALYZER_WARNING (CWE-476): [#def40]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c: scope_hint: In function ‘nouveau_object_ioctl’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:90:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘obj’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:47: included_from: Included from here.
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c: scope_hint: In function ‘nouveau_object_ioctl’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:89:21: note: in expansion of macro ‘nvif_unpack’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:89:21: note: in expansion of macro ‘nvif_unpack’
# 88|
# 89| if (!(ret = nvif_unpack(ret, &data, &size, args->v0, 0, 0, true))) {
# 90|-> if (!obj->length) {
# 91| if (obj != &drm->client)
# 92| args->v0.object = (unsigned long)(void *)obj;
Error: CLANG_WARNING: [#def41]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:394:6: warning[core.UndefinedBinaryOperatorResult]: The left operand of '>=' is a garbage value
# 392|
# 393| if (oclass != NV_DEVICE ||
# 394|-> nvif_unpack(ret, &data, &size, args->v0, 0, 0, false))
# 395| return ret;
# 396|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c: scope_hint: In function ‘nouveau_device_new’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:395:24: warning[-Wanalyzer-malloc-leak]: leak of ‘nvdev’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c: scope_hint: In function ‘nouveau_device_new’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:394:13: note: in expansion of macro ‘nvif_unpack’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:394:13: note: in expansion of macro ‘nvif_unpack’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:394:13: note: in expansion of macro ‘nvif_unpack’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:394:13: note: in expansion of macro ‘nvif_unpack’
# 393| if (oclass != NV_DEVICE ||
# 394| nvif_unpack(ret, &data, &size, args->v0, 0, 0, false))
# 395|-> return ret;
# 396|
# 397| if (!(nvdev = calloc(1, sizeof(*nvdev))))
Error: GCC_ANALYZER_WARNING (CWE-476): [#def43]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:402:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘obj’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c: scope_hint: In function ‘nouveau_device_new’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:394:13: note: in expansion of macro ‘nvif_unpack’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:394:13: note: in expansion of macro ‘nvif_unpack’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:394:13: note: in expansion of macro ‘nvif_unpack’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:394:13: note: in expansion of macro ‘nvif_unpack’
# 400| dev->fd = -1;
# 401|
# 402|-> if (drm->nvif) {
# 403| ret = nouveau_object_init(parent, 0, oclass, args, argc,
# 404| &dev->object);
Error: CLANG_WARNING: [#def44]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:575:26: warning[core.BitwiseShift]: Right operand is negative in left shift
# 573| pcli = calloc(1, sizeof(*pcli));
# 574| if (pcli) {
# 575|-> nvdev->client[i] |= (1 << id);
# 576| pcli->base.device = dev;
# 577| pcli->base.id = (i * 32) + id;
Error: GCC_ANALYZER_WARNING (CWE-476): [#def45]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c: scope_hint: In function ‘nouveau_bo_new’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:646:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘nvbo’
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:36: included_from: Included from here.
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/nouveau.c:645:9: note: in expansion of macro ‘atomic_set’
# 644| return -ENOMEM;
# 645| atomic_set(&nvbo->refcnt, 1);
# 646|-> bo->device = dev;
# 647| bo->flags = flags;
# 648| bo->size = size;
Error: CPPCHECK_WARNING: [#def46]
libdrm-2.4.121-build/libdrm-2.4.121/nouveau/pushbuf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def47]
libdrm-2.4.121-build/libdrm-2.4.121/radeon/radeon_cs_gem.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def48]
libdrm-2.4.121-build/libdrm-2.4.121/radeon/radeon_cs_space.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def49]
libdrm-2.4.121-build/libdrm-2.4.121/radeon/radeon_surface.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def50]
libdrm-2.4.121-build/libdrm-2.4.121/radeon/radeon_surface.c:1771:13: warning[core.CallAndMessage]: 4th function call argument is an uninitialized value
# 1769| break;
# 1770| case RADEON_SURF_MODE_1D:
# 1771|-> r = si_surface_init_1d_miptrees(surf_man, surf, tile_mode, stencil_tile_mode);
# 1772| break;
# 1773| case RADEON_SURF_MODE_2D:
Error: CLANG_WARNING: [#def51]
libdrm-2.4.121-build/libdrm-2.4.121/radeon/radeon_surface.c:1774:13: warning[core.CallAndMessage]: 4th function call argument is an uninitialized value
# 1772| break;
# 1773| case RADEON_SURF_MODE_2D:
# 1774|-> r = si_surface_init_2d_miptrees(surf_man, surf, tile_mode, stencil_tile_mode);
# 1775| break;
# 1776| default:
Error: CLANG_WARNING: [#def52]
libdrm-2.4.121-build/libdrm-2.4.121/radeon/radeon_surface.c:2376:13: warning[core.CallAndMessage]: 4th function call argument is an uninitialized value
# 2374| break;
# 2375| case RADEON_SURF_MODE_1D:
# 2376|-> r = si_surface_init_1d_miptrees(surf_man, surf, tile_mode, stencil_tile_mode);
# 2377| break;
# 2378| case RADEON_SURF_MODE_2D:
Error: CLANG_WARNING: [#def53]
libdrm-2.4.121-build/libdrm-2.4.121/radeon/radeon_surface.c:2379:13: warning[core.CallAndMessage]: 4th function call argument is an uninitialized value
# 2377| break;
# 2378| case RADEON_SURF_MODE_2D:
# 2379|-> r = cik_surface_init_2d_miptrees(surf_man, surf, tile_mode, stencil_tile_mode);
# 2380| break;
# 2381| default:
Error: CPPCHECK_WARNING: [#def54]
libdrm-2.4.121-build/libdrm-2.4.121/tests/amdgpu/amdgpu_stress.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def55]
libdrm-2.4.121-build/libdrm-2.4.121/tests/drmdevice.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def56]
libdrm-2.4.121-build/libdrm-2.4.121/tests/drmsl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def57]
libdrm-2.4.121-build/libdrm-2.4.121/tests/modeprint/modeprint.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def58]
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def59]
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c: scope_hint: In function ‘free_resources.part.0’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:583:56: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘*res.planes + (long unsigned int)i * 24’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:590:9: note: in expansion of macro ‘free_properties’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:656:9: note: in expansion of macro ‘get_resource’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:657:9: note: in expansion of macro ‘get_resource’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:658:9: note: in expansion of macro ‘get_resource’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:658:9: note: in expansion of macro ‘get_resource’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:659:9: note: in expansion of macro ‘get_resource’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:701:9: note: in expansion of macro ‘get_properties’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:702:9: note: in expansion of macro ‘get_properties’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:702:9: note: in expansion of macro ‘get_properties’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:702:9: note: in expansion of macro ‘get_properties’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:702:9: note: in expansion of macro ‘get_properties’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:702:9: note: in expansion of macro ‘get_properties’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c: scope_hint: In function ‘free_resources.part.0’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:590:9: note: in expansion of macro ‘free_properties’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:590:9: note: in expansion of macro ‘free_properties’
# 581| for (i = 0; i < (int)(_res)->count_##type##s; ++i) { \
# 582| unsigned int j; \
# 583|-> for (j = 0; j < res->type##s[i].props->count_props; ++j)\
# 584| drmModeFreeProperty(res->type##s[i].props_info[j]);\
# 585| free(res->type##s[i].props_info); \
Error: GCC_ANALYZER_WARNING (CWE-476): [#def60]
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c: scope_hint: In function ‘pipe_find_crtc_and_mode’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:984:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘*pipe.crtc’
# 982| } else {
# 983| pipe->crtc = pipe_find_crtc(dev, pipe);
# 984|-> pipe->crtc_id = pipe->crtc->crtc->crtc_id;
# 985| }
# 986|
Error: GCC_ANALYZER_WARNING (CWE-457): [#def61]
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c: scope_hint: In function ‘set_property’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:1060:23: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*p.optional’
# 1058|
# 1059| if (i == (int)props->count_props) {
# 1060|-> if (!p->optional)
# 1061| fprintf(stderr, "%s %i has no %s property\n",
# 1062| obj_type, p->obj_id, p->name);
Error: GCC_ANALYZER_WARNING (CWE-457): [#def62]
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c: scope_hint: In function ‘set_plane’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:1348:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ovr’
# 1346| }
# 1347|
# 1348|-> ovr->crtc_id = p->crtc_id;
# 1349|
# 1350| return 0;
Error: GCC_ANALYZER_WARNING (CWE-476): [#def63]
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c: scope_hint: In function ‘writeback_config’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:1741:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1739| for (i = 0; i < pipe->num_cons; i++) {
# 1740| connector = get_connector_by_id(dev, pipe->con_ids[i]);
# 1741|-> if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK) {
# 1742| if (!pipe->mode) {
# 1743| fprintf(stderr, "no mode for writeback\n");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def64]
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c: scope_hint: In function ‘dump_output_fb’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:1794:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1792| for (i = 0; i < pipe->num_cons; i++) {
# 1793| connector = get_connector_by_id(dev, pipe->con_ids[i]);
# 1794|-> if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
# 1795| bo_dump(pipe->out_bo, dump_path);
# 1796| }
Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c: scope_hint: In function ‘parse_connector’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:2027:29: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
# 2025| len = min(sizeof pipe->mode_str - 1, (unsigned int)(p - arg));
# 2026| strncpy(pipe->mode_str, arg, len);
# 2027|-> pipe->mode_str[len] = '\0';
# 2028|
# 2029| if (*p == '-') {
Error: CPPCHECK_WARNING (CWE-401): [#def66]
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:2248: error[memleakOnRealloc]: Common realloc mistake: 'plane_args' nulled but not freed upon failure
# 2246| break;
# 2247| case 'P':
# 2248|-> plane_args = realloc(plane_args,
# 2249| (plane_count + 1) * sizeof *plane_args);
# 2250| if (plane_args == NULL) {
Error: GCC_ANALYZER_WARNING (CWE-415): [#def67]
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c: scope_hint: In function ‘main’
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:2248:38: warning[-Wanalyzer-double-free]: double-‘free’ of ‘plane_args’
# 2246| break;
# 2247| case 'P':
# 2248|-> plane_args = realloc(plane_args,
# 2249| (plane_count + 1) * sizeof *plane_args);
# 2250| if (plane_args == NULL) {
Error: CPPCHECK_WARNING (CWE-401): [#def68]
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:2266: error[memleakOnRealloc]: Common realloc mistake: 'pipe_args' nulled but not freed upon failure
# 2264| break;
# 2265| case 's':
# 2266|-> pipe_args = realloc(pipe_args,
# 2267| (count + 1) * sizeof *pipe_args);
# 2268| if (pipe_args == NULL) {
Error: CPPCHECK_WARNING (CWE-401): [#def69]
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:2289: error[memleakOnRealloc]: Common realloc mistake: 'prop_args' nulled but not freed upon failure
# 2287| break;
# 2288| case 'w':
# 2289|-> prop_args = realloc(prop_args,
# 2290| (prop_count + 1) * sizeof *prop_args);
# 2291| if (prop_args == NULL) {
Error: GCC_ANALYZER_WARNING (CWE-415): [#def70]
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:2289:37: warning[-Wanalyzer-double-free]: double-‘free’ of ‘prop_args’
# 2287| break;
# 2288| case 'w':
# 2289|-> prop_args = realloc(prop_args,
# 2290| (prop_count + 1) * sizeof *prop_args);
# 2291| if (prop_args == NULL) {
Error: CLANG_WARNING: [#def71]
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:2292:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'pipe_args'
# 2290| (prop_count + 1) * sizeof *prop_args);
# 2291| if (prop_args == NULL) {
# 2292|-> fprintf(stderr, "memory allocation failed\n");
# 2293| return 1;
# 2294| }
Error: CLANG_WARNING: [#def72]
libdrm-2.4.121-build/libdrm-2.4.121/tests/modetest/modetest.c:2292:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'plane_args'
# 2290| (prop_count + 1) * sizeof *prop_args);
# 2291| if (prop_args == NULL) {
# 2292|-> fprintf(stderr, "memory allocation failed\n");
# 2293| return 1;
# 2294| }
Error: CPPCHECK_WARNING: [#def73]
libdrm-2.4.121-build/libdrm-2.4.121/tests/nouveau/threaded.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def74]
libdrm-2.4.121-build/libdrm-2.4.121/tests/nouveau/threaded.c:126:8: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
# 124| return 1;
# 125|
# 126|-> err = nouveau_bo_new(nvdev2, NOUVEAU_BO_GART, 0, 4096, NULL, &bo);
# 127| if (!err)
# 128| err = nouveau_bo_set_prime(bo, &import_fd);
Error: GCC_ANALYZER_WARNING (CWE-457): [#def75]
libdrm-2.4.121-build/libdrm-2.4.121/tests/nouveau/threaded.c: scope_hint: In function ‘main’
libdrm-2.4.121-build/libdrm-2.4.121/tests/nouveau/threaded.c:126:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘nvdev2’
# 124| return 1;
# 125|
# 126|-> err = nouveau_bo_new(nvdev2, NOUVEAU_BO_GART, 0, 4096, NULL, &bo);
# 127| if (!err)
# 128| err = nouveau_bo_set_prime(bo, &import_fd);
Error: CLANG_WARNING: [#def76]
libdrm-2.4.121-build/libdrm-2.4.121/tests/nouveau/threaded.c:135:2: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
# 133| }
# 134|
# 135|-> pthread_join(t1, NULL);
# 136| pthread_join(t2, NULL);
# 137|
Error: CPPCHECK_WARNING: [#def77]
libdrm-2.4.121-build/libdrm-2.4.121/tests/proptest/proptest.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def78]
libdrm-2.4.121-build/libdrm-2.4.121/tests/proptest/proptest.c:185:18: warning[core.NullDereference]: Access to field 'count_connectors' results in a dereference of a null pointer (loaded from variable 'res')
# 183| drmModeConnectorPtr c;
# 184|
# 185|-> for (i = 0; i < res->count_connectors; i++) {
# 186| c = drmModeGetConnector(fd, res->connectors[i]);
# 187|
Error: CLANG_WARNING: [#def79]
libdrm-2.4.121-build/libdrm-2.4.121/tests/proptest/proptest.c:190:5: warning[core.NullDereference]: Access to field 'connectors' results in a dereference of a null pointer (loaded from variable 'res')
# 188| if (!c) {
# 189| fprintf(stderr, "Could not get connector %u: %s\n",
# 190|-> res->connectors[i], strerror(errno));
# 191| continue;
# 192| }
Error: CLANG_WARNING: [#def80]
libdrm-2.4.121-build/libdrm-2.4.121/tests/proptest/proptest.c:210:18: warning[core.NullDereference]: Access to field 'count_crtcs' results in a dereference of a null pointer (loaded from variable 'res')
# 208| drmModeCrtcPtr c;
# 209|
# 210|-> for (i = 0; i < res->count_crtcs; i++) {
# 211| c = drmModeGetCrtc(fd, res->crtcs[i]);
# 212|
Error: CLANG_WARNING: [#def81]
libdrm-2.4.121-build/libdrm-2.4.121/tests/proptest/proptest.c:215:5: warning[core.NullDereference]: Access to field 'crtcs' results in a dereference of a null pointer (loaded from variable 'res')
# 213| if (!c) {
# 214| fprintf(stderr, "Could not get crtc %u: %s\n",
# 215|-> res->crtcs[i], strerror(errno));
# 216| continue;
# 217| }
Error: GCC_ANALYZER_WARNING (CWE-688): [#def82]
libdrm-2.4.121-build/libdrm-2.4.121/tests/radeon/rbo.c: scope_hint: In function ‘rbo’
libdrm-2.4.121-build/libdrm-2.4.121/tests/radeon/rbo.c:88:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
# 86| return rbo_decref(bo);
# 87| }
# 88|-> memcpy(bo->data, ptr, size);
# 89| rbo_unmap(bo);
# 90| }
Error: CLANG_WARNING: [#def83]
libdrm-2.4.121-build/libdrm-2.4.121/tests/radeon/rbo.c:88:9: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 86| return rbo_decref(bo);
# 87| }
# 88|-> memcpy(bo->data, ptr, size);
# 89| rbo_unmap(bo);
# 90| }
Error: CPPCHECK_WARNING: [#def84]
libdrm-2.4.121-build/libdrm-2.4.121/tests/util/pattern.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def85]
libdrm-2.4.121-build/libdrm-2.4.121/tests/util/pattern.c: scope_hint: In function ‘fsd_alloc’
libdrm-2.4.121-build/libdrm-2.4.121/tests/util/pattern.c:877:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘fsd’
# 875| struct fsd *fsd = malloc(sizeof(*fsd) + n * sizeof(fsd->error[0]));
# 876|
# 877|-> fsd->width = width;
# 878| fsd->x = 0;
# 879| fsd->i = 0;
Error: CPPCHECK_WARNING: [#def86]
libdrm-2.4.121-build/libdrm-2.4.121/tests/vbltest/vbltest.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def87]
libdrm-2.4.121-build/libdrm-2.4.121/xf86drm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: COMPILER_WARNING (CWE-252): [#def88]
libdrm-2.4.121-build/libdrm-2.4.121/xf86drm.c: scope_hint: In function ‘drmGetFormatModifierNameFromNvidia’
libdrm-2.4.121-build/libdrm-2.4.121/xf86drm.c:363:9: warning[-Wunused-result]: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’
# 363 | asprintf(&mod_nvidia, "BLOCK_LINEAR_2D,HEIGHT=%"PRIu64",KIND=%"PRIu64","
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 364 | "GEN=%"PRIu64",SECTOR=%"PRIu64",COMPRESSION=%"PRIu64"", height,
# | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 365 | kind, gen, sector, compression);
# | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 361| if ((modifier & 0x10) == 0x10) {
# 362| char *mod_nvidia;
# 363|-> asprintf(&mod_nvidia, "BLOCK_LINEAR_2D,HEIGHT=%"PRIu64",KIND=%"PRIu64","
# 364| "GEN=%"PRIu64",SECTOR=%"PRIu64",COMPRESSION=%"PRIu64"", height,
# 365| kind, gen, sector, compression);
Error: COMPILER_WARNING (CWE-252): [#def89]
libdrm-2.4.121-build/libdrm-2.4.121/xf86drm.c: scope_hint: In function ‘drmGetFormatModifierNameFromAmlogic’
libdrm-2.4.121-build/libdrm-2.4.121/xf86drm.c:556:5: warning[-Wunused-result]: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’
# 556 | asprintf(&mod_amlogic, "FBC,LAYOUT=%s,OPTIONS=%s", layout_str, opts_str);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 554| opts_str = "0";
# 555|
# 556|-> asprintf(&mod_amlogic, "FBC,LAYOUT=%s,OPTIONS=%s", layout_str, opts_str);
# 557| return mod_amlogic;
# 558| }
Error: COMPILER_WARNING (CWE-252): [#def90]
libdrm-2.4.121-build/libdrm-2.4.121/xf86drm.c: scope_hint: In function ‘drmGetFormatModifierNameFromVivante’
libdrm-2.4.121-build/libdrm-2.4.121/xf86drm.c:620:5: warning[-Wunused-result]: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’
# 620 | asprintf(&mod_vivante, "%s%s%s", color_tiling, tile_status, compression);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 618| }
# 619|
# 620|-> asprintf(&mod_vivante, "%s%s%s", color_tiling, tile_status, compression);
# 621| return mod_vivante;
# 622| }
Error: CLANG_WARNING: [#def91]
libdrm-2.4.121-build/libdrm-2.4.121/xf86drm.c:874:9: warning[deadcode.DeadStores]: Value stored to 'devmode' is never read
# 872| drm_server_info->get_perms(&serv_group, &serv_mode);
# 873| devmode = serv_mode ? serv_mode : DRM_DEV_MODE;
# 874|-> devmode &= ~(S_IXUSR|S_IXGRP|S_IXOTH);
# 875| }
# 876|
Error: CLANG_WARNING: [#def92]
libdrm-2.4.121-build/libdrm-2.4.121/xf86drm.c:4499:51: warning[core.NullDereference]: Access to field 'available_nodes' results in a dereference of a null pointer
# 4497| for (j = i + 1; j < count; j++) {
# 4498| if (drmDevicesEqual(local_devices[i], local_devices[j])) {
# 4499|-> local_devices[i]->available_nodes |= local_devices[j]->available_nodes;
# 4500| node_type = log2_int(local_devices[j]->available_nodes);
# 4501| memcpy(local_devices[i]->nodes[node_type],
Error: CLANG_WARNING: [#def93]
libdrm-2.4.121-build/libdrm-2.4.121/xf86drm.c:4499:54: warning[core.NullDereference]: Access to field 'available_nodes' results in a dereference of a null pointer
# 4497| for (j = i + 1; j < count; j++) {
# 4498| if (drmDevicesEqual(local_devices[i], local_devices[j])) {
# 4499|-> local_devices[i]->available_nodes |= local_devices[j]->available_nodes;
# 4500| node_type = log2_int(local_devices[j]->available_nodes);
# 4501| memcpy(local_devices[i]->nodes[node_type],
Error: CPPCHECK_WARNING: [#def94]
libdrm-2.4.121-build/libdrm-2.4.121/xf86drmMode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def95]
libdrm-2.4.121-build/libdrm-2.4.121/xf86drmMode.c:1543:2: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 1541|
# 1542| /* Sort the list by object ID, then by property ID. */
# 1543|-> qsort(sorted->items, sorted->cursor, sizeof(*sorted->items),
# 1544| sort_req_list);
# 1545|
Error: GCC_ANALYZER_WARNING (CWE-688): [#def96]
libdrm-2.4.121-build/libdrm-2.4.121/xf86drmMode.c: scope_hint: In function ‘drmModeAtomicCommit’
libdrm-2.4.121-build/libdrm-2.4.121/xf86drmMode.c:1543:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libdrm-2.4.121-build/libdrm-2.4.121/xf86drmMode.c:1540:9: note: in expansion of macro ‘memclear’
libdrm-2.4.121-build/libdrm-2.4.121/xf86drmMode.c:39: included_from: Included from here.
/usr/include/stdlib.h:970:13: note: argument 1 of ‘qsort’ must be non-null
# 1541|
# 1542| /* Sort the list by object ID, then by property ID. */
# 1543|-> qsort(sorted->items, sorted->cursor, sizeof(*sorted->items),
# 1544| sort_req_list);
# 1545|
Error: CPPCHECK_WARNING: [#def97]
libdrm-2.4.121-build/libdrm-2.4.121/xf86drmSL.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Scan Properties
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-66.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | libdrm-2.4.121-1.fc41 |
store-results-to | /tmp/tmpvy2ts9nb/libdrm-2.4.121-1.fc41.tar.xz |
time-created | 2024-07-03 14:41:02 |
time-finished | 2024-07-03 14:42:42 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpvy2ts9nb/libdrm-2.4.121-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpvy2ts9nb/libdrm-2.4.121-1.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |