babeltrace-1.5.11-8.fc41

List of Defects

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c: scope_hint: In function ‘SWIG_MangledTypeQueryModule’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:621:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘iter’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:3253:12: note: in expansion of macro ‘SWIG_TypeQuery’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:3253:12: note: in expansion of macro ‘SWIG_TypeQuery’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:2970:37: note: in expansion of macro ‘SWIG_GetModule’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:2970:37: note: in expansion of macro ‘SWIG_GetModule’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:2970:37: note: in expansion of macro ‘SWIG_GetModule’
#  619|     swig_module_info *iter = start;
#  620|     do {
#  621|->     if (iter->size) {
#  622|         size_t l = 0;
#  623|         size_t r = iter->size - 1;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def2]
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1143:57: warning[-Wanalyzer-out-of-bounds]: buffer over-read
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8799:15: note: in expansion of macro ‘SWIG_InternalNewPointerObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8881:1: note: in expansion of macro ‘SWIG_init’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8621:17: note: in expansion of macro ‘SWIG_GetModule’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8621:17: note: in expansion of macro ‘SWIG_GetModule’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:9000:3: note: in expansion of macro ‘SWIG_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:15: note: in expansion of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1607:3: note: in expansion of macro ‘Py_INCREF’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c: scope_hint: In function ‘SWIG_Python_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:15: note: in expansion of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8810:9: note: in expansion of macro ‘Py_DECREF’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c: scope_hint: In function ‘SWIG_Python_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8799:15: note: in expansion of macro ‘SWIG_InternalNewPointerObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1143:57: note: read of 8 bytes from after the end of ‘swig_const_table’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8799:15: note: in expansion of macro ‘SWIG_InternalNewPointerObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1143:57: note: valid subscripts for ‘swig_const_table’ are ‘[0]’ to ‘[0]’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8799:15: note: in expansion of macro ‘SWIG_InternalNewPointerObj’
#                                                            └──────────────────────────┘
#                                                                         ^
# 1141|   #endif
# 1142|   
# 1143|-> #define SWIG_InternalNewPointerObj(ptr, type, flags)	SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
# 1144|   
# 1145|   #define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 

Error: GCC_ANALYZER_WARNING (CWE-126): [#def3]
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1151:57: warning[-Wanalyzer-out-of-bounds]: buffer over-read
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:15: note: in expansion of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8881:1: note: in expansion of macro ‘SWIG_init’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8621:17: note: in expansion of macro ‘SWIG_GetModule’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8621:17: note: in expansion of macro ‘SWIG_GetModule’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:9000:3: note: in expansion of macro ‘SWIG_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:15: note: in expansion of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1607:3: note: in expansion of macro ‘Py_INCREF’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c: scope_hint: In function ‘SWIG_Python_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:15: note: in expansion of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8810:9: note: in expansion of macro ‘Py_DECREF’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c: scope_hint: In function ‘SWIG_Python_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:15: note: in expansion of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1151:57: note: read of 8 bytes from after the end of ‘swig_const_table’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:15: note: in expansion of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1151:57: note: valid subscripts for ‘swig_const_table’ are ‘[0]’ to ‘[0]’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:15: note: in expansion of macro ‘SWIG_NewPackedObj’
#                                                            └──────────────────────────┘
#                                                                         ^
# 1149|   /* for raw packed data */
# 1150|   #define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
# 1151|-> #define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
# 1152|   
# 1153|   /* for class or struct pointers */

Error: GCC_ANALYZER_WARNING (CWE-126): [#def4]
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c: scope_hint: In function ‘SWIG_Python_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8796:29: warning[-Wanalyzer-out-of-bounds]: buffer over-read
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8881:1: note: in expansion of macro ‘SWIG_init’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8621:17: note: in expansion of macro ‘SWIG_GetModule’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8621:17: note: in expansion of macro ‘SWIG_GetModule’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:9000:3: note: in expansion of macro ‘SWIG_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:15: note: in expansion of macro ‘SWIG_NewPackedObj’
/usr/include/python3.13/Python.h:68: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:198: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1607:3: note: in expansion of macro ‘Py_INCREF’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c: scope_hint: In function ‘SWIG_Python_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:15: note: in expansion of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8810:9: note: in expansion of macro ‘Py_DECREF’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c: scope_hint: In function ‘SWIG_Python_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8796:29: note: read of 4 bytes from after the end of ‘swig_const_table’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8796:29: note: valid subscripts for ‘swig_const_table’ are ‘[0]’ to ‘[0]’
#                                                          └───────────────────────┘
#                                                                      ^
# 8794|       PyObject *obj = 0;
# 8795|       size_t i;
# 8796|->     for (i = 0; constants[i].type; ++i) {
# 8797|         switch(constants[i].type) {
# 8798|         case SWIG_PY_POINTER:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def5]
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8799:78: warning[-Wanalyzer-out-of-bounds]: buffer over-read
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1143:94: note: in definition of macro ‘SWIG_InternalNewPointerObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8881:1: note: in expansion of macro ‘SWIG_init’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8621:17: note: in expansion of macro ‘SWIG_GetModule’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8621:17: note: in expansion of macro ‘SWIG_GetModule’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:9000:3: note: in expansion of macro ‘SWIG_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:15: note: in expansion of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1607:3: note: in expansion of macro ‘Py_INCREF’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c: scope_hint: In function ‘SWIG_Python_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:15: note: in expansion of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8810:9: note: in expansion of macro ‘Py_DECREF’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c: scope_hint: In function ‘SWIG_Python_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1143:94: note: in definition of macro ‘SWIG_InternalNewPointerObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8799:78: note: read of 8 bytes from after the end of ‘swig_const_table’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1143:94: note: in definition of macro ‘SWIG_InternalNewPointerObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8799:78: note: valid subscripts for ‘swig_const_table’ are ‘[0]’ to ‘[0]’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1143:94: note: in definition of macro ‘SWIG_InternalNewPointerObj’
#                                                            └─────────────────────────────────────────────┘
#                                                                                   ^
# 8797|         switch(constants[i].type) {
# 8798|         case SWIG_PY_POINTER:
# 8799|->         obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
# 8800|           break;
# 8801|         case SWIG_PY_BINARY:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def6]
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:66: warning[-Wanalyzer-out-of-bounds]: buffer over-read
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1151:87: note: in definition of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8881:1: note: in expansion of macro ‘SWIG_init’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8621:17: note: in expansion of macro ‘SWIG_GetModule’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8621:17: note: in expansion of macro ‘SWIG_GetModule’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:9000:3: note: in expansion of macro ‘SWIG_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:15: note: in expansion of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1607:3: note: in expansion of macro ‘Py_INCREF’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c: scope_hint: In function ‘SWIG_Python_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:15: note: in expansion of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8810:9: note: in expansion of macro ‘Py_DECREF’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c: scope_hint: In function ‘SWIG_Python_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1151:87: note: in definition of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:66: note: read of 8 bytes from after the end of ‘swig_const_table’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1151:87: note: in definition of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:66: note: valid subscripts for ‘swig_const_table’ are ‘[0]’ to ‘[0]’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1151:87: note: in definition of macro ‘SWIG_NewPackedObj’
#                                                            └────────────────────────────┘
#                                                                          ^
# 8800|           break;
# 8801|         case SWIG_PY_BINARY:
# 8802|->         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
# 8803|           break;
# 8804|         default:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def7]
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:89: warning[-Wanalyzer-out-of-bounds]: buffer over-read
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1151:91: note: in definition of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8881:1: note: in expansion of macro ‘SWIG_init’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8621:17: note: in expansion of macro ‘SWIG_GetModule’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8621:17: note: in expansion of macro ‘SWIG_GetModule’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:9000:3: note: in expansion of macro ‘SWIG_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:15: note: in expansion of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1607:3: note: in expansion of macro ‘Py_INCREF’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c: scope_hint: In function ‘SWIG_Python_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:15: note: in expansion of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8810:9: note: in expansion of macro ‘Py_DECREF’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c: scope_hint: In function ‘SWIG_Python_InstallConstants’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1151:91: note: in definition of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:89: note: read of 8 bytes from after the end of ‘swig_const_table’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1151:91: note: in definition of macro ‘SWIG_NewPackedObj’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:8802:89: note: valid subscripts for ‘swig_const_table’ are ‘[0]’ to ‘[0]’
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:1151:91: note: in definition of macro ‘SWIG_NewPackedObj’
#                                                            └─────────────────────────────────────────────┘
#                                                                                   ^
# 8800|           break;
# 8801|         case SWIG_PY_BINARY:
# 8802|->         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
# 8803|           break;
# 8804|         default:

Error: CLANG_WARNING: [#def8]
babeltrace-1.5.11-build/babeltrace-1.5.11/converter/babeltrace.c:576:19: warning[core.NullDereference]: Access to field 'len' results in a dereference of a null pointer (loaded from variable 'traversed_paths')
#  574|   		int i;
#  575|   
#  576|-> 		for (i = 0; i < traversed_paths->len; i++) {
#  577|   			GString *trace_path = g_ptr_array_index(traversed_paths,
#  578|   								i);

Error: CLANG_WARNING: [#def9]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ctf.c:1393:4: warning[deadcode.DeadStores]: Value stored to 'ret' is never read
# 1391|   		toread -= readlen;
# 1392|   		if (!toread) {
# 1393|-> 			ret = 0;	/* continue reading next packet */
# 1394|   			goto read_padding;
# 1395|   		}

Error: CLANG_WARNING: [#def10]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ctf.c:1434:4: warning[deadcode.DeadStores]: Value stored to 'ret' is never read
# 1432|   		}
# 1433|   		if (feof(in)) {
# 1434|-> 			ret = 0;
# 1435|   			break;
# 1436|   		}

Error: CLANG_WARNING: [#def11]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ctf.c:1574:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'metadata_stream'
# 1572|   	if (ret)
# 1573|   		g_free(metadata_stream);
# 1574|-> 	return ret;
# 1575|   }
# 1576|   

Error: CLANG_WARNING: [#def12]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ctf.c:1614:2: warning[unix.Malloc]: Potential leak of memory pointed to by 'stream_event'
# 1612|   	if (stream_event->event_context)
# 1613|   		bt_definition_unref(&stream_event->event_context->p);
# 1614|-> 	fprintf(stderr, "[error] Unable to create event definition for event \"%s\".\n",
# 1615|   		g_quark_to_string(event->name));
# 1616|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def13]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ctf.c:2356:54: warning[-Wanalyzer-fd-leak]: leak of file descriptor
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ctf.c: scope_hint: In function 'ctf_open_trace_read'
# 2354|   	}
# 2355|   	strncpy(td->parent.path, path, sizeof(td->parent.path));
# 2356|-> 	td->parent.path[sizeof(td->parent.path) - 1] = '\0';
# 2357|   
# 2358|   	/*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ctf.c:2356:54: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ctf.c: scope_hint: In function 'ctf_open_trace_read'
# 2354|   	}
# 2355|   	strncpy(td->parent.path, path, sizeof(td->parent.path));
# 2356|-> 	td->parent.path[sizeof(td->parent.path) - 1] = '\0';
# 2357|   
# 2358|   	/*

Error: COMPILER_WARNING (CWE-477): [#def15]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ctf.c: scope_hint: In function 'ctf_open_trace_read'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ctf.c:2391:17: warning[-Wdeprecated-declarations]: 'readdir_r' is deprecated
# 2391 |                 ret = readdir_r(td->dir, dirent, &diriter);
#      |                 ^~~
/usr/include/glib-2.0/glib/gdir.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib.h:47: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/context-internal.h:34: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/format-internal.h:33: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ctf.c:30: included_from: Included from here.
/usr/include/dirent.h:185:12: note: declared here
#  185 | extern int readdir_r (DIR *__restrict __dirp,
#      |            ^~~~~~~~~
# 2389|   
# 2390|   	for (;;) {
# 2391|-> 		ret = readdir_r(td->dir, dirent, &diriter);
# 2392|   		if (ret) {
# 2393|   			fprintf(stderr, "[error] Readdir error.\n");

Error: GCC_ANALYZER_WARNING (CWE-688): [#def16]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ctf.c:2391:23: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'dirent' where non-null expected
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ctf.c: scope_hint: In function 'ctf_open_trace_read'
/usr/include/dirent.h:185:12: note: argument 2 of 'readdir_r' must be non-null
# 2389|   
# 2390|   	for (;;) {
# 2391|-> 		ret = readdir_r(td->dir, dirent, &diriter);
# 2392|   		if (ret) {
# 2393|   			fprintf(stderr, "[error] Readdir error.\n");

Error: CLANG_WARNING: [#def17]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c:50: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/events-private.h:46:6: warning[core.NullDereference]: Access to field 'clock_use_offset_avg' results in a dereference of a null pointer (loaded from variable 'tc')
#   44|   	uint64_t tc_offset;
#   45|   
#   46|-> 	if (tc->clock_use_offset_avg)
#   47|   		tc_offset = tc->single_clock_offset_avg;
#   48|   	else

Error: GCC_ANALYZER_WARNING (CWE-476): [#def18]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/event.c: scope_hint: In function 'bt_ctf_event_set_header'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/event.c:476:13: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/event.c: scope_hint: In function 'bt_ctf_event_set_header'
#  474|   	 */
#  475|   	field_type = bt_ctf_field_get_type(header);
#  476|-> 	if (bt_ctf_field_type_compare(field_type,
#  477|   			stream_class->event_header_type)) {
#  478|   		ret = -1;

Error: CLANG_WARNING: [#def19]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/field-types.c:681:10: warning[unix.Malloc]: Potential leak of memory pointed to by 'integer'
#  679|   
#  680|   	if (!integer || size == 0 || size > 64) {
#  681|-> 		return NULL;
#  682|   	}
#  683|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def20]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c: scope_hint: In function 'relative_ptokens_to_field_path'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c:511:43: warning[-Wanalyzer-null-dereference]: dereference of NULL 'entry'
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/types.h:40: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/ctf-ir/field-types-internal.h:36: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/ctf-ir/resolve-internal.h:33: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c:33: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c: scope_hint: In function 'relative_ptokens_to_field_path'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c: scope_hint: In function 'relative_ptokens_to_field_path'
#  509|   
#  510|   	while (parent_pos_in_stack >= 0) {
#  511|-> 		struct bt_ctf_field_type *parent_type =
#  512|   			type_stack_at(ctx->type_stack,
#  513|   				parent_pos_in_stack)->type;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c:514:21: warning[-Wanalyzer-null-dereference]: dereference of NULL 'entry'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c: scope_hint: In function 'relative_ptokens_to_field_path'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c: scope_hint: In function 'relative_ptokens_to_field_path'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c:221:17: note: in expansion of macro 'g_ptr_array_index'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c: scope_hint: In function 'relative_ptokens_to_field_path'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c: scope_hint: In function 'relative_ptokens_to_field_path'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c:221:17: note: in expansion of macro 'g_ptr_array_index'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c: scope_hint: In function 'relative_ptokens_to_field_path'
#  512|   			type_stack_at(ctx->type_stack,
#  513|   				parent_pos_in_stack)->type;
#  514|-> 		int cur_index = type_stack_at(ctx->type_stack,
#  515|   			parent_pos_in_stack)->index;
#  516|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def22]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c: scope_hint: In function 'resolve_type'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c:1063:73: warning[-Wanalyzer-null-dereference]: dereference of NULL 'entry'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c: scope_hint: In function 'resolve_type'
# 1061|   			if (type_id == CTF_TYPE_ARRAY ||
# 1062|   					type_id == CTF_TYPE_SEQUENCE) {
# 1063|-> 				type_stack_peek(ctx->type_stack)->index = -1;
# 1064|   			} else {
# 1065|   				type_stack_peek(ctx->type_stack)->index =

Error: GCC_ANALYZER_WARNING (CWE-476): [#def23]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c:1065:73: warning[-Wanalyzer-null-dereference]: dereference of NULL 'entry'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/ir/resolve.c: scope_hint: In function 'resolve_type'
# 1063|   				type_stack_peek(ctx->type_stack)->index = -1;
# 1064|   			} else {
# 1065|-> 				type_stack_peek(ctx->type_stack)->index =
# 1066|   					f_index;
# 1067|   			}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c: scope_hint: In function 'bt_yy_create_buffer'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:1958:12: warning[-Wanalyzer-malloc-leak]: leak of 'bt_yyalloc(64, yyscanner)'
<command-line>: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:1944:21: note: in expansion of macro 'yy_create_buffer'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:1948:31: note: in expansion of macro 'yyalloc'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:2569:7: note: in expansion of macro 'yyalloc'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:1948:31: note: in expansion of macro 'yyalloc'
# 1956|   	 */
# 1957|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 1958|-> 	if ( ! b->yy_ch_buf )
# 1959|   		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
# 1960|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def25]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c: scope_hint: In function 'yy_init_buffer'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:2000:26: warning[-Wanalyzer-null-dereference]: dereference of NULL 'b'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:1886:13: note: in expansion of macro 'yy_create_buffer'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:1944:21: note: in expansion of macro 'yy_create_buffer'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:1998:9: note: in expansion of macro 'yy_flush_buffer'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:2021:10: note: in expansion of macro 'yy_flush_buffer'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:1998:9: note: in expansion of macro 'yy_flush_buffer'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:1886:13: note: in expansion of macro 'yy_create_buffer'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:1998:9: note: in expansion of macro 'yy_flush_buffer'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:2021:10: note: in expansion of macro 'yy_flush_buffer'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:1998:9: note: in expansion of macro 'yy_flush_buffer'
# 1998|   	yy_flush_buffer( b , yyscanner);
# 1999|   
# 2000|-> 	b->yy_input_file = file;
# 2001|   	b->yy_fill_buffer = 1;
# 2002|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c: scope_hint: In function 'bt_yy_scan_buffer'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:2218:32: warning[-Wanalyzer-malloc-leak]: leak of 'bt_yyalloc(n,  yyscanner)'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:2202:17: note: in expansion of macro 'yy_scan_bytes'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:2211:24: note: in expansion of macro 'yyalloc'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:2569:7: note: in expansion of macro 'yyalloc'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:2211:24: note: in expansion of macro 'yyalloc'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:2220:13: note: in expansion of macro 'yy_scan_buffer'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-lexer.c:2152:17: note: in expansion of macro 'yy_scan_buffer'
# 2216|   		buf[i] = yybytes[i];
# 2217|   
# 2218|-> 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 2219|   
# 2220|   	b = yy_scan_buffer( buf, n , yyscanner);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def27]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser-test.c: scope_hint: In function ‘main’
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser-test.c:71:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘trace’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
#   69|   	}
#   70|   	trace = malloc(sizeof(*trace));
#   71|-> 	memset(trace, 0, sizeof(*trace));
#   72|   	ret = ctf_visitor_construct_metadata(stderr, 0, &scanner->ast->root,
#   73|   			trace, BYTE_ORDER);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c: scope_hint: In function 'yyparse'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:1442:21: warning[-Wanalyzer-malloc-leak]: leak of 'yyptr'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:1428:25: note: in expansion of macro 'YYMALLOC'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2912:29: note: in expansion of macro 'YYSTACK_ALLOC'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2934:3: note: in expansion of macro 'YYDPRINTF'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2959:7: note: in expansion of macro 'YYDPRINTF'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2994:3: note: in expansion of macro 'YY_SYMBOL_PRINT'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:1428:25: note: in expansion of macro 'YYMALLOC'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2912:29: note: in expansion of macro 'YYSTACK_ALLOC'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:1503:25: note: in definition of macro 'YYCOPY'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2915:9: note: in expansion of macro 'YYSTACK_RELOCATE'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2934:3: note: in expansion of macro 'YYDPRINTF'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2959:7: note: in expansion of macro 'YYDPRINTF'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2994:3: note: in expansion of macro 'YY_SYMBOL_PRINT'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:1428:25: note: in expansion of macro 'YYMALLOC'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2912:29: note: in expansion of macro 'YYSTACK_ALLOC'
# 1440|   #  endif
# 1441|   #  ifndef YYMALLOC
# 1442|-> #   define YYMALLOC malloc
# 1443|   #   if ! defined malloc && ! defined EXIT_SUCCESS
# 1444|   void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */

Error: GCC_ANALYZER_WARNING (CWE-457): [#def29]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:1503:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'yyss'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:1488:9: note: in expansion of macro 'YYCOPY'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2915:9: note: in expansion of macro 'YYSTACK_RELOCATE'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:1503:25: note: in definition of macro 'YYCOPY'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2915:9: note: in expansion of macro 'YYSTACK_RELOCATE'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:1488:9: note: in expansion of macro 'YYCOPY'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2915:9: note: in expansion of macro 'YYSTACK_RELOCATE'
# 1501|   #  if defined __GNUC__ && 1 < __GNUC__
# 1502|   #   define YYCOPY(Dst, Src, Count) \
# 1503|->       __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
# 1504|   #  else
# 1505|   #   define YYCOPY(Dst, Src, Count)              \

Error: GCC_ANALYZER_WARNING (CWE-127): [#def30]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c: scope_hint: In function 'yysyntax_error'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2640:52: warning[-Wanalyzer-out-of-bounds]: buffer under-read
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2934:3: note: in expansion of macro 'YYDPRINTF'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2959:7: note: in expansion of macro 'YYDPRINTF'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2994:3: note: in expansion of macro 'YY_SYMBOL_PRINT'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:1503:25: note: in definition of macro 'YYCOPY'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2915:9: note: in expansion of macro 'YYSTACK_RELOCATE'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2934:3: note: in expansion of macro 'YYDPRINTF'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:5308:33: note: in expansion of macro 'YYSYNTAX_ERROR'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:5308:33: note: in expansion of macro 'YYSYNTAX_ERROR'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-parser.c:2640:52: note: valid subscripts for 'yytname' are '[0]' to '[114]'
#  └──────────────────────────────────────┘
#                     ^
# 2638|                   yytype_int16 *yyssp, int yytoken)
# 2639|   {
# 2640|->   YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
# 2641|     YYSIZE_T yysize = yysize0;
# 2642|     enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };

Error: CLANG_WARNING: [#def31]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-visitor-generate-io-struct.c:678:9: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
#  676|   			return -EPERM;
#  677|   		}
#  678|-> 		ret = bt_register_declaration(identifier, type_declaration, scope);
#  679|   		if (ret) {
#  680|   			type_declaration->declaration_free(type_declaration);

Error: CLANG_WARNING: [#def32]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-visitor-generate-io-struct.c:732:15: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value
#  730|   	 * abstract or not (if it has an identifier). Check it here.
#  731|   	 */
#  732|-> 	if (dummy_id != 0) {
#  733|   		fprintf(fd, "[error] %s: expecting empty identifier\n", __func__);
#  734|   		err = -EINVAL;

Error: CLANG_WARNING: [#def33]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-visitor-generate-io-struct.c:2745:14: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
# 2743|   				goto error;	/* ret is 0, so not an actual error, just warn. */
# 2744|   			}
# 2745|-> 			env->vpid = (int) v;
# 2746|   			printf_verbose("env.vpid = %d\n", env->vpid);
# 2747|   		} else if (!strcmp(left, "procname")) {

Error: COMPILER_WARNING (CWE-457): [#def34]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-visitor-generate-io-struct.c:2745:37: warning[-Wmaybe-uninitialized]: 'v' may be used uninitialized
# 2745 |                         env->vpid = (int) v;
#      |                                     ^~~~~~~
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-visitor-generate-io-struct.c: scope_hint: In function 'ctf_visitor_construct_metadata'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-visitor-generate-io-struct.c:2734:34: note: 'v' was declared here
# 2734 |                         uint64_t v;
#      |                                  ^
# 2743|   				goto error;	/* ret is 0, so not an actual error, just warn. */
# 2744|   			}
# 2745|-> 			env->vpid = (int) v;
# 2746|   			printf_verbose("env.vpid = %d\n", env->vpid);
# 2747|   		} else if (!strcmp(left, "procname")) {

Error: CLANG_WARNING: [#def35]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-visitor-generate-io-struct.c:2878:5: warning[core.CallAndMessage]: 4th function call argument is an uninitialized value
# 2876|   				if (ret)
# 2877|   					goto error;
# 2878|-> 				printf_verbose("env.%s = %" PRIu64 "\n", left, v);
# 2879|   			} else if (is_unary_signed(&node->u.ctf_expression.right)) {
# 2880|   				int64_t v;

Error: CLANG_WARNING: [#def36]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-visitor-generate-io-struct.c:2886:5: warning[core.CallAndMessage]: 4th function call argument is an uninitialized value
# 2884|   				if (ret)
# 2885|   					goto error;
# 2886|-> 				printf_verbose("env.%s = %" PRId64 "\n", left, v);
# 2887|   			} else {
# 2888|   				printf_verbose("%s: attribute \"%s\" has unknown type.\n", __func__, left);

Error: COMPILER_WARNING (CWE-697): [#def37]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-visitor-generate-io-struct.c: scope_hint: In function 'ctf_destroy_metadata'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-visitor-generate-io-struct.c:3118:45: warning[-Waddress]: the comparison will always evaluate as 'true' for the address of 'p' will never be NULL
# 3118 |                                         if (&event->event_fields->p)
#      |                                             ^
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-visitor-generate-io-struct.c:37: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/types.h:272:30: note: 'p' declared here
#  272 |         struct bt_definition p;
#      |                              ^
# 3116|   					if (!event)
# 3117|   						continue;
# 3118|-> 					if (&event->event_fields->p)
# 3119|   						bt_definition_unref(&event->event_fields->p);
# 3120|   					if (&event->event_context->p)

Error: COMPILER_WARNING (CWE-697): [#def38]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-visitor-generate-io-struct.c:3120:45: warning[-Waddress]: the comparison will always evaluate as 'true' for the address of 'p' will never be NULL
# 3120 |                                         if (&event->event_context->p)
#      |                                             ^
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/types.h:272:30: note: 'p' declared here
#  272 |         struct bt_definition p;
#      |                              ^
# 3118|   					if (&event->event_fields->p)
# 3119|   						bt_definition_unref(&event->event_fields->p);
# 3120|-> 					if (&event->event_context->p)
# 3121|   						bt_definition_unref(&event->event_context->p);
# 3122|   					g_free(event);

Error: COMPILER_WARNING (CWE-697): [#def39]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-visitor-generate-io-struct.c:3124:37: warning[-Waddress]: the comparison will always evaluate as 'true' for the address of 'p' will never be NULL
# 3124 |                                 if (&stream_def->trace_packet_header->p)
#      |                                     ^
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/types.h:272:30: note: 'p' declared here
#  272 |         struct bt_definition p;
#      |                              ^
# 3122|   					g_free(event);
# 3123|   				}
# 3124|-> 				if (&stream_def->trace_packet_header->p)
# 3125|   					bt_definition_unref(&stream_def->trace_packet_header->p);
# 3126|   				if (&stream_def->stream_event_header->p)

Error: COMPILER_WARNING (CWE-697): [#def40]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-visitor-generate-io-struct.c:3126:37: warning[-Waddress]: the comparison will always evaluate as 'true' for the address of 'p' will never be NULL
# 3126 |                                 if (&stream_def->stream_event_header->p)
#      |                                     ^
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/types.h:272:30: note: 'p' declared here
#  272 |         struct bt_definition p;
#      |                              ^
# 3124|   				if (&stream_def->trace_packet_header->p)
# 3125|   					bt_definition_unref(&stream_def->trace_packet_header->p);
# 3126|-> 				if (&stream_def->stream_event_header->p)
# 3127|   					bt_definition_unref(&stream_def->stream_event_header->p);
# 3128|   				if (&stream_def->stream_packet_context->p)

Error: COMPILER_WARNING (CWE-697): [#def41]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-visitor-generate-io-struct.c:3128:37: warning[-Waddress]: the comparison will always evaluate as 'true' for the address of 'p' will never be NULL
# 3128 |                                 if (&stream_def->stream_packet_context->p)
#      |                                     ^
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/types.h:272:30: note: 'p' declared here
#  272 |         struct bt_definition p;
#      |                              ^
# 3126|   				if (&stream_def->stream_event_header->p)
# 3127|   					bt_definition_unref(&stream_def->stream_event_header->p);
# 3128|-> 				if (&stream_def->stream_packet_context->p)
# 3129|   					bt_definition_unref(&stream_def->stream_packet_context->p);
# 3130|   				if (&stream_def->stream_event_context->p)

Error: COMPILER_WARNING (CWE-697): [#def42]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/ctf-visitor-generate-io-struct.c:3130:37: warning[-Waddress]: the comparison will always evaluate as 'true' for the address of 'p' will never be NULL
# 3130 |                                 if (&stream_def->stream_event_context->p)
#      |                                     ^
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/types.h:272:30: note: 'p' declared here
#  272 |         struct bt_definition p;
#      |                              ^
# 3128|   				if (&stream_def->stream_packet_context->p)
# 3129|   					bt_definition_unref(&stream_def->stream_packet_context->p);
# 3130|-> 				if (&stream_def->stream_event_context->p)
# 3131|   					bt_definition_unref(&stream_def->stream_event_context->p);
# 3132|   				g_ptr_array_free(stream_def->events_by_id, TRUE);

Error: CLANG_WARNING: [#def43]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/objstack.c:56:9: warning[unix.MallocSizeof]: Result of 'calloc' is converted to a pointer of type 'struct objstack_node', which is incompatible with sizeof operand type 'char'
#   54|   	if (!objstack)
#   55|   		return NULL;
#   56|-> 	node = calloc(sizeof(struct objstack_node) + OBJSTACK_INIT_LEN,
#   57|   			sizeof(char));
#   58|   	if (!node) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/objstack.c: scope_hint: In function 'objstack_create'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/objstack.c:64:19: warning[-Wanalyzer-malloc-leak]: leak of 'node'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/objstack.c:28: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/list.h:46:32: note: in definition of macro 'BT_INIT_LIST_HEAD'
#   62|   	BT_INIT_LIST_HEAD(&objstack->head);
#   63|   	bt_list_add_tail(&node->node, &objstack->head);
#   64|-> 	node->len = OBJSTACK_INIT_LEN;
#   65|   	return objstack;
#   66|   }

Error: CLANG_WARNING: [#def45]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/objstack.c:107:13: warning[unix.MallocSizeof]: Result of 'calloc' is converted to a pointer of type 'struct objstack_node', which is incompatible with sizeof operand type 'char'
#  105|   
#  106|   	/* Allocate new node with double of size of last node */
#  107|-> 	new_node = calloc(sizeof(struct objstack_node) + (last_node->len << 1),
#  108|   			sizeof(char));
#  109|   	if (!new_node) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/objstack.c: scope_hint: In function 'objstack_alloc'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/objstack.c:130:20: warning[-Wanalyzer-malloc-leak]: leak of 'last_node'
#  128|   	while (last_node->len - last_node->used_len < len) {
#  129|   		last_node = objstack_append_node(objstack);
#  130|-> 		if (!last_node) {
#  131|   			return NULL;
#  132|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/metadata/objstack.c:135:29: warning[-Wanalyzer-malloc-leak]: leak of 'last_node'
#  133|   	}
#  134|   	p = &last_node->data[last_node->used_len];
#  135|-> 	last_node->used_len += len;
#  136|   	return p;
#  137|   }

Error: CLANG_WARNING: [#def48]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/types/float.c:214:27: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  212|   		break;
#  213|   	case DBL_MANT_DIG:
#  214|-> 		float_definition->value = u.vd;
#  215|   		break;
#  216|   	default:

Error: GCC_ANALYZER_WARNING (CWE-476): [#def49]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/writer/writer.c: scope_hint: In function 'bt_ctf_writer_destroy'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/ctf/writer/writer.c:108:19: warning[-Wanalyzer-null-dereference]: dereference of NULL 'obj'
#  106|   	writer = container_of(obj, struct bt_ctf_writer, base);
#  107|   	bt_ctf_writer_flush_metadata(writer);
#  108|-> 	if (writer->path) {
#  109|   		g_string_free(writer->path, TRUE);
#  110|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c: scope_hint: In function 'add_one_trace'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c:65:20: warning[-Wanalyzer-malloc-leak]: leak of 'new_mmap_stream'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c:1528:43: note: in expansion of macro 'zmalloc'
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/format.h:32: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/context.h:35: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/babeltrace.h:28: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c:38: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c:1526:9: note: in expansion of macro 'bt_list_for_each_entry'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c:1528:43: note: in expansion of macro 'zmalloc'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c:1528:43: note: in expansion of macro 'zmalloc'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c:1526:9: note: in expansion of macro 'bt_list_for_each_entry'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c:1528:43: note: in expansion of macro 'zmalloc'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c:1528:43: note: in expansion of macro 'zmalloc'
#   63|    * Memory allocation zeroed
#   64|    */
#   65|-> #define zmalloc(x) calloc(1, x)
#   66|   
#   67|   #ifndef max_t

Error: CLANG_WARNING: [#def51]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c:1342:4: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 1340|   			 * have fake indexes between real indexes.
# 1341|   			 */
# 1342|-> 			memcpy(cur_index, prev_index, sizeof(struct packet_index));
# 1343|   		}
# 1344|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def52]
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c:1529:47: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'new_mmap_stream'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c:1526:9: note: in expansion of macro 'bt_list_for_each_entry'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c:1528:43: note: in expansion of macro 'zmalloc'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c:1528:43: note: in expansion of macro 'zmalloc'
# 1527|   		if (!stream->metadata_flag) {
# 1528|   			new_mmap_stream = zmalloc(sizeof(struct bt_mmap_stream));
# 1529|-> 			new_mmap_stream->priv = (void *) stream;
# 1530|   			new_mmap_stream->fd = -1;
# 1531|   			bt_list_add(&new_mmap_stream->list, &mmap_list.head);

Error: COMPILER_WARNING (CWE-126): [#def53]
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/compat/string.h:58:16: warning[-Wstringop-overread]: 'strndup' specified bound 255 exceeds source size 64
#   58 |         return strndup(s, n);
#      |                ^~~~~~~~~~~~~
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live.h:30: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-live-comm.c:57: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-viewer-abi.h: scope_hint: In function 'lttng_live_list_sessions'
babeltrace-1.5.11-build/babeltrace-1.5.11/formats/lttng-live/lttng-viewer-abi.h:113:14: note: source object allocated here
#  113 |         char hostname[LTTNG_VIEWER_HOST_NAME_MAX];
#      |              ^~~~~~~~
#   56|   char *bt_strndup(const char *s, size_t n)
#   57|   {
#   58|-> 	return strndup(s, n);
#   59|   }
#   60|   #else

Error: COMPILER_WARNING (CWE-195): [#def54]
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:3227: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/ctf/types.h: scope_hint: In function ‘ctf_pos_packet’
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/ctf/types.h:222:36: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int64_t’ {aka ‘long int’} and ‘uint64_t’ {aka ‘long unsigned int’}
#  222 |         if (unlikely(dummy->offset > dummy->packet_size))
#      |                                    ^
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/babeltrace-internal.h:148:46: note: in definition of macro ‘unlikely’
#  148 | #  define unlikely(x)    __builtin_expect(!!(x), 0)
#      |                                              ^
#  220|   int ctf_pos_packet(struct ctf_stream_pos *dummy)
#  221|   {
#  222|-> 	if (unlikely(dummy->offset > dummy->packet_size))
#  223|   		return -ENOSPC;
#  224|   	return 0;

Error: COMPILER_WARNING (CWE-195): [#def55]
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/format-internal.h:35: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/ctf-ir/metadata.h:32: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/python-complements.h:25: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/bindings/python/babeltrace/babeltrace_wrap.c:3238: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/ctf/types.h: scope_hint: In function ‘ctf_pos_get_event’
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/ctf/types.h:244:25: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int64_t’ {aka ‘long int’} and ‘uint64_t’ {aka ‘long unsigned int’}
#  244 |         if (pos->offset == pos->content_size) {
#      |                         ^~
#  242|   
#  243|   	assert(pos->offset <= pos->content_size);
#  244|-> 	if (pos->offset == pos->content_size) {
#  245|   		printf_debug("ctf_packet_seek (before call): %" PRId64 "\n",
#  246|   			     pos->offset);

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def56]
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/bin-info.c: scope_hint: In function 'bin_info_set_dwarf_info_from_path'
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/bin-info.c:242:17: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'fd'
/usr/include/glib-2.0/glib/gtestutils.h:32: included_from: Included from here.
/usr/include/glib-2.0/glib.h:89: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/bin-info.c:38: included_from: Included from here.
#  240|   error:
#  241|   	if (fd >= 0) {
#  242|-> 		close(fd);
#  243|   		fd = -1;
#  244|   	}

Error: CLANG_WARNING: [#def57]
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/bin-info.c:633:6: warning[unix.Malloc]: Potential leak of memory pointed to by '_shdr'
#  631|   	}
#  632|   
#  633|-> 	if (_shdr->sh_type != SHT_SYMTAB) {
#  634|   		/*
#  635|   		 * We are only interested in symbol table (symtab)

Error: CLANG_WARNING: [#def58]
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/bin-info.c:659:20: warning[unix.Malloc]: Potential leak of memory pointed to by 'cur_sym'
#  657|   			goto error;
#  658|   		}
#  659|-> 		if (GELF_ST_TYPE(cur_sym->st_info) != STT_FUNC) {
#  660|   			/* We're only interested in the functions. */
#  661|   			g_free(cur_sym);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def59]
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/debug-info.c: scope_hint: In function 'debug_info_source_create_from_bin'
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/debug-info.c:115:17: warning[-Wanalyzer-null-dereference]: dereference of NULL 'bin'
#  113|   
#  114|   	/* Can't retrieve src_loc from ELF, or could not find binary, skip. */
#  115|-> 	if (!bin->is_elf_only || !debug_info_src->func) {
#  116|   		/* Lookup source location */
#  117|   		ret = bin_info_lookup_source_location(bin, ip, &src_loc);

Error: CLANG_WARNING: [#def60]
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/dwarf.c:106:36: warning[unix.Malloc]: Potential leak of memory pointed to by 'dwarf_die'
#  104|   	}
#  105|   
#  106|-> 	die = g_new0(struct bt_dwarf_die, 1);
#  107|   	if (!die) {
#  108|   		goto error;

Error: CLANG_WARNING: [#def61]
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/dwarf.c:280:8: warning[unix.Malloc]: Potential leak of memory pointed to by 'file_attr'
#  278|   	}
#  279|   
#  280|-> 	ret = dwarf_formsdata(file_attr, &file_no);
#  281|   	if (ret) {
#  282|   		goto error;

Error: CLANG_WARNING: [#def62]
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/dwarf.c:336:8: warning[unix.Malloc]: Potential leak of memory pointed to by 'line_attr'
#  334|   	}
#  335|   
#  336|-> 	ret = dwarf_formudata(line_attr, &_line_no);
#  337|   	if (ret) {
#  338|   		goto error;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def63]
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/iterator.c: scope_hint: In function 'seek_file_stream_by_timestamp'
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/iterator.c:140:35: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cfs'
/usr/include/glib-2.0/glib/glist.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/ghash.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:52: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/babeltrace-internal.h:28: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/iterator.c:31: included_from: Included from here.
/usr/include/glib-2.0/glib/gmem.h:332:57: note: in expansion of macro '_G_NEW'
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/iterator.c:799:16: note: in expansion of macro 'g_new0'
/usr/include/glib-2.0/glib/gmem.h:315:57: note: in expansion of macro '_G_NEW'
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/iterator.c:748:29: note: in expansion of macro 'g_new'
/usr/include/glib-2.0/glib.h:33: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/iterator.c:345:27: note: in expansion of macro 'g_ptr_array_index'
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/iterator.c:353:40: note: in expansion of macro 'g_ptr_array_index'
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/ctf/metadata.h:38: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/iterator.c:37: included_from: Included from here.
#  138|   
#  139|   	stream_pos = &cfs->pos;
#  140|-> 	for (i = 0; i < stream_pos->packet_index->len; i++) {
#  141|   		index = &g_array_index(stream_pos->packet_index,
#  142|   				struct packet_index, i);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def64]
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/prio_heap/prio_heap.c: scope_hint: In function 'bt_heap_copy'
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/prio_heap/prio_heap.c:238:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
babeltrace-1.5.11-build/babeltrace-1.5.11/lib/prio_heap/prio_heap.c: scope_hint: In function 'bt_heap_copy'
<built-in>: note: argument 1 of '__builtin_memcpy' must be non-null
#  236|   		goto end;
#  237|   
#  238|-> 	memcpy(dst->ptrs, src->ptrs, src->len * sizeof(void *));
#  239|   
#  240|   end:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
babeltrace-1.5.11-build/babeltrace-1.5.11/tests/lib/test_ctf_writer.c: scope_hint: In function ‘validate_metadata’
babeltrace-1.5.11-build/babeltrace-1.5.11/tests/lib/test_ctf_writer.c:92:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(metadata_path, 0)’
#   90|   
#   91|   		ret = dup2(parser_output_fd, STDERR_FILENO);
#   92|-> 		if (ret < 0) {
#   93|   			perror("# dup2 parser_output_fd to STDERR");
#   94|   			goto result;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def66]
babeltrace-1.5.11-build/babeltrace-1.5.11/tests/lib/test_ctf_writer.c:164:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘metadata_fd’
babeltrace-1.5.11-build/babeltrace-1.5.11/tests/lib/test_ctf_writer.c:41: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/tests/utils/tap/tap.h:31:29: note: in definition of macro ‘ok’
babeltrace-1.5.11-build/babeltrace-1.5.11/tests/utils/tap/tap.h:31:29: note: in definition of macro ‘ok’
#  162|   		}
#  163|   	}
#  164|-> }
#  165|   
#  166|   void validate_trace(char *parser_path, char *trace_path)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def67]
babeltrace-1.5.11-build/babeltrace-1.5.11/tests/lib/test_ctf_writer.c:164:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ret’
babeltrace-1.5.11-build/babeltrace-1.5.11/tests/utils/tap/tap.h:31:29: note: in definition of macro ‘ok’
babeltrace-1.5.11-build/babeltrace-1.5.11/tests/utils/tap/tap.h:31:29: note: in definition of macro ‘ok’
babeltrace-1.5.11-build/babeltrace-1.5.11/tests/lib/test_ctf_writer.c:102:9: note: in expansion of macro ‘ok’
babeltrace-1.5.11-build/babeltrace-1.5.11/tests/lib/test_ctf_writer.c:102:9: note: in expansion of macro ‘ok’
#  162|   		}
#  163|   	}
#  164|-> }
#  165|   
#  166|   void validate_trace(char *parser_path, char *trace_path)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def68]
babeltrace-1.5.11-build/babeltrace-1.5.11/tests/lib/test_ctf_writer.c: scope_hint: In function ‘validate_trace’
babeltrace-1.5.11-build/babeltrace-1.5.11/tests/lib/test_ctf_writer.c:246:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ret’
babeltrace-1.5.11-build/babeltrace-1.5.11/tests/lib/test_ctf_writer.c:209:9: note: in expansion of macro ‘ok’
babeltrace-1.5.11-build/babeltrace-1.5.11/tests/lib/test_ctf_writer.c:209:9: note: in expansion of macro ‘ok’
#  244|   		}
#  245|   	}
#  246|-> }
#  247|   
#  248|   void append_simple_event(struct bt_ctf_stream_class *stream_class,

Error: GCC_ANALYZER_WARNING (CWE-465): [#def69]
babeltrace-1.5.11-build/babeltrace-1.5.11/types/types.c: scope_hint: In function 'bt_lookup_path_definition'
babeltrace-1.5.11-build/babeltrace-1.5.11/types/types.c:215:16: warning[-Wanalyzer-deref-before-check]: check of 'scope' for NULL after already dereferencing it
babeltrace-1.5.11-build/babeltrace-1.5.11/include/babeltrace/types.h:40: included_from: Included from here.
babeltrace-1.5.11-build/babeltrace-1.5.11/types/types.c:33: included_from: Included from here.
#  213|   	}
#  214|   
#  215|-> 	while (scope) {
#  216|   		if (is_path_child_of(cur_path, scope->scope_path) &&
#  217|   		    cur_path->len - scope->scope_path->len == 1) {

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
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-66.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namebabeltrace-1.5.11-8.fc41
store-results-to/tmp/tmp7y5omvjk/babeltrace-1.5.11-8.fc41.tar.xz
time-created2024-07-03 12:05:11
time-finished2024-07-03 12:07:42
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp7y5omvjk/babeltrace-1.5.11-8.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp7y5omvjk/babeltrace-1.5.11-8.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9