Task #119212 - added.err

back to task #119212
download
Error: GCC_ANALYZER_WARNING (CWE-835):
LVM2.2.03.41/lib/device/dev-type.c:341:24: warning[-Wanalyzer-infinite-loop]: infinite loop
LVM2.2.03.41/lib/device/dev-type.c:341:24: danger: infinite loop here
LVM2.2.03.41/lib/device/dev-type.c:341:24: branch_true: if it ever follows ‘true’ branch, it will always do so...
LVM2.2.03.41/lib/device/dev-type.c:341:51: branch_true: ...to here
#  339|   
#  340|   		/* Find the start of the device major name */
#  341|-> 		for (; line[i] && line[i] != ' '; i++)
#  342|   			; /* skip non-space */
#  343|   		for (; line[i] == ' '; i++)

Error: GCC_ANALYZER_WARNING (CWE-401):
LVM2.2.03.41/lib/label/hints.c:863:17: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 4288)’
LVM2.2.03.41/lib/label/hints.c:695:12: enter_function: entry to ‘_read_hint_file’
LVM2.2.03.41/lib/label/hints.c:717:12: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:720:9: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:722:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
LVM2.2.03.41/lib/label/hints.c:723:17: branch_true: ...to here
LVM2.2.03.41/lib/label/hints.c:725:16: branch_true: following ‘true’ branch...
LVM2.2.03.41/lib/label/hints.c:726:17: branch_true: ...to here
LVM2.2.03.41/lib/label/hints.c:730:20: branch_false: following ‘false’ branch (when ‘p’ is NULL)...
LVM2.2.03.41/lib/label/hints.c:744:22: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:744:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:761:22: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:761:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:774:22: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:774:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:787:22: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:787:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:799:22: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:799:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:818:22: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:818:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:831:21: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:831:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:834:21: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:834:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:837:17: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:857:36: call_function: inlined call to ‘zalloc’ from ‘_read_hint_file’
LVM2.2.03.41/lib/label/hints.c:857:20: branch_false: following ‘false’ branch...
LVM2.2.03.41/lib/label/hints.c:861:17: branch_false: ...to here
LVM2.2.03.41/lib/label/hints.c:863:17: danger: ‘calloc(1, 4288)’ leaks here; was allocated at [(28)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/27)
#  861|   		memcpy(alloc_hint, &hint, sizeof(hint));
#  862|   
#  863|-> 		log_debug("add hint %s %s %d:%d %s", hint.name, hint.pvid, major, minor, vgname ?: "-");
#  864|   		dm_list_add(hints, &alloc_hint->list);
#  865|   		found++;

Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.41/test/unit/daemon_stray_t.c:82:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 524288)’
LVM2.2.03.41/test/unit/daemon_stray_t.c:77:19: acquire_resource: opened here
LVM2.2.03.41/test/unit/daemon_stray_t.c:78:9: branch_false: following ‘false’ branch...
LVM2.2.03.41/test/unit/daemon_stray_t.c:81:20: branch_false: ...to here
LVM2.2.03.41/test/unit/daemon_stray_t.c:82:9: danger: ‘open("/dev/null", 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   80|   	/* fd without CLOEXEC - stray, should be closed */
#   81|   	fd_close = open("/dev/null", O_RDONLY);
#   82|-> 	T_ASSERT(fd_close >= 0);
#   83|   	T_ASSERT(fcntl(fd_close, F_SETFD, 0) == 0);
#   84|   

Error: GCC_ANALYZER_WARNING (CWE-775):
LVM2.2.03.41/test/unit/daemon_stray_t.c:83:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 524288)’
LVM2.2.03.41/test/unit/daemon_stray_t.c:77:19: acquire_resource: opened here
LVM2.2.03.41/test/unit/daemon_stray_t.c:78:9: branch_false: following ‘false’ branch...
LVM2.2.03.41/test/unit/daemon_stray_t.c:81:20: branch_false: ...to here
LVM2.2.03.41/test/unit/daemon_stray_t.c:82:9: branch_false: following ‘false’ branch...
LVM2.2.03.41/test/unit/daemon_stray_t.c:83:9: branch_false: ...to here
LVM2.2.03.41/test/unit/daemon_stray_t.c:83:9: danger: ‘open("/dev/null", 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   81|   	fd_close = open("/dev/null", O_RDONLY);
#   82|   	T_ASSERT(fd_close >= 0);
#   83|-> 	T_ASSERT(fcntl(fd_close, F_SETFD, 0) == 0);
#   84|   
#   85|   	daemon_close_stray_fds("test", 1, STDERR_FILENO, &cfds);