Fixed defects

List of Defects

Error: CLANG_WARNING: [#def1]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c:3: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/Python.h:74: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/listobject.h:46: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/cpython/listobject.h:47:26: warning[core.NullDereference]: Array access (via field 'ob_item') results in a null pointer dereference
#   45|       assert(0 <= index);
#   46|       assert(index < list->allocated);
#   47|->     list->ob_item[index] = value;
#   48|   }
#   49|   #define PyList_SET_ITEM(op, index, value) \

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/object.h:1183: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/Python.h:58: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/import.c:3: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/import.c: scope_hint: In function ‘remove_importlib_frames’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/cpython/object.h:350:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘_tmp_dst_ptr’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/import.c:2543:13: note: in expansion of macro ‘Py_XSETREF’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/unicodeobject.h:107:5: note: in expansion of macro ‘PyType_FastSubclass’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/import.c:2803:10: note: in expansion of macro ‘PyUnicode_Check’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/import.c:2916:5: note: in expansion of macro ‘Py_XDECREF’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/import.c:2916:5: note: in expansion of macro ‘Py_XDECREF’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/import.c:2917:5: note: in expansion of macro ‘Py_XDECREF’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/import.c:2917:5: note: in expansion of macro ‘Py_XDECREF’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/import.c:2918:5: note: in expansion of macro ‘Py_XDECREF’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/import.c:2918:5: note: in expansion of macro ‘Py_XDECREF’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/Python.h:19: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/traceback.h:14:30: note: in expansion of macro ‘Py_IS_TYPE’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/import.c:2525:16: note: in expansion of macro ‘PyTraceBack_Check’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/traceback.h:14:30: note: in expansion of macro ‘Py_IS_TYPE’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/import.c:2525:16: note: in expansion of macro ‘PyTraceBack_Check’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/import.c:2543:13: note: in expansion of macro ‘Py_XSETREF’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/import.c:2543:13: note: in expansion of macro ‘Py_XSETREF’
#  348|       do { \
#  349|           _Py_TYPEOF(dst)* _tmp_dst_ptr = &(dst); \
#  350|->         _Py_TYPEOF(dst) _tmp_old_dst = (*_tmp_dst_ptr); \
#  351|           *_tmp_dst_ptr = (src); \
#  352|           Py_XDECREF(_tmp_old_dst); \

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/object.h:347:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘kwnames’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/getargs.c: scope_hint: In function ‘find_keyword’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/tupleobject.h:39: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/Python.h:73: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/cpython/tupleobject.h:27:66: note: in definition of macro ‘PyTuple_GET_ITEM’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/getargs.c:1996:15: note: in expansion of macro ‘PyTuple_GET_SIZE’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/cpython/tupleobject.h:23:12: note: in expansion of macro ‘Py_SIZE’
#  345|       assert(ob->ob_type != &PyBool_Type);
#  346|       PyVarObject *var_ob = _PyVarObject_CAST(ob);
#  347|->     return var_ob->ob_size;
#  348|   }
#  349|   #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000

Error: GCC_ANALYZER_WARNING (CWE-457): [#def4]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/Python.h:58: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/exceptions.c:7: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/exceptions.c: scope_hint: In function ‘preallocate_memerrors’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/object.h:908:23: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘errors[i]’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/exceptions.c:3391:9: note: in expansion of macro ‘Py_DECREF’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/exceptions.c:3391:9: note: in expansion of macro ‘Py_DECREF’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/exceptions.c:3391:9: note: in expansion of macro ‘Py_DECREF’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/exceptions.c: scope_hint: In function ‘preallocate_memerrors’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/exceptions.c:3391:9: note: in expansion of macro ‘Py_DECREF’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/exceptions.c:3391:9: note: in expansion of macro ‘Py_DECREF’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/exceptions.c:3391:9: note: in expansion of macro ‘Py_DECREF’
#  906|       }
#  907|   }
#  908|-> #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op))
#  909|   
#  910|   #elif defined(Py_REF_DEBUG)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def5]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/Python.h:58: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c:3: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c: scope_hint: In function ‘list_ass_slice_lock_held’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/object.h:1034:26: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c:949:9: note: in expansion of macro ‘Py_XDECREF’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/listobject.h:26:31: note: in expansion of macro ‘Py_IS_TYPE’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c:974:27: note: in expansion of macro ‘PyList_CheckExact’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/object.h:366:12: note: in expansion of macro ‘Py_TYPE’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c: scope_hint: In function ‘list_ass_slice_lock_held’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/listobject.h:25:5: note: in expansion of macro ‘PyType_FastSubclass’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/abstract.h:731:6: note: in expansion of macro ‘PyList_Check’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c:889:13: note: in expansion of macro ‘PySequence_Fast_GET_SIZE’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/Python.h:114: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c: scope_hint: In function ‘list_ass_slice_lock_held’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c:889:13: note: in expansion of macro ‘PySequence_Fast_GET_SIZE’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/listobject.h:46: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/Python.h:74: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/abstract.h:731:24: note: in expansion of macro ‘PyList_GET_SIZE’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c:889:13: note: in expansion of macro ‘PySequence_Fast_GET_SIZE’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/cpython/listobject.h:35:12: note: in expansion of macro ‘Py_SIZE’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c: scope_hint: In function ‘list_ass_slice_lock_held’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c:890:17: note: in expansion of macro ‘PySequence_Fast_ITEMS’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c:890:17: note: in expansion of macro ‘PySequence_Fast_ITEMS’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c:894:21: note: in expansion of macro ‘Py_SIZE’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c: scope_hint: In function ‘list_ass_slice_lock_held’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/Python.h:50: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/pyport.h:19:38: note: in definition of macro ‘_Py_CAST’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/object.h:1034:37: note: in expansion of macro ‘_PyObject_CAST’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c:949:9: note: in expansion of macro ‘Py_XDECREF’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/listobject.c:949:9: note: in expansion of macro ‘Py_XDECREF’
# 1032|   }
# 1033|   #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
# 1034|-> #  define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op))
# 1035|   #endif
# 1036|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Modules/_struct.c: scope_hint: In function ‘align’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Modules/_struct.c:1405:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘e’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/Python.h:51: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/cpython/pyctype.h:27:41: note: in expansion of macro ‘Py_CHARMASK’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Modules/_struct.c:1516:13: note: in expansion of macro ‘Py_ISSPACE’
# 1403|       Py_ssize_t extra;
# 1404|   
# 1405|->     if (e->format == c) {
# 1406|           if (e->alignment && size > 0) {
# 1407|               extra = (e->alignment - 1) - (size - 1) % (e->alignment);

Error: COMPILER_WARNING: [#def7]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Modules/_xxinterpchannelsmodule.c: scope_hint: In function ‘PyInit__xxinterpchannels’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Modules/_xxinterpchannelsmodule.c:3380:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/python3.13-3.13.0_a5-build/Python-3.13.0a5/build/optimized/_xxinterpchannelsmodule.gcda’ profile count data file not found
# 3378|   {
# 3379|       return PyModuleDef_Init(&moduledef);
# 3380|-> }

Error: COMPILER_WARNING: [#def8]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Modules/_xxinterpqueuesmodule.c: scope_hint: In function ‘PyInit__xxinterpqueues’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Modules/_xxinterpqueuesmodule.c:1881:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/python3.13-3.13.0_a5-build/Python-3.13.0a5/build/optimized/_xxinterpqueuesmodule.gcda’ profile count data file not found
# 1879|   {
# 1880|       return PyModuleDef_Init(&moduledef);
# 1881|-> }

Error: COMPILER_WARNING: [#def9]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Modules/_xxsubinterpretersmodule.c: scope_hint: In function ‘PyInit__xxsubinterpreters’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Modules/_xxsubinterpretersmodule.c:1242:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/python3.13-3.13.0_a5-build/Python-3.13.0a5/build/optimized/_xxsubinterpretersmodule.gcda’ profile count data file not found
# 1240|   {
# 1241|       return PyModuleDef_Init(&moduledef);
# 1242|-> }

Error: GCC_ANALYZER_WARNING (CWE-465): [#def10]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/frameobject.c: scope_hint: In function ‘PyFrame_LocalsToFast’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/frameobject.c:1456:8: warning[-Wanalyzer-deref-before-check]: check of ‘f’ for NULL after already dereferencing it
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/Python.h:19: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/frameobject.c:3: included_from: Included from here.
# 1454|   {
# 1455|       assert(!_PyFrame_IsIncomplete(f->f_frame));
# 1456|->     if (f && f->f_fast_as_locals && !frame_is_cleared(f)) {
# 1457|           _PyFrame_LocalsToFast(f->f_frame, clear);
# 1458|           f->f_fast_as_locals = 0;

Error: COMPILER_WARNING: [#def11]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/interpreteridobject.c: scope_hint: In function ‘PyInterpreterID_LookUp’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Objects/interpreteridobject.c:294:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/python3.13-3.13.0_a5-build/Python-3.13.0a5/build/optimized/interpreteridobject.gcda’ profile count data file not found
#  292|       }
#  293|       return _PyInterpreterState_LookUpID(id);
#  294|-> }

Error: GCC_ANALYZER_WARNING (CWE-126): [#def12]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c: scope_hint: In function ‘make_executor_from_uops’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:919:15: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:848:14: note: in expansion of macro ‘BIT_IS_SET’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:860:9: note: in expansion of macro ‘SET_BIT’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/Python.h:19: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:1: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:916:14: note: in expansion of macro ‘BIT_IS_SET’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:919:15: note: read of 16 bytes from after the end of ‘buffer’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:919:15: note: valid subscripts for ‘buffer’ are ‘[0]’ to ‘[2]’
#                                                    └─────────────────────────────────────────────┘
#                                                                           ^
#  917|               continue;
#  918|           }
#  919|->         *dest = buffer[i];
#  920|           int opcode = buffer[i].opcode;
#  921|           if (opcode == _POP_JUMP_IF_FALSE ||

Error: GCC_ANALYZER_WARNING (CWE-126): [#def13]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:920:31: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:848:14: note: in expansion of macro ‘BIT_IS_SET’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:860:9: note: in expansion of macro ‘SET_BIT’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:916:14: note: in expansion of macro ‘BIT_IS_SET’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:920:31: note: read of 2 bytes from after the end of ‘buffer’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:920:31: note: valid subscripts for ‘buffer’ are ‘[0]’ to ‘[2]’
#                                                    └────────────────────────────┘
#                                                                  ^
#  918|           }
#  919|           *dest = buffer[i];
#  920|->         int opcode = buffer[i].opcode;
#  921|           if (opcode == _POP_JUMP_IF_FALSE ||
#  922|               opcode == _POP_JUMP_IF_TRUE)

Error: GCC_ANALYZER_WARNING (CWE-126): [#def14]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:929:58: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:848:14: note: in expansion of macro ‘BIT_IS_SET’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:860:9: note: in expansion of macro ‘SET_BIT’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:916:14: note: in expansion of macro ‘BIT_IS_SET’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:929:58: note: read of 4 bytes from after the end of ‘buffer’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:929:58: note: valid subscripts for ‘buffer’ are ‘[0]’ to ‘[2]’
#                                                    └────────────────────────────┘
#                                                                  ^
#  927|           }
#  928|           if (_PyUop_Flags[opcode] & HAS_EXIT_FLAG) {
#  929|->             executor->exits[next_exit].target = buffer[i].target;
#  930|               dest->exit_index = next_exit;
#  931|               next_exit--;

Error: GCC_ANALYZER_WARNING (CWE-121): [#def15]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:935:25: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:848:14: note: in expansion of macro ‘BIT_IS_SET’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:860:9: note: in expansion of macro ‘SET_BIT’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:916:14: note: in expansion of macro ‘BIT_IS_SET’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:935:25: note: write of 2 bytes to beyond the end of ‘buffer’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer.c:935:25: note: valid subscripts for ‘buffer’ are ‘[0]’ to ‘[2]’
#  933|           /* Set the oparg to be the destination offset,
#  934|            * so that we can set the oparg of earlier jumps correctly. */
#  935|->         buffer[i].oparg = (uint16_t)(dest - executor->trace);
#  936|           dest--;
#  937|       }

Error: CLANG_WARNING: [#def16]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer_analysis.c:510:33: warning[core.NullDereference]: Access to field 'co_consts' results in a dereference of a null pointer (loaded from variable 'co')
#  508|               case _LOAD_CONST: {
#  509|                   assert(co != NULL);
#  510|->                 PyObject *val = PyTuple_GET_ITEM(co->co_consts, buffer[pc].oparg);
#  511|                   buffer[pc].opcode = _Py_IsImmortal(val) ? _LOAD_CONST_INLINE_BORROW : _LOAD_CONST_INLINE;
#  512|                   buffer[pc].operand = (uintptr_t)val;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/Python.h:50: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer_analysis.c:12: included_from: Included from here.
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer_analysis.c: scope_hint: In function ‘peephole_opt’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer_analysis.c:510:52: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘co’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/pyport.h:19:38: note: in definition of macro ‘_Py_CAST’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/cpython/tupleobject.h:27:38: note: in expansion of macro ‘_PyTuple_CAST’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer_analysis.c:510:33: note: in expansion of macro ‘PyTuple_GET_ITEM’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/pyport.h:19:38: note: in definition of macro ‘_Py_CAST’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Include/cpython/tupleobject.h:27:38: note: in expansion of macro ‘_PyTuple_CAST’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/optimizer_analysis.c:510:33: note: in expansion of macro ‘PyTuple_GET_ITEM’
#  508|               case _LOAD_CONST: {
#  509|                   assert(co != NULL);
#  510|->                 PyObject *val = PyTuple_GET_ITEM(co->co_consts, buffer[pc].oparg);
#  511|                   buffer[pc].opcode = _Py_IsImmortal(val) ? _LOAD_CONST_INLINE_BORROW : _LOAD_CONST_INLINE;
#  512|                   buffer[pc].operand = (uintptr_t)val;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def18]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/pylifecycle.c: scope_hint: In function ‘pyinit_config’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/pylifecycle.c:903:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘tstate’
#  901|           return status;
#  902|       }
#  903|->     *tstate_p = tstate;
#  904|   
#  905|       status = pycore_interp_init(tstate);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def19]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/pylifecycle.c: scope_hint: In function ‘Py_InitializeFromConfig.part.0’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/pylifecycle.c:1360:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tstate’
# 1358|           return status;
# 1359|       }
# 1360|->     config = _PyInterpreterState_GetConfig(tstate->interp);
# 1361|   
# 1362|       if (config->_init_main) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def20]
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/pystate.c: scope_hint: In function ‘bind_tstate’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/pystate.c:258:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tstate’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/pystate.c: scope_hint: In function ‘bind_tstate’
python3.13-3.13.0_a5-build/Python-3.13.0a5/Python/pystate.c: scope_hint: In function ‘bind_tstate’
#  256|       // in thread-local storage (e.g. per-interpreter).
#  257|   
#  258|->     tstate->thread_id = PyThread_get_thread_ident();
#  259|   #ifdef PY_HAVE_THREAD_NATIVE_ID
#  260|       tstate->native_thread_id = PyThread_get_thread_native_id();

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-36.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namepython3.13-3.13.0~b3-2.fc41
diffbase-store-results-to/tmp/tmpsb2mm_cw/python3.13-3.13.0~b3-2.fc41.tar.xz
diffbase-time-created2024-07-03 18:50:06
diffbase-time-finished2024-07-03 20:14:41
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpsb2mm_cw/python3.13-3.13.0~b3-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpsb2mm_cw/python3.13-3.13.0~b3-2.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-36.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namepython3.13-3.13.0~a5-2.fc40
store-results-to/tmp/tmp9fn_e49n/python3.13-3.13.0~a5-2.fc40.tar.xz
time-created2024-07-03 17:31:49
time-finished2024-07-03 18:49:44
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp9fn_e49n/python3.13-3.13.0~a5-2.fc40.tar.xz' '--gcc-analyze' '/tmp/tmp9fn_e49n/python3.13-3.13.0~a5-2.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9