liburing-2.13-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
liburing-2.13/examples/helpers.c:66:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/examples/helpers.c:35:14: acquire_resource: stream socket created here
liburing-2.13/examples/helpers.c:36:12: branch_false: following ‘false’ branch (when ‘fd != -1’)...
liburing-2.13/examples/helpers.c:41:9: branch_false: ...to here
liburing-2.13/examples/helpers.c:43:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/examples/helpers.c:48:12: branch_false: ...to here
liburing-2.13/examples/helpers.c:60:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/examples/helpers.c:65:13: branch_false: ...to here
liburing-2.13/examples/helpers.c:65:12: branch_true: following ‘true’ branch...
liburing-2.13/examples/helpers.c:66:17: branch_true: ...to here
liburing-2.13/examples/helpers.c:66:17: throw: if ‘perror’ throws an exception...
liburing-2.13/examples/helpers.c:66:17: danger: ‘fd’ leaks here
#   64|   
#   65|   	if (listen(fd, 1024) < 0) {
#   66|-> 		perror("listen()");
#   67|   		return -1;
#   68|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def2]
liburing-2.13/examples/helpers.c:71:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/examples/helpers.c:35:14: acquire_resource: stream socket created here
liburing-2.13/examples/helpers.c:36:12: branch_false: following ‘false’ branch (when ‘fd != -1’)...
liburing-2.13/examples/helpers.c:41:9: branch_false: ...to here
liburing-2.13/examples/helpers.c:43:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/examples/helpers.c:48:12: branch_false: ...to here
liburing-2.13/examples/helpers.c:60:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/examples/helpers.c:65:13: branch_false: ...to here
liburing-2.13/examples/helpers.c:65:12: branch_true: following ‘true’ branch...
liburing-2.13/examples/helpers.c:66:17: branch_true: ...to here
liburing-2.13/examples/helpers.c:71:1: danger: ‘fd’ leaks here
#   69|   
#   70|   	return fd;
#   71|-> }
#   72|   
#   73|   void *t_aligned_alloc(size_t alignment, size_t size)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
liburing-2.13/examples/io_uring-close-test.c:69:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘iovecs’
liburing-2.13/examples/io_uring-close-test.c:31:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
liburing-2.13/examples/io_uring-close-test.c:36:15: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:37:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:42:15: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:47:15: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:48:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:53:14: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:54:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:59:13: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:59:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:65:18: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:65:18: acquire_memory: this call could return NULL
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:69:17: danger: ‘iovecs + (long unsigned int)i * 16’ could be NULL: unchecked value from [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#   67|   		if (posix_memalign(&buf, 4096, 4096))
#   68|   			return 1;
#   69|-> 		iovecs[i].iov_base = buf;
#   70|   		iovecs[i].iov_len = 4096;
#   71|   		fsize += 4096;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
liburing-2.13/examples/io_uring-close-test.c:87:15: warning[-Wanalyzer-malloc-leak]: leak of ‘iovecs’
liburing-2.13/examples/io_uring-close-test.c:19:5: enter_function: entry to ‘main’
liburing-2.13/examples/io_uring-close-test.c:31:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
liburing-2.13/examples/io_uring-close-test.c:36:15: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:37:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:42:15: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:47:15: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:48:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:53:14: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:54:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:59:13: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:59:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:65:18: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:65:18: acquire_memory: allocated here
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_false: following ‘false’ branch (when ‘i == 4’)...
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:77:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/examples/io_uring-close-test.c:77:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/examples/io_uring-close-test.c:78:20: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-close-test.c:87:15: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:87:15: throw: if ‘io_uring_submit’ throws an exception...
liburing-2.13/examples/io_uring-close-test.c:87:15: danger: ‘iovecs’ leaks here; was allocated at [(14)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/13)
#   85|   	} while (1);
#   86|   
#   87|-> 	ret = io_uring_submit(&ring);
#   88|   	if (ret < 0) {
#   89|   		fprintf(stderr, "io_uring_submit: %s\n", strerror(-ret));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
liburing-2.13/examples/io_uring-close-test.c:120:9: warning[-Wanalyzer-malloc-leak]: leak of ‘iovecs’
liburing-2.13/examples/io_uring-close-test.c:19:5: enter_function: entry to ‘main’
liburing-2.13/examples/io_uring-close-test.c:31:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
liburing-2.13/examples/io_uring-close-test.c:36:15: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:37:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:42:15: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:47:15: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:48:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:53:14: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:54:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:59:13: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:59:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:65:18: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:65:18: acquire_memory: allocated here
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_false: following ‘false’ branch (when ‘i == 4’)...
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:77:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/examples/io_uring-close-test.c:77:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/examples/io_uring-close-test.c:78:20: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-close-test.c:87:15: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:88:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:91:19: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:91:19: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:91:19: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:99:21: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:118:9: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:120:9: throw: if ‘close’ throws an exception...
liburing-2.13/examples/io_uring-close-test.c:120:9: danger: ‘iovecs’ leaks here; was allocated at [(14)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/13)
#  118|   	printf("Submitted=%d, completed=%d, bytes=%lu\n", pending, done,
#  119|   						(unsigned long) fsize);
#  120|-> 	close(fd);
#  121|   	io_uring_queue_exit(&ring);
#  122|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
liburing-2.13/examples/io_uring-close-test.c:121:9: warning[-Wanalyzer-malloc-leak]: leak of ‘iovecs’
liburing-2.13/examples/io_uring-close-test.c:19:5: enter_function: entry to ‘main’
liburing-2.13/examples/io_uring-close-test.c:31:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
liburing-2.13/examples/io_uring-close-test.c:36:15: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:37:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:42:15: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:47:15: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:48:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:53:14: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:54:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:59:13: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:59:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:65:18: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:65:18: acquire_memory: allocated here
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-close-test.c:67:21: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_false: following ‘false’ branch (when ‘i == 4’)...
liburing-2.13/examples/io_uring-close-test.c:66:21: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:77:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/examples/io_uring-close-test.c:77:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/examples/io_uring-close-test.c:78:20: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-close-test.c:87:15: branch_true: ...to here
liburing-2.13/examples/io_uring-close-test.c:88:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:91:19: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:91:19: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:91:19: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:99:21: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-close-test.c:118:9: branch_false: ...to here
liburing-2.13/examples/io_uring-close-test.c:121:9: throw: if ‘io_uring_queue_exit’ throws an exception...
liburing-2.13/examples/io_uring-close-test.c:121:9: danger: ‘iovecs’ leaks here; was allocated at [(14)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/13)
#  119|   						(unsigned long) fsize);
#  120|   	close(fd);
#  121|-> 	io_uring_queue_exit(&ring);
#  122|   	return 0;
#  123|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
liburing-2.13/examples/io_uring-cp.c:105:1: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
liburing-2.13/examples/io_uring-cp.c:249:5: enter_function: entry to ‘main’
liburing-2.13/examples/io_uring-cp.c:255:12: branch_false: following ‘false’ branch (when ‘argc > 2’)...
liburing-2.13/examples/io_uring-cp.c:260:16: branch_false: ...to here
liburing-2.13/examples/io_uring-cp.c:261:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-cp.c:265:17: branch_false: ...to here
liburing-2.13/examples/io_uring-cp.c:266:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-cp.c:271:13: branch_false: ...to here
liburing-2.13/examples/io_uring-cp.c:271:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-cp.c:273:13: branch_false: ...to here
liburing-2.13/examples/io_uring-cp.c:273:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-cp.c:276:15: branch_false: ...to here
liburing-2.13/examples/io_uring-cp.c:276:15: call_function: calling ‘copy_file’ from ‘main’
#  103|   	io_uring_sqe_set_data(sqe, data);
#  104|   	return 0;
#  105|-> }
#  106|   
#  107|   static void queue_write(struct io_uring *ring, struct io_data *data)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
liburing-2.13/examples/io_uring-test.c:58:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘iovecs’
liburing-2.13/examples/io_uring-test.c:31:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
liburing-2.13/examples/io_uring-test.c:36:15: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:37:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:42:14: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:48:13: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:48:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:54:18: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:54:18: acquire_memory: this call could return NULL
liburing-2.13/examples/io_uring-test.c:55:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:58:17: danger: ‘iovecs + (long unsigned int)i * 16’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#   56|   		if (posix_memalign(&buf, 4096, 4096))
#   57|   			return 1;
#   58|-> 		iovecs[i].iov_base = buf;
#   59|   		iovecs[i].iov_len = 4096;
#   60|   		fsize += 4096;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
liburing-2.13/examples/io_uring-test.c:76:15: warning[-Wanalyzer-malloc-leak]: leak of ‘iovecs’
liburing-2.13/examples/io_uring-test.c:19:5: enter_function: entry to ‘main’
liburing-2.13/examples/io_uring-test.c:31:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
liburing-2.13/examples/io_uring-test.c:36:15: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:37:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:42:14: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:48:13: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:48:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:54:18: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:54:18: acquire_memory: allocated here
liburing-2.13/examples/io_uring-test.c:55:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:55:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:55:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:55:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:55:21: branch_false: following ‘false’ branch (when ‘i == 4’)...
liburing-2.13/examples/io_uring-test.c:55:21: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:66:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/examples/io_uring-test.c:66:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/examples/io_uring-test.c:67:20: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-test.c:76:15: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:76:15: throw: if ‘io_uring_submit’ throws an exception...
liburing-2.13/examples/io_uring-test.c:76:15: danger: ‘iovecs’ leaks here; was allocated at [(10)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/9)
#   74|   	} while (1);
#   75|   
#   76|-> 	ret = io_uring_submit(&ring);
#   77|   	if (ret < 0) {
#   78|   		fprintf(stderr, "io_uring_submit: %s\n", strerror(-ret));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
liburing-2.13/examples/io_uring-test.c:109:9: warning[-Wanalyzer-malloc-leak]: leak of ‘iovecs’
liburing-2.13/examples/io_uring-test.c:19:5: enter_function: entry to ‘main’
liburing-2.13/examples/io_uring-test.c:31:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
liburing-2.13/examples/io_uring-test.c:36:15: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:37:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:42:14: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:48:13: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:48:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:54:18: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:54:18: acquire_memory: allocated here
liburing-2.13/examples/io_uring-test.c:55:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:55:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:55:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:55:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:55:21: branch_false: following ‘false’ branch (when ‘i == 4’)...
liburing-2.13/examples/io_uring-test.c:55:21: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:66:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/examples/io_uring-test.c:66:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/examples/io_uring-test.c:67:20: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-test.c:76:15: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:77:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:80:19: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:80:19: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:80:19: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:88:21: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:107:9: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:109:9: throw: if ‘close’ throws an exception...
liburing-2.13/examples/io_uring-test.c:109:9: danger: ‘iovecs’ leaks here; was allocated at [(10)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/9)
#  107|   	printf("Submitted=%d, completed=%d, bytes=%lu\n", pending, done,
#  108|   						(unsigned long) fsize);
#  109|-> 	close(fd);
#  110|   	io_uring_queue_exit(&ring);
#  111|   	for (i = 0; i < QD; i++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
liburing-2.13/examples/io_uring-test.c:110:9: warning[-Wanalyzer-malloc-leak]: leak of ‘iovecs’
liburing-2.13/examples/io_uring-test.c:19:5: enter_function: entry to ‘main’
liburing-2.13/examples/io_uring-test.c:31:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
liburing-2.13/examples/io_uring-test.c:36:15: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:37:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:42:14: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:48:13: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:48:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:54:18: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:54:18: acquire_memory: allocated here
liburing-2.13/examples/io_uring-test.c:55:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:55:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:55:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:55:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-test.c:56:21: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:55:21: branch_false: following ‘false’ branch (when ‘i == 4’)...
liburing-2.13/examples/io_uring-test.c:55:21: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:66:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/examples/io_uring-test.c:66:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/examples/io_uring-test.c:67:20: branch_true: following ‘true’ branch...
liburing-2.13/examples/io_uring-test.c:76:15: branch_true: ...to here
liburing-2.13/examples/io_uring-test.c:77:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:80:19: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:80:19: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:80:19: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:88:21: branch_false: following ‘false’ branch...
liburing-2.13/examples/io_uring-test.c:107:9: branch_false: ...to here
liburing-2.13/examples/io_uring-test.c:110:9: throw: if ‘io_uring_queue_exit’ throws an exception...
liburing-2.13/examples/io_uring-test.c:110:9: danger: ‘iovecs’ leaks here; was allocated at [(10)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/9)
#  108|   						(unsigned long) fsize);
#  109|   	close(fd);
#  110|-> 	io_uring_queue_exit(&ring);
#  111|   	for (i = 0; i < QD; i++)
#  112|   		free(iovecs[i].iov_base);

Error: CPPCHECK_WARNING (CWE-682): [#def12]
liburing-2.13/examples/link-cp.c:73: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#   71|   
#   72|   	ptr = malloc(size + sizeof(*data));
#   73|-> 	data = ptr + size;
#   74|   	data->index = 0;
#   75|   	data->offset = offset;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def13]
liburing-2.13/examples/napi-busy-poll-client.c:391:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ctx.sockfd’
liburing-2.13/examples/napi-busy-poll-client.c:356:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/napi-busy-poll-client.c:362:13: branch_false: ...to here
liburing-2.13/examples/napi-busy-poll-client.c:376:12: branch_false: following ‘false’ branch (when ‘ret > 0’)...
liburing-2.13/examples/napi-busy-poll-client.c:383:97: branch_false: ...to here
liburing-2.13/examples/napi-busy-poll-client.c:385:27: acquire_resource: datagram socket created here
liburing-2.13/examples/napi-busy-poll-client.c:385:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/napi-busy-poll-client.c:390:13: branch_false: ...to here
liburing-2.13/examples/napi-busy-poll-client.c:390:12: branch_true: following ‘true’ branch...
liburing-2.13/examples/napi-busy-poll-client.c:391:23: branch_true: ...to here
liburing-2.13/examples/napi-busy-poll-client.c:391:23: throw: if ‘connect’ throws an exception...
liburing-2.13/examples/napi-busy-poll-client.c:391:23: danger: ‘ctx.sockfd’ leaks here
#  389|   
#  390|   	if (opt.ipv6)
#  391|-> 		ret = connect(ctx.sockfd, (struct sockaddr *)&ctx.saddr6, sizeof(struct sockaddr_in6));
#  392|   	else
#  393|   		ret = connect(ctx.sockfd, (struct sockaddr *)&ctx.saddr, sizeof(struct sockaddr_in));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def14]
liburing-2.13/examples/napi-busy-poll-client.c:393:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ctx.sockfd’
liburing-2.13/examples/napi-busy-poll-client.c:356:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/napi-busy-poll-client.c:362:13: branch_false: ...to here
liburing-2.13/examples/napi-busy-poll-client.c:376:12: branch_false: following ‘false’ branch (when ‘ret > 0’)...
liburing-2.13/examples/napi-busy-poll-client.c:383:97: branch_false: ...to here
liburing-2.13/examples/napi-busy-poll-client.c:385:27: acquire_resource: datagram socket created here
liburing-2.13/examples/napi-busy-poll-client.c:385:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/napi-busy-poll-client.c:390:13: branch_false: ...to here
liburing-2.13/examples/napi-busy-poll-client.c:390:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/napi-busy-poll-client.c:393:23: branch_false: ...to here
liburing-2.13/examples/napi-busy-poll-client.c:393:23: throw: if ‘connect’ throws an exception...
liburing-2.13/examples/napi-busy-poll-client.c:393:23: danger: ‘ctx.sockfd’ leaks here
#  391|   		ret = connect(ctx.sockfd, (struct sockaddr *)&ctx.saddr6, sizeof(struct sockaddr_in6));
#  392|   	else
#  393|-> 		ret = connect(ctx.sockfd, (struct sockaddr *)&ctx.saddr, sizeof(struct sockaddr_in));
#  394|   	if (ret < 0) {
#  395|   		fprintf(stderr, "connect() failed: (%d) %s\n", errno, strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
liburing-2.13/examples/poll-bench.c:40:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/examples/poll-bench.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/poll-bench.c:40:15: branch_false: ...to here
liburing-2.13/examples/poll-bench.c:40:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/examples/poll-bench.c:40:15: danger: ‘pipe1[0]’ leaks here
#   38|   	}
#   39|   
#   40|-> 	ret = io_uring_queue_init(1024, &ring, IORING_SETUP_SINGLE_ISSUER);
#   41|   	if (ret == -EINVAL) {
#   42|   		fprintf(stderr, "can't single\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def16]
liburing-2.13/examples/poll-bench.c:40:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/examples/poll-bench.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/poll-bench.c:40:15: branch_false: ...to here
liburing-2.13/examples/poll-bench.c:40:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/examples/poll-bench.c:40:15: danger: ‘pipe1[1]’ leaks here
#   38|   	}
#   39|   
#   40|-> 	ret = io_uring_queue_init(1024, &ring, IORING_SETUP_SINGLE_ISSUER);
#   41|   	if (ret == -EINVAL) {
#   42|   		fprintf(stderr, "can't single\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def17]
liburing-2.13/examples/poll-bench.c:43:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/examples/poll-bench.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/poll-bench.c:40:15: branch_false: ...to here
liburing-2.13/examples/poll-bench.c:41:12: branch_true: following ‘true’ branch...
liburing-2.13/examples/poll-bench.c:42:17: branch_true: ...to here
liburing-2.13/examples/poll-bench.c:43:23: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/examples/poll-bench.c:43:23: danger: ‘pipe1[0]’ leaks here
#   41|   	if (ret == -EINVAL) {
#   42|   		fprintf(stderr, "can't single\n");
#   43|-> 		ret = io_uring_queue_init(1024, &ring, 0);
#   44|   	}
#   45|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def18]
liburing-2.13/examples/poll-bench.c:43:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/examples/poll-bench.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/poll-bench.c:40:15: branch_false: ...to here
liburing-2.13/examples/poll-bench.c:41:12: branch_true: following ‘true’ branch...
liburing-2.13/examples/poll-bench.c:42:17: branch_true: ...to here
liburing-2.13/examples/poll-bench.c:43:23: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/examples/poll-bench.c:43:23: danger: ‘pipe1[1]’ leaks here
#   41|   	if (ret == -EINVAL) {
#   42|   		fprintf(stderr, "can't single\n");
#   43|-> 		ret = io_uring_queue_init(1024, &ring, 0);
#   44|   	}
#   45|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def19]
liburing-2.13/examples/poll-bench.c:50:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/examples/poll-bench.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/poll-bench.c:40:15: branch_false: ...to here
liburing-2.13/examples/poll-bench.c:45:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/examples/poll-bench.c:50:15: branch_false: ...to here
liburing-2.13/examples/poll-bench.c:50:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/examples/poll-bench.c:50:15: danger: ‘pipe1[0]’ leaks here
#   48|   	}
#   49|   
#   50|-> 	ret = io_uring_register_files(&ring, pipe1, 2);
#   51|   	if (ret < 0) {
#   52|   		fprintf(stderr, "io_uring_register_files failed\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def20]
liburing-2.13/examples/poll-bench.c:50:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/examples/poll-bench.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/poll-bench.c:40:15: branch_false: ...to here
liburing-2.13/examples/poll-bench.c:45:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/examples/poll-bench.c:50:15: branch_false: ...to here
liburing-2.13/examples/poll-bench.c:50:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/examples/poll-bench.c:50:15: danger: ‘pipe1[1]’ leaks here
#   48|   	}
#   49|   
#   50|-> 	ret = io_uring_register_files(&ring, pipe1, 2);
#   51|   	if (ret < 0) {
#   52|   		fprintf(stderr, "io_uring_register_files failed\n");

Error: CPPCHECK_WARNING (CWE-476): [#def21]
liburing-2.13/examples/proxy.c:435: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: iovs
#  433|   	iovs = calloc(nr_bufs, sizeof(struct iovec));
#  434|   	for (i = 0; i < nr_bufs; i++) {
#  435|-> 		iovs[i].iov_base = buf;
#  436|   		iovs[i].iov_len = buf_size;
#  437|   		buf += buf_size;

Error: CPPCHECK_WARNING (CWE-476): [#def22]
liburing-2.13/examples/proxy.c:436: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: iovs
#  434|   	for (i = 0; i < nr_bufs; i++) {
#  435|   		iovs[i].iov_base = buf;
#  436|-> 		iovs[i].iov_len = buf_size;
#  437|   		buf += buf_size;
#  438|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def23]
liburing-2.13/examples/proxy.c:515: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: sstat
#  513|   	for (i = 0; i <= nr_bufs; i++) {
#  514|   		snd_total += cd->snd_bucket[i];
#  515|-> 		sstat[i].nr_packets = i;
#  516|   		sstat[i].count = cd->snd_bucket[i];
#  517|   		rcv_total += cd->rcv_bucket[i];

Error: GCC_ANALYZER_WARNING (CWE-476): [#def24]
liburing-2.13/examples/proxy.c:515:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘sstat’
liburing-2.13/examples/proxy.c:550:13: enter_function: entry to ‘__show_stats’
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:572:12: branch_false: following ‘false’ branch (when ‘qps != 0’)...
liburing-2.13/examples/proxy.c:575:12: branch_false: ...to here
liburing-2.13/examples/proxy.c:582:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:583:17: branch_true: ...to here
liburing-2.13/examples/proxy.c:600:17: call_function: calling ‘show_buckets’ from ‘__show_stats’
#  513|   	for (i = 0; i <= nr_bufs; i++) {
#  514|   		snd_total += cd->snd_bucket[i];
#  515|-> 		sstat[i].nr_packets = i;
#  516|   		sstat[i].count = cd->snd_bucket[i];
#  517|   		rcv_total += cd->rcv_bucket[i];

Error: CPPCHECK_WARNING (CWE-476): [#def25]
liburing-2.13/examples/proxy.c:516: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: sstat
#  514|   		snd_total += cd->snd_bucket[i];
#  515|   		sstat[i].nr_packets = i;
#  516|-> 		sstat[i].count = cd->snd_bucket[i];
#  517|   		rcv_total += cd->rcv_bucket[i];
#  518|   		rstat[i].nr_packets = i;

Error: CPPCHECK_WARNING (CWE-476): [#def26]
liburing-2.13/examples/proxy.c:518: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rstat
#  516|   		sstat[i].count = cd->snd_bucket[i];
#  517|   		rcv_total += cd->rcv_bucket[i];
#  518|-> 		rstat[i].nr_packets = i;
#  519|   		rstat[i].count = cd->rcv_bucket[i];
#  520|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def27]
liburing-2.13/examples/proxy.c:518:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘rstat’
liburing-2.13/examples/proxy.c:550:13: enter_function: entry to ‘__show_stats’
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:572:12: branch_false: following ‘false’ branch (when ‘qps != 0’)...
liburing-2.13/examples/proxy.c:575:12: branch_false: ...to here
liburing-2.13/examples/proxy.c:582:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:583:17: branch_true: ...to here
liburing-2.13/examples/proxy.c:600:17: call_function: calling ‘show_buckets’ from ‘__show_stats’
#  516|   		sstat[i].count = cd->snd_bucket[i];
#  517|   		rcv_total += cd->rcv_bucket[i];
#  518|-> 		rstat[i].nr_packets = i;
#  519|   		rstat[i].count = cd->rcv_bucket[i];
#  520|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def28]
liburing-2.13/examples/proxy.c:519: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rstat
#  517|   		rcv_total += cd->rcv_bucket[i];
#  518|   		rstat[i].nr_packets = i;
#  519|-> 		rstat[i].count = cd->rcv_bucket[i];
#  520|   	}
#  521|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
liburing-2.13/examples/proxy.c:527:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rstat’
liburing-2.13/examples/proxy.c:550:13: enter_function: entry to ‘__show_stats’
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:572:12: branch_false: following ‘false’ branch (when ‘qps != 0’)...
liburing-2.13/examples/proxy.c:575:12: branch_false: ...to here
liburing-2.13/examples/proxy.c:582:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:583:17: branch_true: ...to here
liburing-2.13/examples/proxy.c:600:17: call_function: calling ‘show_buckets’ from ‘__show_stats’
#  525|   	}
#  526|   	if (snd_total)
#  527|-> 		qsort(sstat, nr_bufs, sizeof(struct bucket_stat), stat_cmp);
#  528|   	if (rcv_total)
#  529|   		qsort(rstat, nr_bufs, sizeof(struct bucket_stat), stat_cmp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
liburing-2.13/examples/proxy.c:527:17: warning[-Wanalyzer-malloc-leak]: leak of ‘sstat’
liburing-2.13/examples/proxy.c:550:13: enter_function: entry to ‘__show_stats’
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:572:12: branch_false: following ‘false’ branch (when ‘qps != 0’)...
liburing-2.13/examples/proxy.c:575:12: branch_false: ...to here
liburing-2.13/examples/proxy.c:582:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:583:17: branch_true: ...to here
liburing-2.13/examples/proxy.c:600:17: call_function: calling ‘show_buckets’ from ‘__show_stats’
#  525|   	}
#  526|   	if (snd_total)
#  527|-> 		qsort(sstat, nr_bufs, sizeof(struct bucket_stat), stat_cmp);
#  528|   	if (rcv_total)
#  529|   		qsort(rstat, nr_bufs, sizeof(struct bucket_stat), stat_cmp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
liburing-2.13/examples/proxy.c:529:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rstat’
liburing-2.13/examples/proxy.c:550:13: enter_function: entry to ‘__show_stats’
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:572:12: branch_false: following ‘false’ branch (when ‘qps != 0’)...
liburing-2.13/examples/proxy.c:575:12: branch_false: ...to here
liburing-2.13/examples/proxy.c:582:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:583:17: branch_true: ...to here
liburing-2.13/examples/proxy.c:600:17: call_function: calling ‘show_buckets’ from ‘__show_stats’
#  527|   		qsort(sstat, nr_bufs, sizeof(struct bucket_stat), stat_cmp);
#  528|   	if (rcv_total)
#  529|-> 		qsort(rstat, nr_bufs, sizeof(struct bucket_stat), stat_cmp);
#  530|   
#  531|   	printf("\t Packets per recv/send:\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
liburing-2.13/examples/proxy.c:529:17: warning[-Wanalyzer-malloc-leak]: leak of ‘sstat’
liburing-2.13/examples/proxy.c:550:13: enter_function: entry to ‘__show_stats’
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:572:12: branch_false: following ‘false’ branch (when ‘qps != 0’)...
liburing-2.13/examples/proxy.c:575:12: branch_false: ...to here
liburing-2.13/examples/proxy.c:582:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:583:17: branch_true: ...to here
liburing-2.13/examples/proxy.c:600:17: call_function: calling ‘show_buckets’ from ‘__show_stats’
#  527|   		qsort(sstat, nr_bufs, sizeof(struct bucket_stat), stat_cmp);
#  528|   	if (rcv_total)
#  529|-> 		qsort(rstat, nr_bufs, sizeof(struct bucket_stat), stat_cmp);
#  530|   
#  531|   	printf("\t Packets per recv/send:\n");

Error: GCC_ANALYZER_WARNING (CWE-416): [#def33]
liburing-2.13/examples/proxy.c:534:22: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘rstat’
liburing-2.13/examples/proxy.c:550:13: enter_function: entry to ‘__show_stats’
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:572:12: branch_false: following ‘false’ branch (when ‘qps != 0’)...
liburing-2.13/examples/proxy.c:575:12: branch_false: ...to here
liburing-2.13/examples/proxy.c:582:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:583:17: branch_true: ...to here
liburing-2.13/examples/proxy.c:600:17: call_function: calling ‘show_buckets’ from ‘__show_stats’
#  532|   	for (i = 0; i <= nr_bufs; i++) {
#  533|   		double snd_prc = 0.0, rcv_prc = 0.0;
#  534|-> 		if (!rstat[i].count && !sstat[i].count)
#  535|   			continue;
#  536|   		if (rstat[i].count)

Error: GCC_ANALYZER_WARNING (CWE-415): [#def34]
liburing-2.13/examples/proxy.c:546:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘sstat’
liburing-2.13/examples/proxy.c:550:13: enter_function: entry to ‘__show_stats’
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:572:12: branch_false: following ‘false’ branch (when ‘qps != 0’)...
liburing-2.13/examples/proxy.c:575:12: branch_false: ...to here
liburing-2.13/examples/proxy.c:582:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:583:17: branch_true: ...to here
liburing-2.13/examples/proxy.c:600:17: call_function: calling ‘show_buckets’ from ‘__show_stats’
#  544|   	}
#  545|   
#  546|-> 	free(sstat);
#  547|   	free(rstat);
#  548|   }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def35]
liburing-2.13/examples/proxy.c:547:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘rstat’
liburing-2.13/examples/proxy.c:550:13: enter_function: entry to ‘__show_stats’
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:569:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:570:24: branch_true: ...to here
liburing-2.13/examples/proxy.c:572:12: branch_false: following ‘false’ branch (when ‘qps != 0’)...
liburing-2.13/examples/proxy.c:575:12: branch_false: ...to here
liburing-2.13/examples/proxy.c:582:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/examples/proxy.c:583:17: branch_true: ...to here
liburing-2.13/examples/proxy.c:600:17: call_function: calling ‘show_buckets’ from ‘__show_stats’
#  545|   
#  546|   	free(sstat);
#  547|-> 	free(rstat);
#  548|   }
#  549|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def36]
liburing-2.13/examples/reg-wait.c:54:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/examples/reg-wait.c:57:5: enter_function: entry to ‘main’
liburing-2.13/examples/reg-wait.c:69:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/examples/reg-wait.c:74:21: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:75:12: branch_false: following ‘false’ branch (when ‘page_size >= 0’)...
liburing-2.13/examples/reg-wait.c:80:13: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:80:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:85:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:86:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:96:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:97:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:102:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:102:15: call_function: calling ‘register_memory’ from ‘main’
#   52|   	mr.flags = IORING_MEM_REGION_REG_WAIT_ARG;
#   53|   
#   54|-> 	return io_uring_register_region(ring, &mr);
#   55|   }
#   56|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def37]
liburing-2.13/examples/reg-wait.c:54:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/examples/reg-wait.c:57:5: enter_function: entry to ‘main’
liburing-2.13/examples/reg-wait.c:69:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/examples/reg-wait.c:74:21: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:75:12: branch_false: following ‘false’ branch (when ‘page_size >= 0’)...
liburing-2.13/examples/reg-wait.c:80:13: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:80:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:85:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:86:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:96:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:97:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:102:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:102:15: call_function: calling ‘register_memory’ from ‘main’
#   52|   	mr.flags = IORING_MEM_REGION_REG_WAIT_ARG;
#   53|   
#   54|-> 	return io_uring_register_region(ring, &mr);
#   55|   }
#   56|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def38]
liburing-2.13/examples/reg-wait.c:85:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/examples/reg-wait.c:69:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/examples/reg-wait.c:74:21: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:75:12: branch_false: following ‘false’ branch (when ‘page_size >= 0’)...
liburing-2.13/examples/reg-wait.c:80:13: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:80:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:85:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:85:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/examples/reg-wait.c:85:15: danger: ‘fds[0]’ leaks here
#   83|   	}
#   84|   
#   85|-> 	ret = io_uring_queue_init(8, &ring, IORING_SETUP_R_DISABLED);
#   86|   	if (ret) {
#   87|   		fprintf(stderr, "Queue init: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def39]
liburing-2.13/examples/reg-wait.c:85:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/examples/reg-wait.c:69:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/examples/reg-wait.c:74:21: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:75:12: branch_false: following ‘false’ branch (when ‘page_size >= 0’)...
liburing-2.13/examples/reg-wait.c:80:13: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:80:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:85:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:85:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/examples/reg-wait.c:85:15: danger: ‘fds[1]’ leaks here
#   83|   	}
#   84|   
#   85|-> 	ret = io_uring_queue_init(8, &ring, IORING_SETUP_R_DISABLED);
#   86|   	if (ret) {
#   87|   		fprintf(stderr, "Queue init: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def40]
liburing-2.13/examples/reg-wait.c:96:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/examples/reg-wait.c:69:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/examples/reg-wait.c:74:21: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:75:12: branch_false: following ‘false’ branch (when ‘page_size >= 0’)...
liburing-2.13/examples/reg-wait.c:80:13: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:80:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:85:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:86:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:96:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:96:15: throw: if ‘t_aligned_alloc’ throws an exception...
liburing-2.13/examples/reg-wait.c:96:15: danger: ‘fds[0]’ leaks here
#   94|   	 * the rest of the memory can be reused for other purposes.
#   95|   	 */
#   96|-> 	reg = t_aligned_alloc(page_size, page_size);
#   97|   	if (!reg) {
#   98|   		fprintf(stderr, "allocation failed\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def41]
liburing-2.13/examples/reg-wait.c:96:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/examples/reg-wait.c:69:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/examples/reg-wait.c:74:21: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:75:12: branch_false: following ‘false’ branch (when ‘page_size >= 0’)...
liburing-2.13/examples/reg-wait.c:80:13: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:80:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:85:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:86:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:96:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:96:15: throw: if ‘t_aligned_alloc’ throws an exception...
liburing-2.13/examples/reg-wait.c:96:15: danger: ‘fds[1]’ leaks here
#   94|   	 * the rest of the memory can be reused for other purposes.
#   95|   	 */
#   96|-> 	reg = t_aligned_alloc(page_size, page_size);
#   97|   	if (!reg) {
#   98|   		fprintf(stderr, "allocation failed\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
liburing-2.13/examples/reg-wait.c:112:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/examples/reg-wait.c:69:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/examples/reg-wait.c:74:21: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:75:12: branch_false: following ‘false’ branch (when ‘page_size >= 0’)...
liburing-2.13/examples/reg-wait.c:80:13: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:80:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:85:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:86:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:96:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:97:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:102:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:103:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:112:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:112:15: throw: if ‘io_uring_enable_rings’ throws an exception...
liburing-2.13/examples/reg-wait.c:112:15: danger: ‘fds[0]’ leaks here
#  110|   	}
#  111|   
#  112|-> 	ret = io_uring_enable_rings(&ring);
#  113|   	if (ret) {
#  114|   		fprintf(stderr, "io_uring_enable_rings failure %i\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
liburing-2.13/examples/reg-wait.c:112:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/examples/reg-wait.c:69:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/examples/reg-wait.c:74:21: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:75:12: branch_false: following ‘false’ branch (when ‘page_size >= 0’)...
liburing-2.13/examples/reg-wait.c:80:13: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:80:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:85:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:86:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:96:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:97:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:102:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:103:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/reg-wait.c:112:15: branch_false: ...to here
liburing-2.13/examples/reg-wait.c:112:15: throw: if ‘io_uring_enable_rings’ throws an exception...
liburing-2.13/examples/reg-wait.c:112:15: danger: ‘fds[1]’ leaks here
#  110|   	}
#  111|   
#  112|-> 	ret = io_uring_enable_rings(&ring);
#  113|   	if (ret) {
#  114|   		fprintf(stderr, "io_uring_enable_rings failure %i\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def44]
liburing-2.13/examples/rsrc-update-bench.c:40:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/examples/rsrc-update-bench.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:40:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:40:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/examples/rsrc-update-bench.c:40:15: danger: ‘pipe1[0]’ leaks here
#   38|   	}
#   39|   
#   40|-> 	ret = io_uring_queue_init(1024, &ring, IORING_SETUP_SINGLE_ISSUER |
#   41|   					       IORING_SETUP_DEFER_TASKRUN);
#   42|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def45]
liburing-2.13/examples/rsrc-update-bench.c:40:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/examples/rsrc-update-bench.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:40:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:40:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/examples/rsrc-update-bench.c:40:15: danger: ‘pipe1[1]’ leaks here
#   38|   	}
#   39|   
#   40|-> 	ret = io_uring_queue_init(1024, &ring, IORING_SETUP_SINGLE_ISSUER |
#   41|   					       IORING_SETUP_DEFER_TASKRUN);
#   42|   	if (ret) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
liburing-2.13/examples/rsrc-update-bench.c:46:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/examples/rsrc-update-bench.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:40:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:42:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:46:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:46:15: throw: if ‘io_uring_register_ring_fd’ throws an exception...
liburing-2.13/examples/rsrc-update-bench.c:46:15: danger: ‘pipe1[0]’ leaks here
#   44|   		return 1;
#   45|   	}
#   46|-> 	ret = io_uring_register_ring_fd(&ring);
#   47|   	if (ret < 0) {
#   48|   		fprintf(stderr, "io_uring_register_ring_fd failed\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
liburing-2.13/examples/rsrc-update-bench.c:46:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/examples/rsrc-update-bench.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:40:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:42:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:46:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:46:15: throw: if ‘io_uring_register_ring_fd’ throws an exception...
liburing-2.13/examples/rsrc-update-bench.c:46:15: danger: ‘pipe1[1]’ leaks here
#   44|   		return 1;
#   45|   	}
#   46|-> 	ret = io_uring_register_ring_fd(&ring);
#   47|   	if (ret < 0) {
#   48|   		fprintf(stderr, "io_uring_register_ring_fd failed\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
liburing-2.13/examples/rsrc-update-bench.c:51:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/examples/rsrc-update-bench.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:40:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:42:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:46:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:47:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:51:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:51:15: throw: if ‘io_uring_register_files_sparse’ throws an exception...
liburing-2.13/examples/rsrc-update-bench.c:51:15: danger: ‘pipe1[0]’ leaks here
#   49|   		return 1;
#   50|   	}
#   51|-> 	ret = io_uring_register_files_sparse(&ring, table_size);
#   52|   	if (ret < 0) {
#   53|   		fprintf(stderr, "io_uring_register_files_sparse failed\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def49]
liburing-2.13/examples/rsrc-update-bench.c:51:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/examples/rsrc-update-bench.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:40:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:42:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:46:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:47:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:51:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:51:15: throw: if ‘io_uring_register_files_sparse’ throws an exception...
liburing-2.13/examples/rsrc-update-bench.c:51:15: danger: ‘pipe1[1]’ leaks here
#   49|   		return 1;
#   50|   	}
#   51|-> 	ret = io_uring_register_files_sparse(&ring, table_size);
#   52|   	if (ret < 0) {
#   53|   		fprintf(stderr, "io_uring_register_files_sparse failed\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
liburing-2.13/examples/rsrc-update-bench.c:58:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/examples/rsrc-update-bench.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:40:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:42:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:46:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:47:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:51:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:52:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:52:12: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:57:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/examples/rsrc-update-bench.c:58:23: branch_true: ...to here
liburing-2.13/examples/rsrc-update-bench.c:58:23: throw: if ‘io_uring_register_files_update’ throws an exception...
liburing-2.13/examples/rsrc-update-bench.c:58:23: danger: ‘pipe1[1]’ leaks here
#   56|   
#   57|   	for (i = 0; i < table_size; i++) {
#   58|-> 		ret = io_uring_register_files_update(&ring, i, pipe1, 1);
#   59|   		if (ret < 0) {
#   60|   			fprintf(stderr, "io_uring_register_files_update failed\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def51]
liburing-2.13/examples/rsrc-update-bench.c:58:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[i]’
liburing-2.13/examples/rsrc-update-bench.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:40:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:42:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:46:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:47:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:51:15: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:52:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/rsrc-update-bench.c:52:12: branch_false: ...to here
liburing-2.13/examples/rsrc-update-bench.c:57:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/examples/rsrc-update-bench.c:58:23: branch_true: ...to here
liburing-2.13/examples/rsrc-update-bench.c:58:23: throw: if ‘io_uring_register_files_update’ throws an exception...
liburing-2.13/examples/rsrc-update-bench.c:58:23: danger: ‘pipe1[i]’ leaks here
#   56|   
#   57|   	for (i = 0; i < table_size; i++) {
#   58|-> 		ret = io_uring_register_files_update(&ring, i, pipe1, 1);
#   59|   		if (ret < 0) {
#   60|   			fprintf(stderr, "io_uring_register_files_update failed\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def52]
liburing-2.13/examples/send-zerocopy.c:360:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/examples/send-zerocopy.c:488:14: enter_function: entry to ‘do_test’
liburing-2.13/examples/send-zerocopy.c:493:9: call_function: calling ‘setup_sockaddr’ from ‘do_test’
liburing-2.13/examples/send-zerocopy.c:493:9: return_function: returning to ‘do_test’ from ‘setup_sockaddr’
liburing-2.13/examples/send-zerocopy.c:495:9: call_function: calling ‘do_tx’ from ‘do_test’
#  358|   	}
#  359|   
#  360|-> 	if (connect(fd, (void *)&td->dst_addr, cfg_alen))
#  361|   		t_error(1, errno, "connect, idx %i", td->idx);
#  362|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
liburing-2.13/examples/ucontext-cp.c:207:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*<unknown>, 0)’
liburing-2.13/examples/ucontext-cp.c:174:5: enter_function: entry to ‘main’
liburing-2.13/examples/ucontext-cp.c:180:12: branch_false: following ‘false’ branch (when ‘argc > 2’)...
liburing-2.13/examples/ucontext-cp.c:185:15: branch_false: ...to here
liburing-2.13/examples/ucontext-cp.c:186:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/ucontext-cp.c:191:21: branch_false: ...to here
liburing-2.13/examples/ucontext-cp.c:194:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
liburing-2.13/examples/ucontext-cp.c:197:39: branch_true: ...to here
liburing-2.13/examples/ucontext-cp.c:199:20: branch_false: following ‘false’ branch (when ‘pctx’ is non-NULL)...
liburing-2.13/examples/ucontext-cp.c:199:30: branch_false: ...to here
liburing-2.13/examples/ucontext-cp.c:199:30: call_function: calling ‘setup_context’ from ‘main’
liburing-2.13/examples/ucontext-cp.c:199:30: return_function: returning to ‘main’ from ‘setup_context’
liburing-2.13/examples/ucontext-cp.c:199:21: branch_false: following ‘false’ branch...
liburing-2.13/examples/ucontext-cp.c:202:33: branch_false: ...to here
liburing-2.13/examples/ucontext-cp.c:202:24: acquire_resource: opened here
liburing-2.13/examples/ucontext-cp.c:203:20: branch_false: following ‘false’ branch...
liburing-2.13/examples/ucontext-cp.c:207:35: branch_false: ...to here
liburing-2.13/examples/ucontext-cp.c:207:25: throw: if ‘open’ throws an exception...
liburing-2.13/examples/ucontext-cp.c:207:35: danger: ‘open(*<unknown>, 0)’ leaks here; was opened at [(19)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/18)
#  205|   			return 1;
#  206|   		}
#  207|-> 		outfd = open(argv[i + 1], O_WRONLY | O_CREAT | O_TRUNC, 0644);
#  208|   		if (outfd < 0) {
#  209|   			perror("open outfile");

Error: CPPCHECK_WARNING (CWE-476): [#def54]
liburing-2.13/examples/ucontext-cp.c:214: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pbundle
#  212|   
#  213|   		arguments_bundle *pbundle = malloc(sizeof(*pbundle));
#  214|-> 		pbundle->pctx = pctx;
#  215|   		pbundle->psuccess = &success;
#  216|   		pbundle->pfailure = &failure;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def55]
liburing-2.13/examples/ucontext-cp.c:214:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pbundle’
liburing-2.13/examples/ucontext-cp.c:174:5: enter_function: entry to ‘main’
liburing-2.13/examples/ucontext-cp.c:180:12: branch_false: following ‘false’ branch (when ‘argc > 2’)...
liburing-2.13/examples/ucontext-cp.c:185:15: branch_false: ...to here
liburing-2.13/examples/ucontext-cp.c:186:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/ucontext-cp.c:191:21: branch_false: ...to here
liburing-2.13/examples/ucontext-cp.c:194:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
liburing-2.13/examples/ucontext-cp.c:197:39: branch_true: ...to here
liburing-2.13/examples/ucontext-cp.c:199:20: branch_false: following ‘false’ branch (when ‘pctx’ is non-NULL)...
liburing-2.13/examples/ucontext-cp.c:199:30: branch_false: ...to here
liburing-2.13/examples/ucontext-cp.c:199:30: call_function: calling ‘setup_context’ from ‘main’
liburing-2.13/examples/ucontext-cp.c:199:30: return_function: returning to ‘main’ from ‘setup_context’
liburing-2.13/examples/ucontext-cp.c:199:21: branch_false: following ‘false’ branch...
liburing-2.13/examples/ucontext-cp.c:202:33: branch_false: ...to here
liburing-2.13/examples/ucontext-cp.c:203:20: branch_false: following ‘false’ branch...
liburing-2.13/examples/ucontext-cp.c:207:35: branch_false: ...to here
liburing-2.13/examples/ucontext-cp.c:208:20: branch_false: following ‘false’ branch...
liburing-2.13/examples/ucontext-cp.c:213:45: branch_false: ...to here
liburing-2.13/examples/ucontext-cp.c:213:45: acquire_memory: this call could return NULL
liburing-2.13/examples/ucontext-cp.c:214:17: danger: ‘pbundle’ could be NULL: unchecked value from [(23)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/22)
#  212|   
#  213|   		arguments_bundle *pbundle = malloc(sizeof(*pbundle));
#  214|-> 		pbundle->pctx = pctx;
#  215|   		pbundle->psuccess = &success;
#  216|   		pbundle->pfailure = &failure;

Error: CPPCHECK_WARNING (CWE-476): [#def56]
liburing-2.13/examples/ucontext-cp.c:215: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pbundle
#  213|   		arguments_bundle *pbundle = malloc(sizeof(*pbundle));
#  214|   		pbundle->pctx = pctx;
#  215|-> 		pbundle->psuccess = &success;
#  216|   		pbundle->pfailure = &failure;
#  217|   		pbundle->infd = infd;

Error: CPPCHECK_WARNING (CWE-476): [#def57]
liburing-2.13/examples/ucontext-cp.c:216: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pbundle
#  214|   		pbundle->pctx = pctx;
#  215|   		pbundle->psuccess = &success;
#  216|-> 		pbundle->pfailure = &failure;
#  217|   		pbundle->infd = infd;
#  218|   		pbundle->outfd = outfd;

Error: CPPCHECK_WARNING (CWE-476): [#def58]
liburing-2.13/examples/ucontext-cp.c:217: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pbundle
#  215|   		pbundle->psuccess = &success;
#  216|   		pbundle->pfailure = &failure;
#  217|-> 		pbundle->infd = infd;
#  218|   		pbundle->outfd = outfd;
#  219|   

Error: CPPCHECK_WARNING (CWE-476): [#def59]
liburing-2.13/examples/ucontext-cp.c:218: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pbundle
#  216|   		pbundle->pfailure = &failure;
#  217|   		pbundle->infd = infd;
#  218|-> 		pbundle->outfd = outfd;
#  219|   
#  220|   		makecontext(&pctx->ctx_fnew, (void (*)(void)) copy_file_wrapper, 1, pbundle);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
liburing-2.13/examples/zcrx.c:113:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/udmabuf", 2)’
liburing-2.13/examples/zcrx.c:337:13: enter_function: entry to ‘run_server’
liburing-2.13/examples/zcrx.c:344:12: branch_true: following ‘true’ branch (when ‘fd == -1’)...
liburing-2.13/examples/zcrx.c:345:17: branch_true: ...to here
liburing-2.13/examples/zcrx.c:356:12: branch_true: following ‘true’ branch...
liburing-2.13/examples/zcrx.c:357:17: branch_true: ...to here
liburing-2.13/examples/zcrx.c:369:9: call_function: calling ‘setup_zcrx’ from ‘run_server’
#  111|   	memfd = memfd_create("udmabuf-test", MFD_ALLOW_SEALING);
#  112|   	if (memfd < 0)
#  113|-> 		t_error(1, memfd, "Failed to open udmabuf dev");
#  114|   
#  115|   	ret = fcntl(memfd, F_ADD_SEALS, F_SEAL_SHRINK);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def61]
liburing-2.13/examples/zcrx.c:115:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/udmabuf", 2)’
liburing-2.13/examples/zcrx.c:337:13: enter_function: entry to ‘run_server’
liburing-2.13/examples/zcrx.c:344:12: branch_true: following ‘true’ branch (when ‘fd == -1’)...
liburing-2.13/examples/zcrx.c:345:17: branch_true: ...to here
liburing-2.13/examples/zcrx.c:356:12: branch_true: following ‘true’ branch...
liburing-2.13/examples/zcrx.c:357:17: branch_true: ...to here
liburing-2.13/examples/zcrx.c:369:9: call_function: calling ‘setup_zcrx’ from ‘run_server’
#  113|   		t_error(1, memfd, "Failed to open udmabuf dev");
#  114|   
#  115|-> 	ret = fcntl(memfd, F_ADD_SEALS, F_SEAL_SHRINK);
#  116|   	if (ret < 0)
#  117|   		t_error(1, 0, "Failed to set seals");

Error: GCC_ANALYZER_WARNING: [#def62]
liburing-2.13/examples/zcrx.c:356:13: warning[-Wanalyzer-fd-use-without-check]: ‘listen’ on possibly invalid file descriptor ‘fd’
liburing-2.13/examples/zcrx.c:344:12: branch_true: following ‘true’ branch (when ‘fd == -1’)...
liburing-2.13/examples/zcrx.c:345:17: branch_true: ...to here
liburing-2.13/examples/zcrx.c:356:13: danger: ‘fd’ could be invalid
#  354|   		t_error(1, 0, "bind()");
#  355|   
#  356|-> 	if (listen(fd, 1024) < 0)
#  357|   		t_error(1, 0, "listen()");
#  358|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def63]
liburing-2.13/examples/zcrx.c:357:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/examples/zcrx.c:343:14: acquire_resource: stream socket created here
liburing-2.13/examples/zcrx.c:344:12: branch_false: following ‘false’ branch (when ‘fd != -1’)...
liburing-2.13/examples/zcrx.c:347:9: branch_false: ...to here
liburing-2.13/examples/zcrx.c:356:12: branch_true: following ‘true’ branch...
liburing-2.13/examples/zcrx.c:357:17: branch_true: ...to here
liburing-2.13/examples/zcrx.c:357:17: throw: if ‘t_error’ throws an exception...
liburing-2.13/examples/zcrx.c:357:17: danger: ‘fd’ leaks here
#  355|   
#  356|   	if (listen(fd, 1024) < 0)
#  357|-> 		t_error(1, 0, "listen()");
#  358|   
#  359|   	flags |= IORING_SETUP_COOP_TASKRUN;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def64]
liburing-2.13/examples/zcrx.c:365:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/examples/zcrx.c:343:14: acquire_resource: stream socket created here
liburing-2.13/examples/zcrx.c:344:12: branch_false: following ‘false’ branch (when ‘fd != -1’)...
liburing-2.13/examples/zcrx.c:347:9: branch_false: ...to here
liburing-2.13/examples/zcrx.c:356:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/zcrx.c:365:15: branch_false: ...to here
liburing-2.13/examples/zcrx.c:365:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/examples/zcrx.c:365:15: danger: ‘fd’ leaks here
#  363|   	flags |= IORING_SETUP_CQE32;
#  364|   
#  365|-> 	ret = io_uring_queue_init(512, &ring, flags);
#  366|   	if (ret)
#  367|   		t_error(1, ret, "ring init failed");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
liburing-2.13/examples/zcrx.c:367:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/examples/zcrx.c:343:14: acquire_resource: stream socket created here
liburing-2.13/examples/zcrx.c:344:12: branch_false: following ‘false’ branch (when ‘fd != -1’)...
liburing-2.13/examples/zcrx.c:347:9: branch_false: ...to here
liburing-2.13/examples/zcrx.c:356:12: branch_false: following ‘false’ branch...
liburing-2.13/examples/zcrx.c:365:15: branch_false: ...to here
liburing-2.13/examples/zcrx.c:366:12: branch_true: following ‘true’ branch...
liburing-2.13/examples/zcrx.c:367:17: branch_true: ...to here
liburing-2.13/examples/zcrx.c:367:17: throw: if ‘t_error’ throws an exception...
liburing-2.13/examples/zcrx.c:367:17: danger: ‘fd’ leaks here
#  365|   	ret = io_uring_queue_init(512, &ring, flags);
#  366|   	if (ret)
#  367|-> 		t_error(1, ret, "ring init failed");
#  368|   
#  369|   	setup_zcrx(&ring);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def66]
liburing-2.13/src/include/liburing.h:588:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
liburing-2.13/test/bind-listen.c:291:12: enter_function: entry to ‘test_bad_bind’
liburing-2.13/test/bind-listen.c:306:12: branch_false: following ‘false’ branch (when ‘err >= 0’)...
liburing-2.13/test/bind-listen.c:311:16: branch_false: ...to here
liburing-2.13/test/bind-listen.c:312:12: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
liburing-2.13/test/bind-listen.c:318:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_bad_bind’
liburing-2.13/test/bind-listen.c:318:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_bad_bind’
liburing-2.13/test/bind-listen.c:319:9: call_function: inlined call to ‘io_uring_prep_bind’ from ‘test_bad_bind’
#  586|   	LIBURING_NOEXCEPT
#  587|   {
#  588|-> 	sqe->opcode = (__u8) op;
#  589|   	sqe->fd = fd;
#  590|   	sqe->off = offset;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def67]
liburing-2.13/src/include/liburing.h:588:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sqe’
liburing-2.13/test/io_uring_enter.c:151:13: enter_function: entry to ‘submit_io’
liburing-2.13/test/io_uring_enter.c:160:14: call_function: calling ‘setup_file’ from ‘submit_io’
liburing-2.13/test/io_uring_enter.c:160:14: return_function: returning to ‘submit_io’ from ‘setup_file’
liburing-2.13/test/io_uring_enter.c:161:21: branch_true: following ‘true’ branch (when ‘i < nr’)...
liburing-2.13/test/io_uring_enter.c:163:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘submit_io’
liburing-2.13/test/io_uring_enter.c:163:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘submit_io’
liburing-2.13/test/io_uring_enter.c:165:17: call_function: calling ‘io_prep_read’ from ‘submit_io’
#  586|   	LIBURING_NOEXCEPT
#  587|   {
#  588|-> 	sqe->opcode = (__u8) op;
#  589|   	sqe->fd = fd;
#  590|   	sqe->off = offset;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def68]
liburing-2.13/src/include/liburing.h:589:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
liburing-2.13/test/vec-regbuf.c:333:12: enter_function: entry to ‘test_sequence’
liburing-2.13/test/vec-regbuf.c:338:9: call_function: calling ‘reinit_ring’ from ‘test_sequence’
liburing-2.13/test/vec-regbuf.c:338:9: return_function: returning to ‘test_sequence’ from ‘reinit_ring’
liburing-2.13/test/vec-regbuf.c:340:21: branch_true: following ‘true’ branch...
liburing-2.13/test/vec-regbuf.c:341:50: branch_true: ...to here
liburing-2.13/test/vec-regbuf.c:341:23: call_function: calling ‘test_vec’ from ‘test_sequence’
#  587|   {
#  588|   	sqe->opcode = (__u8) op;
#  589|-> 	sqe->fd = fd;
#  590|   	sqe->off = offset;
#  591|   	sqe->addr = (unsigned long) addr;

Error: CPPCHECK_WARNING (CWE-457): [#def69]
liburing-2.13/src/include/liburing.h:945: warning[uninitvar]: Uninitialized variable: events
#  943|   	LIBURING_NOEXCEPT
#  944|   {
#  945|-> 	io_uring_prep_rw(IORING_OP_EPOLL_WAIT, sqe, fd, events, maxevents, 0);
#  946|   	sqe->rw_flags = flags;
#  947|   }

Error: CPPCHECK_WARNING (CWE-457): [#def70]
liburing-2.13/src/include/liburing.h:1024: warning[uninitvar]: Uninitialized variable: buf
# 1022|   	LIBURING_NOEXCEPT
# 1023|   {
# 1024|-> 	io_uring_prep_rw(IORING_OP_READ, sqe, fd, buf, nbytes, offset);
# 1025|   }
# 1026|   

Error: CPPCHECK_WARNING (CWE-457): [#def71]
liburing-2.13/src/include/liburing.h:1172: warning[uninitvar]: Uninitialized variable: buf
# 1170|   	LIBURING_NOEXCEPT
# 1171|   {
# 1172|-> 	io_uring_prep_rw(IORING_OP_RECV, sqe, sockfd, buf, (__u32) len, 0);
# 1173|   	sqe->msg_flags = (__u32) flags;
# 1174|   }

Error: CPPCHECK_WARNING (CWE-457): [#def72]
liburing-2.13/src/include/liburing.h:1293: warning[uninitvar]: Uninitialized variable: addr
# 1291|   	LIBURING_NOEXCEPT
# 1292|   {
# 1293|-> 	io_uring_prep_rw(IORING_OP_PROVIDE_BUFFERS, sqe, nr, addr, (__u32) len,
# 1294|   				(__u64) bid);
# 1295|   	sqe->buf_group = (__u16) bgid;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def73]
liburing-2.13/src/include/liburing.h:1532:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
liburing-2.13/test/bind-listen.c:443:12: enter_function: entry to ‘test_bad_sockname’
liburing-2.13/test/bind-listen.c:459:12: branch_false: following ‘false’ branch (when ‘err >= 0’)...
liburing-2.13/test/bind-listen.c:464:16: branch_false: ...to here
liburing-2.13/test/bind-listen.c:465:12: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
liburing-2.13/test/bind-listen.c:470:15: branch_false: ...to here
liburing-2.13/test/bind-listen.c:471:12: branch_false: following ‘false’ branch...
liburing-2.13/test/bind-listen.c:479:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_bad_sockname’
liburing-2.13/test/bind-listen.c:479:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_bad_sockname’
liburing-2.13/test/bind-listen.c:481:9: call_function: inlined call to ‘io_uring_prep_cmd_getsockname’ from ‘test_bad_sockname’
# 1530|   	LIBURING_NOEXCEPT
# 1531|   {
# 1532|-> 	sqe->opcode = (__u8) op;
# 1533|   	sqe->fd = fd;
# 1534|   	sqe->cmd_op = cmd_op;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def74]
liburing-2.13/src/include/liburing.h:1691:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(".short-read", 0)’
liburing-2.13/test/short-read.c:18:5: enter_function: entry to ‘main’
liburing-2.13/test/short-read.c:26:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/short-read.c:29:24: branch_false: ...to here
liburing-2.13/test/short-read.c:34:14: acquire_resource: opened here
liburing-2.13/test/short-read.c:38:12: branch_false: following ‘false’ branch...
liburing-2.13/test/short-read.c:43:15: branch_false: ...to here
liburing-2.13/test/short-read.c:44:12: branch_false: following ‘false’ branch...
liburing-2.13/test/short-read.c:49:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/short-read.c:49:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/src/include/liburing.h:1691:13: danger: ‘open(".short-read", 0)’ leaks here; was opened at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
# 1689|   	 * non-SQPOLL since then we drive updates.
# 1690|   	 */
# 1691|-> 	if (ring->flags & IORING_SETUP_SQPOLL)
# 1692|   		return io_uring_smp_load_acquire(ring->sq.khead);
# 1693|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def75]
liburing-2.13/src/include/liburing.h:1691:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(".sync_file_range", 2)’
liburing-2.13/test/fsync.c:146:12: enter_function: entry to ‘test_sync_file_range’
liburing-2.13/test/fsync.c:154:14: acquire_resource: opened here
liburing-2.13/test/fsync.c:158:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fsync.c:163:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_sync_file_range’
liburing-2.13/test/fsync.c:163:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_sync_file_range’
liburing-2.13/src/include/liburing.h:1691:13: danger: ‘open(".sync_file_range", 2)’ leaks here; was opened at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
# 1689|   	 * non-SQPOLL since then we drive updates.
# 1690|   	 */
# 1691|-> 	if (ring->flags & IORING_SETUP_SQPOLL)
# 1692|   		return io_uring_smp_load_acquire(ring->sq.khead);
# 1693|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def76]
liburing-2.13/src/include/liburing.h:1691:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(".test_fpos_read", 0)’
liburing-2.13/test/fpos.c:225:5: enter_function: entry to ‘main’
liburing-2.13/test/fpos.c:230:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/fpos.c:233:15: branch_false: ...to here
liburing-2.13/test/fpos.c:234:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fpos.c:234:12: branch_false: ...to here
liburing-2.13/test/fpos.c:239:28: branch_true: following ‘true’ branch (when ‘test != 8’)...
liburing-2.13/test/fpos.c:240:21: branch_true: ...to here
liburing-2.13/test/fpos.c:242:33: branch_false: following ‘false’ branch...
liburing-2.13/test/fpos.c:242:33: branch_false: ...to here
liburing-2.13/test/fpos.c:244:23: branch_false: following ‘false’ branch (when ‘write == 0’)...
liburing-2.13/test/fpos.c:246:27: branch_false: ...to here
liburing-2.13/test/fpos.c:246:27: call_function: calling ‘test_read’ from ‘main’
# 1689|   	 * non-SQPOLL since then we drive updates.
# 1690|   	 */
# 1691|-> 	if (ring->flags & IORING_SETUP_SQPOLL)
# 1692|   		return io_uring_smp_load_acquire(ring->sq.khead);
# 1693|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def77]
liburing-2.13/src/include/liburing.h:1691:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/tmp", 65536)’
liburing-2.13/test/lfs-openat-write.c:97:5: enter_function: entry to ‘main’
liburing-2.13/test/lfs-openat-write.c:102:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/lfs-openat-write.c:105:15: branch_false: ...to here
liburing-2.13/test/lfs-openat-write.c:105:15: acquire_resource: opened here
liburing-2.13/test/lfs-openat-write.c:106:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat-write.c:109:15: branch_false: ...to here
liburing-2.13/test/lfs-openat-write.c:110:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat-write.c:113:15: branch_false: ...to here
liburing-2.13/test/lfs-openat-write.c:113:15: call_function: calling ‘test_open_write’ from ‘main’
liburing-2.13/test/lfs-openat-write.c:113:15: return_function: returning to ‘main’ from ‘test_open_write’
liburing-2.13/test/lfs-openat-write.c:115:9: throw: if ‘io_uring_queue_exit’ throws an exception...
liburing-2.13/src/include/liburing.h:1691:13: danger: ‘open("/tmp", 65536)’ leaks here; was opened at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
# 1689|   	 * non-SQPOLL since then we drive updates.
# 1690|   	 */
# 1691|-> 	if (ring->flags & IORING_SETUP_SQPOLL)
# 1692|   		return io_uring_smp_load_acquire(ring->sq.khead);
# 1693|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def78]
liburing-2.13/src/include/liburing.h:1691:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 0)’
liburing-2.13/test/kallsyms.c:167:5: enter_function: entry to ‘main’
liburing-2.13/test/kallsyms.c:171:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/kallsyms.c:174:16: branch_false: ...to here
liburing-2.13/test/kallsyms.c:177:18: call_function: calling ‘has_nonvec_read’ from ‘main’
liburing-2.13/test/kallsyms.c:177:18: return_function: returning to ‘main’ from ‘has_nonvec_read’
liburing-2.13/test/kallsyms.c:179:12: branch_false: following ‘false’ branch...
liburing-2.13/test/kallsyms.c:185:15: branch_false: ...to here
liburing-2.13/test/kallsyms.c:185:15: call_function: calling ‘test_io’ from ‘main’
# 1689|   	 * non-SQPOLL since then we drive updates.
# 1690|   	 */
# 1691|-> 	if (ring->flags & IORING_SETUP_SQPOLL)
# 1692|   		return io_uring_smp_load_acquire(ring->sq.khead);
# 1693|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def79]
liburing-2.13/src/include/liburing.h:1691:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname, 16384)’
liburing-2.13/test/sqwait.c:42:5: enter_function: entry to ‘main’
liburing-2.13/test/sqwait.c:63:21: branch_true: following ‘true’ branch (when ‘i != 256’)...
liburing-2.13/test/sqwait.c:64:21: branch_true: ...to here
liburing-2.13/test/sqwait.c:64:21: branch_true: following ‘true’ branch...
liburing-2.13/test/sqwait.c:70:12: branch_false: following ‘false’ branch...
liburing-2.13/test/sqwait.c:78:14: branch_false: ...to here
liburing-2.13/test/sqwait.c:78:14: acquire_resource: opened here
liburing-2.13/test/sqwait.c:79:12: branch_false: following ‘false’ branch...
liburing-2.13/test/sqwait.c:79:12: branch_false: ...to here
liburing-2.13/test/sqwait.c:88:21: branch_true: following ‘true’ branch (when ‘i != 10000’)...
liburing-2.13/test/sqwait.c:91:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/sqwait.c:91:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/sqwait.c:92:20: branch_true: following ‘true’ branch...
liburing-2.13/test/sqwait.c:93:31: branch_true: ...to here
liburing-2.13/test/sqwait.c:93:31: call_function: calling ‘io_uring_sqring_wait’ from ‘main’
# 1689|   	 * non-SQPOLL since then we drive updates.
# 1690|   	 */
# 1691|-> 	if (ring->flags & IORING_SETUP_SQPOLL)
# 1692|   		return io_uring_smp_load_acquire(ring->sq.khead);
# 1693|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def80]
liburing-2.13/src/include/liburing.h:1691:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 0)’
liburing-2.13/test/statx.c:155:12: enter_function: entry to ‘test_statx_fd’
liburing-2.13/test/statx.c:162:14: acquire_resource: opened here
liburing-2.13/test/statx.c:163:12: branch_false: following ‘false’ branch...
liburing-2.13/test/statx.c:170:9: branch_false: ...to here
liburing-2.13/test/statx.c:172:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_statx_fd’
liburing-2.13/test/statx.c:172:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_statx_fd’
liburing-2.13/src/include/liburing.h:1691:13: danger: ‘open(path, 0)’ leaks here; was opened at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
# 1689|   	 * non-SQPOLL since then we drive updates.
# 1690|   	 */
# 1691|-> 	if (ring->flags & IORING_SETUP_SQPOLL)
# 1692|   		return io_uring_smp_load_acquire(ring->sq.khead);
# 1693|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def81]
liburing-2.13/src/include/liburing.h:1821:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/thread-exit.c:72:5: enter_function: entry to ‘main’
liburing-2.13/test/thread-exit.c:81:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:86:15: branch_false: ...to here
liburing-2.13/test/thread-exit.c:87:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:92:12: branch_false: ...to here
liburing-2.13/test/thread-exit.c:104:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:111:9: branch_false: ...to here
liburing-2.13/test/thread-exit.c:116:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/thread-exit.c:117:17: branch_true: ...to here
liburing-2.13/test/thread-exit.c:116:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/thread-exit.c:117:17: branch_true: ...to here
liburing-2.13/test/thread-exit.c:124:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/thread-exit.c:127:23: branch_true: ...to here
liburing-2.13/test/thread-exit.c:127:23: call_function: calling ‘io_uring_wait_cqe’ from ‘main’
# 1819|   	LIBURING_NOEXCEPT
# 1820|   {
# 1821|-> 	return __io_uring_get_cqe(ring, cqe_ptr, 0, wait_nr, NULL);
# 1822|   }
# 1823|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
liburing-2.13/src/include/liburing.h:1821:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fds’
liburing-2.13/test/accept-non-empty.c:222:5: enter_function: entry to ‘main’
liburing-2.13/test/accept-non-empty.c:226:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/accept-non-empty.c:229:15: branch_false: ...to here
liburing-2.13/test/accept-non-empty.c:229:15: call_function: calling ‘test’ from ‘main’
# 1819|   	LIBURING_NOEXCEPT
# 1820|   {
# 1821|-> 	return __io_uring_get_cqe(ring, cqe_ptr, 0, wait_nr, NULL);
# 1822|   }
# 1823|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
liburing-2.13/src/include/liburing.h:1821:16: warning[-Wanalyzer-malloc-leak]: leak of ‘tags’
liburing-2.13/test/rsrc_tags.c:315:12: enter_function: entry to ‘test_files’
liburing-2.13/test/rsrc_tags.c:324:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/rsrc_tags.c:325:28: branch_true: ...to here
liburing-2.13/test/rsrc_tags.c:329:15: call_function: calling ‘test_tags_generic’ from ‘test_files’
# 1819|   	LIBURING_NOEXCEPT
# 1820|   {
# 1821|-> 	return __io_uring_get_cqe(ring, cqe_ptr, 0, wait_nr, NULL);
# 1822|   }
# 1823|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
liburing-2.13/src/include/liburing.h:1821:16: warning[-Wanalyzer-malloc-leak]: leak of ‘test_data’
liburing-2.13/test/recv-inc-ooo.c:253:12: enter_function: entry to ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:261:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/recv-inc-ooo.c:263:17: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:263:17: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/recv-inc-ooo.c:268:15: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:268:15: call_function: calling ‘setup_buf_ring’ from ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:268:15: return_function: returning to ‘test_recv_incr’ from ‘setup_buf_ring’
liburing-2.13/test/recv-inc-ooo.c:269:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-inc-ooo.c:271:17: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:271:17: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-inc-ooo.c:276:15: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:277:9: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-inc-ooo.c:279:13: branch_true: ...to here
liburing-2.13/test/recv-inc-ooo.c:285:36: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:285:36: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:296:30: acquire_memory: allocated here
liburing-2.13/test/recv-inc-ooo.c:297:25: branch_true: following ‘true’ branch (when ‘i != 2048’)...
liburing-2.13/test/recv-inc-ooo.c:298:26: branch_true: ...to here
liburing-2.13/test/recv-inc-ooo.c:297:25: branch_true: following ‘true’ branch (when ‘i != 2048’)...
liburing-2.13/test/recv-inc-ooo.c:298:26: branch_true: ...to here
liburing-2.13/test/recv-inc-ooo.c:310:28: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/test/recv-inc-ooo.c:311:24: branch_true: ...to here
liburing-2.13/test/recv-inc-ooo.c:317:17: call_function: calling ‘write_all’ from ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:317:17: return_function: returning to ‘test_recv_incr’ from ‘write_all’
liburing-2.13/test/recv-inc-ooo.c:323:24: branch_true: following ‘true’ branch (when ‘remaining_chunk_len != 0’)...
liburing-2.13/test/recv-inc-ooo.c:325:31: branch_true: ...to here
liburing-2.13/test/recv-inc-ooo.c:325:31: call_function: calling ‘io_uring_wait_cqe’ from ‘test_recv_incr’
# 1819|   	LIBURING_NOEXCEPT
# 1820|   {
# 1821|-> 	return __io_uring_get_cqe(ring, cqe_ptr, 0, wait_nr, NULL);
# 1822|   }
# 1823|   

Error: GCC_ANALYZER_WARNING: [#def85]
liburing-2.13/test/232c93d07b74.c:95:15: warning[-Wanalyzer-fd-use-without-check]: ‘listen’ on possibly invalid file descriptor ‘s0’
liburing-2.13/test/232c93d07b74.c:67:12: branch_true: following ‘true’ branch...
liburing-2.13/test/232c93d07b74.c:68:26: branch_true: ...to here
liburing-2.13/test/232c93d07b74.c:72:17: branch_true: following ‘true’ branch (when ‘res != -1’)...
liburing-2.13/test/232c93d07b74.c:73:23: branch_true: ...to here
liburing-2.13/test/232c93d07b74.c:74:17: branch_true: following ‘true’ branch (when ‘res != -1’)...
liburing-2.13/test/232c93d07b74.c:78:17: branch_true: ...to here
liburing-2.13/test/232c93d07b74.c:81:17: branch_true: following ‘true’ branch...
liburing-2.13/test/232c93d07b74.c:82:32: branch_true: ...to here
liburing-2.13/test/232c93d07b74.c:95:15: danger: ‘s0’ could be invalid
#   93|   		assert(res != -1);
#   94|   	}
#   95|-> 	res = listen(s0, 128);
#   96|   	assert(res != -1);
#   97|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def86]
liburing-2.13/test/232c93d07b74.c:201:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s0’
liburing-2.13/test/232c93d07b74.c:178:12: branch_false: following ‘false’ branch...
liburing-2.13/test/232c93d07b74.c:193:22: branch_false: ...to here
liburing-2.13/test/232c93d07b74.c:193:22: acquire_resource: socket created here
liburing-2.13/test/232c93d07b74.c:194:17: branch_true: following ‘true’ branch (when ‘s0 != -1’)...
liburing-2.13/test/232c93d07b74.c:197:17: branch_true: ...to here
liburing-2.13/test/232c93d07b74.c:201:23: throw: if ‘connect’ throws an exception...
liburing-2.13/test/232c93d07b74.c:201:23: danger: ‘s0’ leaks here
#  199|   		addr.sun_family = AF_UNIX;
#  200|   		memcpy(addr.sun_path, "\0sock", 6);
#  201|-> 		ret = connect(s0, (struct sockaddr*) &addr, sizeof(addr));
#  202|   		assert(ret != -1);
#  203|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def87]
liburing-2.13/test/35fa71a030ca.c:133:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 524289)’
liburing-2.13/test/35fa71a030ca.c:241:13: enter_function: entry to ‘loop’
liburing-2.13/test/35fa71a030ca.c:245:8: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
liburing-2.13/test/35fa71a030ca.c:247:8: branch_false: ...to here
liburing-2.13/test/35fa71a030ca.c:248:7: call_function: calling ‘setup_test’ from ‘loop’
#  131|     if (fd == -1)
#  132|       return false;
#  133|->   if (write(fd, buf, len) != len) {
#  134|       int err = errno;
#  135|       close(fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
liburing-2.13/test/35fa71a030ca.c:156:28: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/sys/fs/fuse/connections")’
liburing-2.13/test/35fa71a030ca.c:241:13: enter_function: entry to ‘loop’
liburing-2.13/test/35fa71a030ca.c:245:8: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
liburing-2.13/test/35fa71a030ca.c:247:8: branch_false: ...to here
liburing-2.13/test/35fa71a030ca.c:247:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
liburing-2.13/test/35fa71a030ca.c:252:9: branch_false: ...to here
liburing-2.13/test/35fa71a030ca.c:253:22: call_function: calling ‘current_time_ms’ from ‘loop’
liburing-2.13/test/35fa71a030ca.c:253:22: return_function: returning to ‘loop’ from ‘current_time_ms’
liburing-2.13/test/35fa71a030ca.c:258:11: call_function: calling ‘current_time_ms’ from ‘loop’
liburing-2.13/test/35fa71a030ca.c:258:11: return_function: returning to ‘loop’ from ‘current_time_ms’
liburing-2.13/test/35fa71a030ca.c:260:7: call_function: calling ‘kill_and_wait’ from ‘loop’
#  154|     if (dir) {
#  155|       for (;;) {
#  156|->       struct dirent* ent = readdir(dir);
#  157|         if (!ent)
#  158|           break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def89]
liburing-2.13/test/35fa71a030ca.c:168:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&abort, 1)’
liburing-2.13/test/35fa71a030ca.c:241:13: enter_function: entry to ‘loop’
liburing-2.13/test/35fa71a030ca.c:245:8: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
liburing-2.13/test/35fa71a030ca.c:247:8: branch_false: ...to here
liburing-2.13/test/35fa71a030ca.c:247:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
liburing-2.13/test/35fa71a030ca.c:252:9: branch_false: ...to here
liburing-2.13/test/35fa71a030ca.c:253:22: call_function: calling ‘current_time_ms’ from ‘loop’
liburing-2.13/test/35fa71a030ca.c:253:22: return_function: returning to ‘loop’ from ‘current_time_ms’
liburing-2.13/test/35fa71a030ca.c:258:11: call_function: calling ‘current_time_ms’ from ‘loop’
liburing-2.13/test/35fa71a030ca.c:258:11: return_function: returning to ‘loop’ from ‘current_time_ms’
liburing-2.13/test/35fa71a030ca.c:260:7: call_function: calling ‘kill_and_wait’ from ‘loop’
#  166|           continue;
#  167|         }
#  168|->       if (write(fd, abort, 1) < 0) {
#  169|         }
#  170|         close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def90]
liburing-2.13/test/35fa71a030ca.c:170:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&abort, 1)’
liburing-2.13/test/35fa71a030ca.c:241:13: enter_function: entry to ‘loop’
liburing-2.13/test/35fa71a030ca.c:245:8: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
liburing-2.13/test/35fa71a030ca.c:247:8: branch_false: ...to here
liburing-2.13/test/35fa71a030ca.c:247:8: branch_false: following ‘false’ branch (when ‘pid != 0’)...
liburing-2.13/test/35fa71a030ca.c:252:9: branch_false: ...to here
liburing-2.13/test/35fa71a030ca.c:253:22: call_function: calling ‘current_time_ms’ from ‘loop’
liburing-2.13/test/35fa71a030ca.c:253:22: return_function: returning to ‘loop’ from ‘current_time_ms’
liburing-2.13/test/35fa71a030ca.c:258:11: call_function: calling ‘current_time_ms’ from ‘loop’
liburing-2.13/test/35fa71a030ca.c:258:11: return_function: returning to ‘loop’ from ‘current_time_ms’
liburing-2.13/test/35fa71a030ca.c:260:7: call_function: calling ‘kill_and_wait’ from ‘loop’
#  168|         if (write(fd, abort, 1) < 0) {
#  169|         }
#  170|->       close(fd);
#  171|       }
#  172|       closedir(dir);

Error: GCC_ANALYZER_WARNING (CWE-479): [#def91]
liburing-2.13/test/35fa71a030ca.c:316:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
liburing-2.13/test/35fa71a030ca.c:319:5: enter_function: entry to ‘main’
liburing-2.13/test/35fa71a030ca.c:321:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/35fa71a030ca.c:323:9: branch_false: ...to here
liburing-2.13/test/35fa71a030ca.c:316:9: danger: call to ‘exit’ from within signal handler
#  314|   static void sig_int(int sig)
#  315|   {
#  316|-> 	exit(0);
#  317|   }
#  318|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def92]
liburing-2.13/test/a4c0b3decb33.c:53:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 524289)’
liburing-2.13/test/a4c0b3decb33.c:50:18: acquire_resource: opened here
liburing-2.13/test/a4c0b3decb33.c:51:12: branch_false: following ‘false’ branch...
liburing-2.13/test/a4c0b3decb33.c:53:13: branch_false: ...to here
liburing-2.13/test/a4c0b3decb33.c:53:13: throw: if ‘write’ throws an exception...
liburing-2.13/test/a4c0b3decb33.c:53:13: danger: ‘open(file, 524289)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   51|   	if (fd == -1)
#   52|   		return false;
#   53|-> 	if (write(fd, buf, len) != len) {
#   54|   		int err = errno;
#   55|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
liburing-2.13/test/a4c0b3decb33.c:76:46: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/sys/fs/fuse/connections")’
liburing-2.13/test/a4c0b3decb33.c:68:21: branch_true: following ‘true’ branch (when ‘i != 100’)...
liburing-2.13/test/a4c0b3decb33.c:69:21: branch_true: ...to here
liburing-2.13/test/a4c0b3decb33.c:69:20: branch_false: following ‘false’ branch...
liburing-2.13/test/a4c0b3decb33.c:71:17: branch_false: ...to here
liburing-2.13/test/a4c0b3decb33.c:69:20: branch_false: following ‘false’ branch...
liburing-2.13/test/a4c0b3decb33.c:71:17: branch_false: ...to here
liburing-2.13/test/a4c0b3decb33.c:73:20: acquire_memory: allocated here
liburing-2.13/test/a4c0b3decb33.c:74:12: branch_true: following ‘true’ branch...
liburing-2.13/test/a4c0b3decb33.c:74:12: branch_true: ...to here
liburing-2.13/test/a4c0b3decb33.c:76:46: throw: if ‘readdir’ throws an exception...
liburing-2.13/test/a4c0b3decb33.c:76:46: danger: ‘opendir("/sys/fs/fuse/connections")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#   74|   	if (dir) {
#   75|   		for (;;) {
#   76|-> 			struct dirent* ent = readdir(dir);
#   77|   			if (!ent)
#   78|   				break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def94]
liburing-2.13/test/a4c0b3decb33.c:88:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&abort, 1)’
liburing-2.13/test/a4c0b3decb33.c:68:21: branch_true: following ‘true’ branch (when ‘i != 100’)...
liburing-2.13/test/a4c0b3decb33.c:69:21: branch_true: ...to here
liburing-2.13/test/a4c0b3decb33.c:69:20: branch_false: following ‘false’ branch...
liburing-2.13/test/a4c0b3decb33.c:71:17: branch_false: ...to here
liburing-2.13/test/a4c0b3decb33.c:69:20: branch_false: following ‘false’ branch...
liburing-2.13/test/a4c0b3decb33.c:71:17: branch_false: ...to here
liburing-2.13/test/a4c0b3decb33.c:74:12: branch_true: following ‘true’ branch...
liburing-2.13/test/a4c0b3decb33.c:74:12: branch_true: ...to here
liburing-2.13/test/a4c0b3decb33.c:77:28: branch_false: following ‘false’ branch...
liburing-2.13/test/a4c0b3decb33.c:79:36: branch_false: ...to here
liburing-2.13/test/a4c0b3decb33.c:84:34: acquire_resource: opened here
liburing-2.13/test/a4c0b3decb33.c:88:29: throw: if ‘write’ throws an exception...
liburing-2.13/test/a4c0b3decb33.c:88:29: danger: ‘open(&abort, 1)’ leaks here; was opened at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
#   86|   				continue;
#   87|   			}
#   88|-> 			if (write(fd, abort, 1) < 0) {
#   89|   			}
#   90|   			close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def95]
liburing-2.13/test/a4c0b3decb33.c:90:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&abort, 1)’
liburing-2.13/test/a4c0b3decb33.c:68:21: branch_true: following ‘true’ branch (when ‘i != 100’)...
liburing-2.13/test/a4c0b3decb33.c:69:21: branch_true: ...to here
liburing-2.13/test/a4c0b3decb33.c:69:20: branch_false: following ‘false’ branch...
liburing-2.13/test/a4c0b3decb33.c:71:17: branch_false: ...to here
liburing-2.13/test/a4c0b3decb33.c:69:20: branch_false: following ‘false’ branch...
liburing-2.13/test/a4c0b3decb33.c:71:17: branch_false: ...to here
liburing-2.13/test/a4c0b3decb33.c:74:12: branch_true: following ‘true’ branch...
liburing-2.13/test/a4c0b3decb33.c:74:12: branch_true: ...to here
liburing-2.13/test/a4c0b3decb33.c:77:28: branch_false: following ‘false’ branch...
liburing-2.13/test/a4c0b3decb33.c:79:36: branch_false: ...to here
liburing-2.13/test/a4c0b3decb33.c:84:34: acquire_resource: opened here
liburing-2.13/test/a4c0b3decb33.c:90:25: danger: ‘open(&abort, 1)’ leaks here; was opened at [(11)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/10)
#   88|   			if (write(fd, abort, 1) < 0) {
#   89|   			}
#   90|-> 			close(fd);
#   91|   		}
#   92|   		closedir(dir);

Error: GCC_ANALYZER_WARNING (CWE-479): [#def96]
liburing-2.13/test/a4c0b3decb33.c:171:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
liburing-2.13/test/a4c0b3decb33.c:174:5: enter_function: entry to ‘main’
liburing-2.13/test/a4c0b3decb33.c:176:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/a4c0b3decb33.c:178:9: branch_false: ...to here
liburing-2.13/test/a4c0b3decb33.c:169:13: enter_function: entry to ‘sig_int’
liburing-2.13/test/a4c0b3decb33.c:171:9: danger: call to ‘exit’ from within signal handler
#  169|   static void sig_int(int sig)
#  170|   {
#  171|-> 	exit(0);
#  172|   }
#  173|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def97]
liburing-2.13/test/accept-link.c:71:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s0’
liburing-2.13/test/accept-link.c:62:18: acquire_resource: stream socket created here
liburing-2.13/test/accept-link.c:63:9: branch_true: following ‘true’ branch (when ‘s0 != -1’)...
liburing-2.13/test/accept-link.c:67:9: branch_true: ...to here
liburing-2.13/test/accept-link.c:71:15: throw: if ‘connect’ throws an exception...
liburing-2.13/test/accept-link.c:71:15: danger: ‘s0’ leaks here
#   69|   	addr.sin_addr.s_addr = data->addr;
#   70|   
#   71|-> 	ret = connect(s0, (struct sockaddr*)&addr, sizeof(addr));
#   72|   	assert(ret != -1);
#   73|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def98]
liburing-2.13/test/accept-non-empty.c:43:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘start_accept_listen(0, 0)’
liburing-2.13/test/accept-non-empty.c:222:5: enter_function: entry to ‘main’
liburing-2.13/test/accept-non-empty.c:226:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/accept-non-empty.c:229:15: branch_false: ...to here
liburing-2.13/test/accept-non-empty.c:229:15: call_function: calling ‘test’ from ‘main’
#   41|   	int fd, ret;
#   42|   
#   43|-> 	fd = socket(AF_INET, SOCK_STREAM | extra_flags, IPPROTO_TCP);
#   44|   
#   45|   	ret = setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &val, sizeof(val));

Error: GCC_ANALYZER_WARNING: [#def99]
liburing-2.13/test/accept-non-empty.c:56:15: warning[-Wanalyzer-fd-use-without-check]: ‘listen’ on possibly invalid file descriptor ‘fd’
liburing-2.13/test/accept-non-empty.c:196:12: enter_function: entry to ‘test’
liburing-2.13/test/accept-non-empty.c:202:15: call_function: calling ‘test_maccept’ from ‘test’
#   54|   	ret = bind(fd, (struct sockaddr *) &addr, sizeof(addr));
#   55|   	assert(ret != -1);
#   56|-> 	ret = listen(fd, 20000);
#   57|   	assert(ret != -1);
#   58|   

Error: CPPCHECK_WARNING (CWE-476): [#def100]
liburing-2.13/test/accept-non-empty.c:127: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fds
#  125|   
#  126|   	fds = malloc(MAX_ACCEPTS * sizeof(int));
#  127|-> 	memset(fds, -1, MAX_ACCEPTS * sizeof(int));
#  128|   
#  129|   	if (fixed) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def101]
liburing-2.13/test/accept-non-empty.c:127:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fds’ where non-null expected
liburing-2.13/test/accept-non-empty.c:196:12: enter_function: entry to ‘test’
liburing-2.13/test/accept-non-empty.c:202:15: call_function: calling ‘test_maccept’ from ‘test’
#  125|   
#  126|   	fds = malloc(MAX_ACCEPTS * sizeof(int));
#  127|-> 	memset(fds, -1, MAX_ACCEPTS * sizeof(int));
#  128|   
#  129|   	if (fixed) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
liburing-2.13/test/accept-non-empty.c:130:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fds’
liburing-2.13/test/accept-non-empty.c:196:12: enter_function: entry to ‘test’
liburing-2.13/test/accept-non-empty.c:202:15: call_function: calling ‘test_maccept’ from ‘test’
#  128|   
#  129|   	if (fixed) {
#  130|-> 		io_uring_register_ring_fd(&ring);
#  131|   
#  132|   		ret = io_uring_register_files(&ring, fds, MAX_ACCEPTS);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
liburing-2.13/test/accept-non-empty.c:132:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fds’
liburing-2.13/test/accept-non-empty.c:196:12: enter_function: entry to ‘test’
liburing-2.13/test/accept-non-empty.c:202:15: call_function: calling ‘test_maccept’ from ‘test’
#  130|   		io_uring_register_ring_fd(&ring);
#  131|   
#  132|-> 		ret = io_uring_register_files(&ring, fds, MAX_ACCEPTS);
#  133|   		if (ret) {
#  134|   			fprintf(stderr, "file reg %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
liburing-2.13/test/accept-non-empty.c:153:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fds’
liburing-2.13/test/accept-non-empty.c:196:12: enter_function: entry to ‘test’
liburing-2.13/test/accept-non-empty.c:202:15: call_function: calling ‘test_maccept’ from ‘test’
#  151|   			io_uring_prep_accept(sqe, fd, NULL, NULL, 0);
#  152|   
#  153|-> 		ret = io_uring_submit_and_wait(&ring, 1);
#  154|   		assert(ret != -1);
#  155|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
liburing-2.13/test/accept-non-empty.c:185:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fds’
liburing-2.13/test/accept-non-empty.c:222:5: enter_function: entry to ‘main’
liburing-2.13/test/accept-non-empty.c:226:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/accept-non-empty.c:229:15: branch_false: ...to here
liburing-2.13/test/accept-non-empty.c:229:15: call_function: calling ‘test’ from ‘main’
#  183|   	}
#  184|   
#  185|-> 	close(fd);
#  186|   	if (!fixed) {
#  187|   		for (i = 0; i < MAX_ACCEPTS; i++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
liburing-2.13/test/accept-non-empty.c:189:33: warning[-Wanalyzer-malloc-leak]: leak of ‘fds’
liburing-2.13/test/accept-non-empty.c:222:5: enter_function: entry to ‘main’
liburing-2.13/test/accept-non-empty.c:226:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/accept-non-empty.c:229:15: branch_false: ...to here
liburing-2.13/test/accept-non-empty.c:229:15: call_function: calling ‘test’ from ‘main’
#  187|   		for (i = 0; i < MAX_ACCEPTS; i++)
#  188|   			if (fds[i] != -1)
#  189|-> 				close(fds[i]);
#  190|   	}
#  191|   	free(fds);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def107]
liburing-2.13/test/accept-reuse.c:103:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ret’
liburing-2.13/test/accept-reuse.c:44:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/accept-reuse.c:47:9: branch_false: ...to here
liburing-2.13/test/accept-reuse.c:49:12: branch_false: following ‘false’ branch...
liburing-2.13/test/accept-reuse.c:53:15: branch_false: ...to here
liburing-2.13/test/accept-reuse.c:53:12: branch_false: following ‘false’ branch...
liburing-2.13/test/accept-reuse.c:58:9: branch_false: ...to here
liburing-2.13/test/accept-reuse.c:64:12: branch_false: following ‘false’ branch...
liburing-2.13/test/accept-reuse.c:69:14: branch_false: ...to here
liburing-2.13/test/accept-reuse.c:69:35: branch_true: following ‘true’ branch (when ‘ai’ is non-NULL)...
liburing-2.13/test/accept-reuse.c:70:21: branch_true: ...to here
liburing-2.13/test/accept-reuse.c:75:12: branch_false: following ‘false’ branch (when ‘addr_info’ is non-NULL)...
liburing-2.13/test/accept-reuse.c:80:9: branch_false: ...to here
liburing-2.13/test/accept-reuse.c:83:15: acquire_resource: stream socket created here
liburing-2.13/test/accept-reuse.c:85:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/accept-reuse.c:91:9: branch_false: ...to here
liburing-2.13/test/accept-reuse.c:96:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/accept-reuse.c:101:15: branch_false: ...to here
liburing-2.13/test/accept-reuse.c:102:12: branch_true: following ‘true’ branch (when ‘ret < 0’)...
liburing-2.13/test/accept-reuse.c:103:17: branch_true: ...to here
liburing-2.13/test/accept-reuse.c:103:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/accept-reuse.c:103:17: danger: ‘ret’ leaks here
#  101|   	ret = listen(listen_fd, SOMAXCONN);
#  102|   	if (ret < 0) {
#  103|-> 		perror("listen");
#  104|   		return T_EXIT_FAIL;
#  105|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def108]
liburing-2.13/test/accept.c:186:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘start_accept_listen(&addr, 0,  <unknown>)’
liburing-2.13/test/accept.c:676:12: enter_function: entry to ‘test_accept_fixed’
liburing-2.13/test/accept.c:685:9: branch_true: following ‘true’ branch...
liburing-2.13/test/accept.c:686:15: branch_true: ...to here
liburing-2.13/test/accept.c:687:12: branch_false: following ‘false’ branch...
liburing-2.13/test/accept.c:693:15: branch_false: ...to here
liburing-2.13/test/accept.c:693:15: call_function: calling ‘test’ from ‘test_accept_fixed’
#  184|   	int fd, ret;
#  185|   
#  186|-> 	fd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC | extra_flags,
#  187|   		    IPPROTO_TCP);
#  188|   

Error: GCC_ANALYZER_WARNING: [#def109]
liburing-2.13/test/accept.c:204:15: warning[-Wanalyzer-fd-use-without-check]: ‘listen’ on possibly invalid file descriptor ‘fd’
liburing-2.13/test/accept.c:676:12: enter_function: entry to ‘test_accept_fixed’
liburing-2.13/test/accept.c:685:9: branch_true: following ‘true’ branch...
liburing-2.13/test/accept.c:686:15: branch_true: ...to here
liburing-2.13/test/accept.c:687:12: branch_false: following ‘false’ branch...
liburing-2.13/test/accept.c:693:15: branch_false: ...to here
liburing-2.13/test/accept.c:693:15: call_function: calling ‘test’ from ‘test_accept_fixed’
#  202|   	ret = t_bind_ephemeral_port(fd, addr);
#  203|   	assert(!ret);
#  204|-> 	ret = listen(fd, 128);
#  205|   	assert(ret != -1);
#  206|   

Error: CPPCHECK_WARNING (CWE-909): [#def110]
liburing-2.13/test/bind-listen.c:134: error[uninitStructMember]: Uninitialized struct member: cqe.res
#  132|   		close(fd);
#  133|   	} else if (res < 0) {
#  134|-> 		fprintf(stderr, "getsockname server failed. %d\n", cqe->res);
#  135|   		return T_EXIT_FAIL;
#  136|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def111]
liburing-2.13/test/bind-listen.c:398:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
liburing-2.13/test/bind-listen.c:387:12: branch_false: following ‘false’ branch (when ‘err >= 0’)...
liburing-2.13/test/bind-listen.c:392:16: branch_false: ...to here
liburing-2.13/test/bind-listen.c:392:16: acquire_resource: stream socket created here
liburing-2.13/test/bind-listen.c:393:12: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
liburing-2.13/test/bind-listen.c:398:15: branch_false: ...to here
liburing-2.13/test/bind-listen.c:398:15: throw: if ‘t_bind_ephemeral_port’ throws an exception...
liburing-2.13/test/bind-listen.c:398:15: danger: ‘sock’ leaks here
#  396|   	}
#  397|   
#  398|-> 	err = t_bind_ephemeral_port(sock, &server_addr);
#  399|   	if (err) {
#  400|   		fprintf(stderr, "bind: %s\n", strerror(-err));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def112]
liburing-2.13/test/bind-listen.c:470:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
liburing-2.13/test/bind-listen.c:459:12: branch_false: following ‘false’ branch (when ‘err >= 0’)...
liburing-2.13/test/bind-listen.c:464:16: branch_false: ...to here
liburing-2.13/test/bind-listen.c:464:16: acquire_resource: stream socket created here
liburing-2.13/test/bind-listen.c:465:12: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
liburing-2.13/test/bind-listen.c:470:15: branch_false: ...to here
liburing-2.13/test/bind-listen.c:470:15: throw: if ‘t_bind_ephemeral_port’ throws an exception...
liburing-2.13/test/bind-listen.c:470:15: danger: ‘sock’ leaks here
#  468|   	}
#  469|   
#  470|-> 	err = t_bind_ephemeral_port(sock, &saddr);
#  471|   	if (err) {
#  472|   		fprintf(stderr, "bind: %s\n", strerror(-err));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def113]
liburing-2.13/test/buf-ring-nommap.c:65:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/buf-ring-nommap.c:38:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/buf-ring-nommap.c:41:13: branch_false: ...to here
liburing-2.13/test/buf-ring-nommap.c:41:13: branch_true: following ‘true’ branch...
liburing-2.13/test/buf-ring-nommap.c:41:13: branch_true: ...to here
liburing-2.13/test/buf-ring-nommap.c:48:12: branch_false: following ‘false’ branch...
liburing-2.13/test/buf-ring-nommap.c:57:13: branch_false: ...to here
liburing-2.13/test/buf-ring-nommap.c:57:12: branch_false: following ‘false’ branch...
liburing-2.13/test/buf-ring-nommap.c:65:15: branch_false: ...to here
liburing-2.13/test/buf-ring-nommap.c:65:15: throw: if ‘io_uring_register_buf_ring’ throws an exception...
liburing-2.13/test/buf-ring-nommap.c:65:15: danger: ‘fds[0]’ leaks here
#   63|   	ring_mask = io_uring_buf_ring_mask(1);
#   64|   
#   65|-> 	ret = io_uring_register_buf_ring(&ring, &reg, 0);
#   66|   	if (ret) {
#   67|   		if (ret == -EINVAL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def114]
liburing-2.13/test/buf-ring-nommap.c:65:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/buf-ring-nommap.c:38:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/buf-ring-nommap.c:41:13: branch_false: ...to here
liburing-2.13/test/buf-ring-nommap.c:41:13: branch_true: following ‘true’ branch...
liburing-2.13/test/buf-ring-nommap.c:41:13: branch_true: ...to here
liburing-2.13/test/buf-ring-nommap.c:48:12: branch_false: following ‘false’ branch...
liburing-2.13/test/buf-ring-nommap.c:57:13: branch_false: ...to here
liburing-2.13/test/buf-ring-nommap.c:57:12: branch_false: following ‘false’ branch...
liburing-2.13/test/buf-ring-nommap.c:65:15: branch_false: ...to here
liburing-2.13/test/buf-ring-nommap.c:65:15: throw: if ‘io_uring_register_buf_ring’ throws an exception...
liburing-2.13/test/buf-ring-nommap.c:65:15: danger: ‘fds[1]’ leaks here
#   63|   	ring_mask = io_uring_buf_ring_mask(1);
#   64|   
#   65|-> 	ret = io_uring_register_buf_ring(&ring, &reg, 0);
#   66|   	if (ret) {
#   67|   		if (ret == -EINVAL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def115]
liburing-2.13/test/buf-ring-nommap.c:84:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/buf-ring-nommap.c:38:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/buf-ring-nommap.c:41:13: branch_false: ...to here
liburing-2.13/test/buf-ring-nommap.c:41:13: branch_true: following ‘true’ branch...
liburing-2.13/test/buf-ring-nommap.c:41:13: branch_true: ...to here
liburing-2.13/test/buf-ring-nommap.c:48:12: branch_false: following ‘false’ branch...
liburing-2.13/test/buf-ring-nommap.c:57:13: branch_false: ...to here
liburing-2.13/test/buf-ring-nommap.c:57:12: branch_false: following ‘false’ branch...
liburing-2.13/test/buf-ring-nommap.c:65:15: branch_false: ...to here
liburing-2.13/test/buf-ring-nommap.c:66:12: branch_false: following ‘false’ branch...
liburing-2.13/test/buf-ring-nommap.c:76:25: branch_false: ...to here
liburing-2.13/test/buf-ring-nommap.c:79:12: branch_true: following ‘true’ branch (when ‘br == 18446744073709551615’)...
liburing-2.13/test/buf-ring-nommap.c:80:21: branch_true: ...to here
liburing-2.13/test/buf-ring-nommap.c:80:20: branch_false: following ‘false’ branch...
liburing-2.13/test/buf-ring-nommap.c:84:17: branch_false: ...to here
liburing-2.13/test/buf-ring-nommap.c:84:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/buf-ring-nommap.c:84:17: danger: ‘fds[0]’ leaks here
#   82|   			return T_EXIT_SKIP;
#   83|   		}
#   84|-> 		perror("mmap");
#   85|   		return T_EXIT_FAIL;
#   86|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def116]
liburing-2.13/test/buf-ring-nommap.c:84:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/buf-ring-nommap.c:38:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/buf-ring-nommap.c:41:13: branch_false: ...to here
liburing-2.13/test/buf-ring-nommap.c:41:13: branch_true: following ‘true’ branch...
liburing-2.13/test/buf-ring-nommap.c:41:13: branch_true: ...to here
liburing-2.13/test/buf-ring-nommap.c:48:12: branch_false: following ‘false’ branch...
liburing-2.13/test/buf-ring-nommap.c:57:13: branch_false: ...to here
liburing-2.13/test/buf-ring-nommap.c:57:12: branch_false: following ‘false’ branch...
liburing-2.13/test/buf-ring-nommap.c:65:15: branch_false: ...to here
liburing-2.13/test/buf-ring-nommap.c:66:12: branch_false: following ‘false’ branch...
liburing-2.13/test/buf-ring-nommap.c:76:25: branch_false: ...to here
liburing-2.13/test/buf-ring-nommap.c:79:12: branch_true: following ‘true’ branch (when ‘br == 18446744073709551615’)...
liburing-2.13/test/buf-ring-nommap.c:80:21: branch_true: ...to here
liburing-2.13/test/buf-ring-nommap.c:80:20: branch_false: following ‘false’ branch...
liburing-2.13/test/buf-ring-nommap.c:84:17: branch_false: ...to here
liburing-2.13/test/buf-ring-nommap.c:84:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/buf-ring-nommap.c:84:17: danger: ‘fds[1]’ leaks here
#   82|   			return T_EXIT_SKIP;
#   83|   		}
#   84|-> 		perror("mmap");
#   85|   		return T_EXIT_FAIL;
#   86|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
liburing-2.13/test/buf-ring.c:351:19: warning[-Wanalyzer-malloc-leak]: leak of ‘buffers’
liburing-2.13/test/buf-ring.c:307:12: branch_false: following ‘false’ branch...
liburing-2.13/test/buf-ring.c:309:17: branch_false: ...to here
liburing-2.13/test/buf-ring.c:309:17: branch_false: following ‘false’ branch...
liburing-2.13/test/buf-ring.c:312:12: branch_false: ...to here
liburing-2.13/test/buf-ring.c:314:20: branch_false: following ‘false’ branch...
liburing-2.13/test/buf-ring.c:347:19: branch_false: ...to here
liburing-2.13/test/buf-ring.c:347:19: acquire_memory: allocated here
liburing-2.13/test/buf-ring.c:348:12: branch_false: following ‘false’ branch (when ‘buffers’ is non-NULL)...
liburing-2.13/test/buf-ring.c:351:19: branch_false: ...to here
liburing-2.13/test/buf-ring.c:351:19: throw: if ‘open’ throws an exception...
liburing-2.13/test/buf-ring.c:351:19: danger: ‘buffers’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  349|   		return T_EXIT_SKIP;
#  350|   
#  351|-> 	read_fd = open("/dev/zero", O_RDONLY);
#  352|   	if (read_fd < 0)
#  353|   		return T_EXIT_SKIP;

Error: CPPCHECK_WARNING (CWE-401): [#def118]
liburing-2.13/test/buf-ring.c:353: error[memleak]: Memory leak: buffers
#  351|   	read_fd = open("/dev/zero", O_RDONLY);
#  352|   	if (read_fd < 0)
#  353|-> 		return T_EXIT_SKIP;
#  354|   
#  355|   	for (loop = 0; loop < loops; loop++) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def119]
liburing-2.13/test/connect.c:33:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘create_socket()’
liburing-2.13/test/connect.c:254:12: enter_function: entry to ‘test_connect_timeout’
liburing-2.13/test/connect.c:267:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:270:25: branch_false: ...to here
liburing-2.13/test/connect.c:270:25: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:270:25: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:271:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:274:25: branch_false: ...to here
liburing-2.13/test/connect.c:274:25: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
#   31|   	fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
#   32|   	if (fd == -1) {
#   33|-> 		perror("socket()");
#   34|   		return -1;
#   35|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def120]
liburing-2.13/test/connect.c:119:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘create_socket()’
liburing-2.13/test/connect.c:254:12: enter_function: entry to ‘test_connect_timeout’
liburing-2.13/test/connect.c:267:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:270:25: branch_false: ...to here
liburing-2.13/test/connect.c:270:25: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:270:25: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:271:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:274:25: branch_false: ...to here
liburing-2.13/test/connect.c:274:25: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:274:25: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:275:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:278:21: branch_false: ...to here
liburing-2.13/test/connect.c:278:21: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:278:21: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:279:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:282:13: branch_false: ...to here
liburing-2.13/test/connect.c:282:13: call_function: calling ‘configure_connect’ from ‘test_connect_timeout’
#  117|   	ret = setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &val, sizeof(val));
#  118|   	if (ret == -1) {
#  119|-> 		perror("setsockopt()");
#  120|   		return -1;
#  121|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def121]
liburing-2.13/test/connect.c:125:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘create_socket()’
liburing-2.13/test/connect.c:254:12: enter_function: entry to ‘test_connect_timeout’
liburing-2.13/test/connect.c:267:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:270:25: branch_false: ...to here
liburing-2.13/test/connect.c:270:25: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:270:25: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:271:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:274:25: branch_false: ...to here
liburing-2.13/test/connect.c:274:25: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:274:25: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:275:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:278:21: branch_false: ...to here
liburing-2.13/test/connect.c:278:21: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:278:21: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:279:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:282:13: branch_false: ...to here
liburing-2.13/test/connect.c:282:13: call_function: calling ‘configure_connect’ from ‘test_connect_timeout’
#  123|   	ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val));
#  124|   	if (ret == -1) {
#  125|-> 		perror("setsockopt()");
#  126|   		return -1;
#  127|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def122]
liburing-2.13/test/connect.c:359:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept_fd’
liburing-2.13/test/connect.c:254:12: enter_function: entry to ‘test_connect_timeout’
liburing-2.13/test/connect.c:267:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:270:25: branch_false: ...to here
liburing-2.13/test/connect.c:270:25: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:270:25: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:271:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:274:25: branch_false: ...to here
liburing-2.13/test/connect.c:274:25: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:274:25: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:275:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:278:21: branch_false: ...to here
liburing-2.13/test/connect.c:278:21: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:278:21: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:279:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:282:13: branch_false: ...to here
liburing-2.13/test/connect.c:359:17: throw: if ‘close’ throws an exception...
liburing-2.13/test/connect.c:359:17: danger: ‘accept_fd’ leaks here
#  357|   err:
#  358|   	if (connect_fd[0] != -1)
#  359|-> 		close(connect_fd[0]);
#  360|   	if (connect_fd[1] != -1)
#  361|   		close(connect_fd[1]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def123]
liburing-2.13/test/connect.c:359:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘create_socket()’
liburing-2.13/test/connect.c:254:12: enter_function: entry to ‘test_connect_timeout’
liburing-2.13/test/connect.c:267:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:270:25: branch_false: ...to here
liburing-2.13/test/connect.c:270:25: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:270:25: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:271:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:274:25: branch_false: ...to here
liburing-2.13/test/connect.c:274:25: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:274:25: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:275:12: branch_true: following ‘true’ branch...
liburing-2.13/test/connect.c:276:17: branch_true: ...to here
liburing-2.13/test/connect.c:359:17: danger: ‘create_socket()’ leaks here
#  357|   err:
#  358|   	if (connect_fd[0] != -1)
#  359|-> 		close(connect_fd[0]);
#  360|   	if (connect_fd[1] != -1)
#  361|   		close(connect_fd[1]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def124]
liburing-2.13/test/connect.c:361:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept_fd’
liburing-2.13/test/connect.c:254:12: enter_function: entry to ‘test_connect_timeout’
liburing-2.13/test/connect.c:267:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:270:25: branch_false: ...to here
liburing-2.13/test/connect.c:270:25: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:270:25: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:271:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:274:25: branch_false: ...to here
liburing-2.13/test/connect.c:274:25: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:274:25: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:275:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:278:21: branch_false: ...to here
liburing-2.13/test/connect.c:278:21: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:278:21: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:279:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:282:13: branch_false: ...to here
liburing-2.13/test/connect.c:360:12: branch_true: following ‘true’ branch...
liburing-2.13/test/connect.c:361:17: branch_true: ...to here
liburing-2.13/test/connect.c:361:17: throw: if ‘close’ throws an exception...
liburing-2.13/test/connect.c:361:17: danger: ‘accept_fd’ leaks here
#  359|   		close(connect_fd[0]);
#  360|   	if (connect_fd[1] != -1)
#  361|-> 		close(connect_fd[1]);
#  362|   		
#  363|   	if (accept_fd != -1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def125]
liburing-2.13/test/connect.c:361:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘create_socket()’
liburing-2.13/test/connect.c:254:12: enter_function: entry to ‘test_connect_timeout’
liburing-2.13/test/connect.c:267:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:270:25: branch_false: ...to here
liburing-2.13/test/connect.c:270:25: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:270:25: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:271:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:274:25: branch_false: ...to here
liburing-2.13/test/connect.c:274:25: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:274:25: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:275:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:278:21: branch_false: ...to here
liburing-2.13/test/connect.c:278:21: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:278:21: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:279:12: branch_true: following ‘true’ branch...
liburing-2.13/test/connect.c:280:17: branch_true: ...to here
liburing-2.13/test/connect.c:360:12: branch_true: following ‘true’ branch...
liburing-2.13/test/connect.c:361:17: branch_true: ...to here
liburing-2.13/test/connect.c:361:17: danger: ‘create_socket()’ leaks here
#  359|   		close(connect_fd[0]);
#  360|   	if (connect_fd[1] != -1)
#  361|-> 		close(connect_fd[1]);
#  362|   		
#  363|   	if (accept_fd != -1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def126]
liburing-2.13/test/connect.c:364:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept_fd’
liburing-2.13/test/connect.c:254:12: enter_function: entry to ‘test_connect_timeout’
liburing-2.13/test/connect.c:267:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:270:25: branch_false: ...to here
liburing-2.13/test/connect.c:270:25: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:270:25: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:271:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:274:25: branch_false: ...to here
liburing-2.13/test/connect.c:274:25: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:274:25: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:275:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:278:21: branch_false: ...to here
liburing-2.13/test/connect.c:278:21: call_function: calling ‘create_socket’ from ‘test_connect_timeout’
liburing-2.13/test/connect.c:278:21: return_function: returning to ‘test_connect_timeout’ from ‘create_socket’
liburing-2.13/test/connect.c:279:12: branch_false: following ‘false’ branch...
liburing-2.13/test/connect.c:282:13: branch_false: ...to here
liburing-2.13/test/connect.c:363:12: branch_true: following ‘true’ branch (when ‘accept_fd != -1’)...
liburing-2.13/test/connect.c:364:17: branch_true: ...to here
liburing-2.13/test/connect.c:364:17: throw: if ‘close’ throws an exception...
liburing-2.13/test/connect.c:364:17: danger: ‘accept_fd’ leaks here
#  362|   		
#  363|   	if (accept_fd != -1)
#  364|-> 		close(accept_fd);
#  365|   	return -1;
#  366|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def127]
liburing-2.13/test/coredump.c:33:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/coredump.c:28:12: branch_false: following ‘false’ branch...
liburing-2.13/test/coredump.c:33:9: branch_false: ...to here
liburing-2.13/test/coredump.c:33:9: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/coredump.c:33:9: danger: ‘fds[0]’ leaks here
#   31|   	}
#   32|   
#   33|-> 	io_uring_queue_init(8, &ring, 0);
#   34|   
#   35|   	sqe = io_uring_get_sqe(&ring);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def128]
liburing-2.13/test/coredump.c:33:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/coredump.c:28:12: branch_false: following ‘false’ branch...
liburing-2.13/test/coredump.c:33:9: branch_false: ...to here
liburing-2.13/test/coredump.c:33:9: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/coredump.c:33:9: danger: ‘fds[1]’ leaks here
#   31|   	}
#   32|   
#   33|-> 	io_uring_queue_init(8, &ring, 0);
#   34|   
#   35|   	sqe = io_uring_get_sqe(&ring);

Error: CPPCHECK_WARNING (CWE-476): [#def129]
liburing-2.13/test/coredump.c:41: error[nullPointer]: Null pointer dereference: ptr
#   39|   
#   40|   	io_uring_submit(&ring);
#   41|-> 	*ptr = 0;
#   42|   	exit(0);
#   43|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def130]
liburing-2.13/test/coredump.c:41:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
liburing-2.13/test/coredump.c:20:13: enter_function: entry to ‘test’
liburing-2.13/test/coredump.c:28:12: branch_false: following ‘false’ branch...
liburing-2.13/test/coredump.c:33:9: branch_false: ...to here
liburing-2.13/test/coredump.c:35:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test’
liburing-2.13/test/coredump.c:35:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test’
liburing-2.13/test/coredump.c:41:9: danger: dereference of NULL ‘0’
#   39|   
#   40|   	io_uring_submit(&ring);
#   41|-> 	*ptr = 0;
#   42|   	exit(0);
#   43|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def131]
liburing-2.13/test/d4ae271dfaae.c:56:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/test/d4ae271dfaae.c:33:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/d4ae271dfaae.c:35:17: branch_false: ...to here
liburing-2.13/test/d4ae271dfaae.c:35:17: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/d4ae271dfaae.c:38:12: branch_false: ...to here
liburing-2.13/test/d4ae271dfaae.c:45:14: acquire_resource: opened here
liburing-2.13/test/d4ae271dfaae.c:49:12: branch_false: following ‘false’ branch...
liburing-2.13/test/d4ae271dfaae.c:56:18: branch_false: ...to here
liburing-2.13/test/d4ae271dfaae.c:56:18: throw: if ‘t_calloc’ throws an exception...
liburing-2.13/test/d4ae271dfaae.c:56:18: danger: ‘fd’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   54|   	}
#   55|   
#   56|-> 	iovecs = t_calloc(10, sizeof(struct iovec));
#   57|   	for (i = 0; i < 10; i++) {
#   58|   		t_posix_memalign(&buf, 4096, 4096);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def132]
liburing-2.13/test/d4ae271dfaae.c:58:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/test/d4ae271dfaae.c:33:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/d4ae271dfaae.c:35:17: branch_false: ...to here
liburing-2.13/test/d4ae271dfaae.c:35:17: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/d4ae271dfaae.c:38:12: branch_false: ...to here
liburing-2.13/test/d4ae271dfaae.c:45:14: acquire_resource: opened here
liburing-2.13/test/d4ae271dfaae.c:49:12: branch_false: following ‘false’ branch...
liburing-2.13/test/d4ae271dfaae.c:56:18: branch_false: ...to here
liburing-2.13/test/d4ae271dfaae.c:57:21: branch_true: following ‘true’ branch (when ‘i != 10’)...
liburing-2.13/test/d4ae271dfaae.c:58:17: branch_true: ...to here
liburing-2.13/test/d4ae271dfaae.c:58:17: throw: if ‘t_posix_memalign’ throws an exception...
liburing-2.13/test/d4ae271dfaae.c:58:17: danger: ‘fd’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   56|   	iovecs = t_calloc(10, sizeof(struct iovec));
#   57|   	for (i = 0; i < 10; i++) {
#   58|-> 		t_posix_memalign(&buf, 4096, 4096);
#   59|   		iovecs[i].iov_base = buf;
#   60|   		iovecs[i].iov_len = 4096;

Error: GCC_ANALYZER_WARNING (CWE-479): [#def133]
liburing-2.13/test/d77a67ed5f27.c:13:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
liburing-2.13/test/d77a67ed5f27.c:16:5: enter_function: entry to ‘main’
liburing-2.13/test/d77a67ed5f27.c:24:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/d77a67ed5f27.c:27:9: branch_false: ...to here
liburing-2.13/test/d77a67ed5f27.c:10:13: enter_function: entry to ‘sig_alrm’
liburing-2.13/test/d77a67ed5f27.c:13:9: danger: call to ‘exit’ from within signal handler
#   11|   {
#   12|   	fprintf(stderr, "Timed out!\n");
#   13|-> 	exit(1);
#   14|   }
#   15|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def134]
liburing-2.13/test/defer-taskrun.c:221:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/test/defer-taskrun.c:180:9: branch_false: following ‘false’ branch (when ‘fork_pid >= 0’)...
liburing-2.13/test/defer-taskrun.c:181:12: branch_false: ...to here
liburing-2.13/test/defer-taskrun.c:181:12: branch_false: following ‘false’ branch (when ‘fork_pid == 0’)...
liburing-2.13/test/defer-taskrun.c:192:15: branch_false: ...to here
liburing-2.13/test/defer-taskrun.c:194:12: branch_false: following ‘false’ branch...
liburing-2.13/test/defer-taskrun.c:197:12: branch_false: ...to here
liburing-2.13/test/defer-taskrun.c:197:12: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
liburing-2.13/test/defer-taskrun.c:198:22: branch_true: ...to here
liburing-2.13/test/defer-taskrun.c:198:22: acquire_resource: opened here
liburing-2.13/test/defer-taskrun.c:199:20: branch_false: following ‘false’ branch...
liburing-2.13/test/defer-taskrun.c:211:9: branch_false: ...to here
liburing-2.13/test/defer-taskrun.c:221:1: danger: ‘fd’ leaks here; was opened at [(9)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/8)
#  219|   	fprintf(stderr, "execve failed %d\n", ret);
#  220|   	return T_EXIT_FAIL;
#  221|-> }
#  222|   
#  223|   static int test_flag(void)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def135]
liburing-2.13/test/defer-tw-timeout.c:117:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname, 16384)’
liburing-2.13/test/defer-tw-timeout.c:100:14: acquire_resource: opened here
liburing-2.13/test/defer-tw-timeout.c:101:12: branch_false: following ‘false’ branch...
liburing-2.13/test/defer-tw-timeout.c:113:12: branch_false: ...to here
liburing-2.13/test/defer-tw-timeout.c:116:13: branch_false: following ‘false’ branch...
liburing-2.13/test/defer-tw-timeout.c:117:17: branch_false: ...to here
liburing-2.13/test/defer-tw-timeout.c:117:17: danger: ‘open(fname, 16384)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  115|   
#  116|   	if (posix_memalign(&buf, 4096, 4096)) {
#  117|-> 		close(fd);
#  118|   		return T_EXIT_FAIL;
#  119|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def136]
liburing-2.13/test/eploop.c:54:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
liburing-2.13/test/eploop.c:17:5: enter_function: entry to ‘main’
liburing-2.13/test/eploop.c:25:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/eploop.c:28:15: branch_false: ...to here
liburing-2.13/test/eploop.c:29:12: branch_false: following ‘false’ branch...
liburing-2.13/test/eploop.c:34:19: branch_false: ...to here
liburing-2.13/test/eploop.c:35:12: branch_false: following ‘false’ branch (when ‘epollfd >= 0’)...
liburing-2.13/test/eploop.c:40:9: branch_false: ...to here
liburing-2.13/test/eploop.c:43:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/eploop.c:48:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/eploop.c:48:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/eploop.c:53:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/eploop.c:53:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/eploop.c:54:9: danger: dereference of NULL ‘_io_uring_get_sqe(&ring)’
#   52|   
#   53|   	sqe = io_uring_get_sqe(&ring);
#   54|-> 	sqe->user_data = 2;
#   55|   	io_uring_prep_nop(sqe);
#   56|   	io_uring_submit(&ring);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def137]
liburing-2.13/test/epwait.c:248:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[0][0]’
liburing-2.13/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_true: following ‘true’ branch...
liburing-2.13/test/epwait.c:256:25: branch_true: ...to here
liburing-2.13/test/epwait.c:248:24: danger: ‘d.pipes[0][0]’ leaks here
#  246|   	ret = t_create_ring(32, &ring, flags);
#  247|   	if (ret == T_SETUP_SKIP) {
#  248|-> 		return 0;
#  249|   	} else if (ret != T_SETUP_OK) {
#  250|   		fprintf(stderr, "ring create failed %x -> %d\n", flags, ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def138]
liburing-2.13/test/epwait.c:248:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[0][1]’
liburing-2.13/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_true: following ‘true’ branch...
liburing-2.13/test/epwait.c:256:25: branch_true: ...to here
liburing-2.13/test/epwait.c:248:24: danger: ‘d.pipes[0][1]’ leaks here
#  246|   	ret = t_create_ring(32, &ring, flags);
#  247|   	if (ret == T_SETUP_SKIP) {
#  248|-> 		return 0;
#  249|   	} else if (ret != T_SETUP_OK) {
#  250|   		fprintf(stderr, "ring create failed %x -> %d\n", flags, ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def139]
liburing-2.13/test/epwait.c:248:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[1][0]’
liburing-2.13/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_true: following ‘true’ branch...
liburing-2.13/test/epwait.c:256:25: branch_true: ...to here
liburing-2.13/test/epwait.c:248:24: danger: ‘d.pipes[1][0]’ leaks here
#  246|   	ret = t_create_ring(32, &ring, flags);
#  247|   	if (ret == T_SETUP_SKIP) {
#  248|-> 		return 0;
#  249|   	} else if (ret != T_SETUP_OK) {
#  250|   		fprintf(stderr, "ring create failed %x -> %d\n", flags, ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def140]
liburing-2.13/test/epwait.c:248:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[1][1]’
liburing-2.13/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_true: following ‘true’ branch...
liburing-2.13/test/epwait.c:256:25: branch_true: ...to here
liburing-2.13/test/epwait.c:248:24: danger: ‘d.pipes[1][1]’ leaks here
#  246|   	ret = t_create_ring(32, &ring, flags);
#  247|   	if (ret == T_SETUP_SKIP) {
#  248|-> 		return 0;
#  249|   	} else if (ret != T_SETUP_OK) {
#  250|   		fprintf(stderr, "ring create failed %x -> %d\n", flags, ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def141]
liburing-2.13/test/epwait.c:248:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[2][0]’
liburing-2.13/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_true: following ‘true’ branch...
liburing-2.13/test/epwait.c:256:25: branch_true: ...to here
liburing-2.13/test/epwait.c:248:24: danger: ‘d.pipes[2][0]’ leaks here
#  246|   	ret = t_create_ring(32, &ring, flags);
#  247|   	if (ret == T_SETUP_SKIP) {
#  248|-> 		return 0;
#  249|   	} else if (ret != T_SETUP_OK) {
#  250|   		fprintf(stderr, "ring create failed %x -> %d\n", flags, ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def142]
liburing-2.13/test/epwait.c:248:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[2][1]’
liburing-2.13/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_true: following ‘true’ branch...
liburing-2.13/test/epwait.c:256:25: branch_true: ...to here
liburing-2.13/test/epwait.c:248:24: danger: ‘d.pipes[2][1]’ leaks here
#  246|   	ret = t_create_ring(32, &ring, flags);
#  247|   	if (ret == T_SETUP_SKIP) {
#  248|-> 		return 0;
#  249|   	} else if (ret != T_SETUP_OK) {
#  250|   		fprintf(stderr, "ring create failed %x -> %d\n", flags, ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def143]
liburing-2.13/test/epwait.c:256:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[0][0]’
liburing-2.13/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_true: following ‘true’ branch...
liburing-2.13/test/epwait.c:256:25: branch_true: ...to here
liburing-2.13/test/epwait.c:256:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/epwait.c:256:25: danger: ‘d.pipes[0][0]’ leaks here
#  254|   	for (i = 0; i < NPIPES; i++) {
#  255|   		if (pipe(d.pipes[i]) < 0) {
#  256|-> 			perror("pipe");
#  257|   			return 1;
#  258|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def144]
liburing-2.13/test/epwait.c:256:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[0][1]’
liburing-2.13/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_true: following ‘true’ branch...
liburing-2.13/test/epwait.c:256:25: branch_true: ...to here
liburing-2.13/test/epwait.c:256:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/epwait.c:256:25: danger: ‘d.pipes[0][1]’ leaks here
#  254|   	for (i = 0; i < NPIPES; i++) {
#  255|   		if (pipe(d.pipes[i]) < 0) {
#  256|-> 			perror("pipe");
#  257|   			return 1;
#  258|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def145]
liburing-2.13/test/epwait.c:256:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[1][0]’
liburing-2.13/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_true: following ‘true’ branch...
liburing-2.13/test/epwait.c:256:25: branch_true: ...to here
liburing-2.13/test/epwait.c:256:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/epwait.c:256:25: danger: ‘d.pipes[1][0]’ leaks here
#  254|   	for (i = 0; i < NPIPES; i++) {
#  255|   		if (pipe(d.pipes[i]) < 0) {
#  256|-> 			perror("pipe");
#  257|   			return 1;
#  258|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def146]
liburing-2.13/test/epwait.c:256:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[1][1]’
liburing-2.13/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_true: following ‘true’ branch...
liburing-2.13/test/epwait.c:256:25: branch_true: ...to here
liburing-2.13/test/epwait.c:256:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/epwait.c:256:25: danger: ‘d.pipes[1][1]’ leaks here
#  254|   	for (i = 0; i < NPIPES; i++) {
#  255|   		if (pipe(d.pipes[i]) < 0) {
#  256|-> 			perror("pipe");
#  257|   			return 1;
#  258|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def147]
liburing-2.13/test/epwait.c:256:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[2][0]’
liburing-2.13/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_true: following ‘true’ branch...
liburing-2.13/test/epwait.c:256:25: branch_true: ...to here
liburing-2.13/test/epwait.c:256:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/epwait.c:256:25: danger: ‘d.pipes[2][0]’ leaks here
#  254|   	for (i = 0; i < NPIPES; i++) {
#  255|   		if (pipe(d.pipes[i]) < 0) {
#  256|-> 			perror("pipe");
#  257|   			return 1;
#  258|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def148]
liburing-2.13/test/epwait.c:256:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[2][1]’
liburing-2.13/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/epwait.c:249:19: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_false: following ‘false’ branch...
liburing-2.13/test/epwait.c:254:33: branch_false: ...to here
liburing-2.13/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/epwait.c:255:26: branch_true: ...to here
liburing-2.13/test/epwait.c:255:20: branch_true: following ‘true’ branch...
liburing-2.13/test/epwait.c:256:25: branch_true: ...to here
liburing-2.13/test/epwait.c:256:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/epwait.c:256:25: danger: ‘d.pipes[2][1]’ leaks here
#  254|   	for (i = 0; i < NPIPES; i++) {
#  255|   		if (pipe(d.pipes[i]) < 0) {
#  256|-> 			perror("pipe");
#  257|   			return 1;
#  258|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def149]
liburing-2.13/test/evloop.c:53:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
liburing-2.13/test/evloop.c:19:5: enter_function: entry to ‘main’
liburing-2.13/test/evloop.c:26:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/evloop.c:29:15: branch_false: ...to here
liburing-2.13/test/evloop.c:30:12: branch_false: following ‘false’ branch...
liburing-2.13/test/evloop.c:35:15: branch_false: ...to here
liburing-2.13/test/evloop.c:36:12: branch_false: following ‘false’ branch (when ‘efd >= 0’)...
liburing-2.13/test/evloop.c:41:15: branch_false: ...to here
liburing-2.13/test/evloop.c:42:12: branch_false: following ‘false’ branch...
liburing-2.13/test/evloop.c:47:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/evloop.c:47:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/evloop.c:52:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/evloop.c:52:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/evloop.c:53:9: danger: dereference of NULL ‘_io_uring_get_sqe(&ring)’
#   51|   
#   52|   	sqe = io_uring_get_sqe(&ring);
#   53|-> 	sqe->user_data = 2;
#   54|   	io_uring_prep_nop(sqe);
#   55|   	io_uring_submit(&ring);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def150]
liburing-2.13/test/fadvise.c:100:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
liburing-2.13/test/fadvise.c:92:14: acquire_resource: opened here
liburing-2.13/test/fadvise.c:93:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fadvise.c:100:15: branch_false: ...to here
liburing-2.13/test/fadvise.c:100:15: throw: if ‘t_malloc’ throws an exception...
liburing-2.13/test/fadvise.c:100:15: danger: ‘open(filename, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   98|   	}
#   99|   
#  100|-> 	buf = t_malloc(FILE_SIZE);
#  101|   
#  102|   	cached_read = do_read(fd, buf);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def151]
liburing-2.13/test/fc2a85cb02ef.c:34:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 524289)’
liburing-2.13/test/fc2a85cb02ef.c:31:12: acquire_resource: opened here
liburing-2.13/test/fc2a85cb02ef.c:32:6: branch_false: following ‘false’ branch...
liburing-2.13/test/fc2a85cb02ef.c:34:7: branch_false: ...to here
liburing-2.13/test/fc2a85cb02ef.c:34:7: throw: if ‘write’ throws an exception...
liburing-2.13/test/fc2a85cb02ef.c:34:7: danger: ‘open(file, 524289)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   32|     if (fd == -1)
#   33|       return false;
#   34|->   if (write(fd, buf, len) != len) {
#   35|       int err = errno;
#   36|       close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def152]
liburing-2.13/test/fc2a85cb02ef.c:51:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/thread-self/fail-nth", 2)’
liburing-2.13/test/fc2a85cb02ef.c:47:8: acquire_resource: opened here
liburing-2.13/test/fc2a85cb02ef.c:48:6: branch_false: following ‘false’ branch...
liburing-2.13/test/fc2a85cb02ef.c:51:3: branch_false: ...to here
liburing-2.13/test/fc2a85cb02ef.c:52:7: throw: if ‘write’ throws an exception...
liburing-2.13/test/fc2a85cb02ef.c:51:3: danger: ‘open("/proc/thread-self/fail-nth", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   49|       exit(1);
#   50|     char buf[16];
#   51|->   sprintf(buf, "%d", nth + 1);
#   52|     if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf))
#   53|       exit(1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def153]
liburing-2.13/test/fd-install.c:91:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/fd-install.c:86:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fd-install.c:91:15: branch_false: ...to here
liburing-2.13/test/fd-install.c:91:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/fd-install.c:91:15: danger: ‘fds[0]’ leaks here
#   89|   	}
#   90|   
#   91|-> 	ret = io_uring_register_files(ring, &fds[0], 1);
#   92|   	if (ret) {
#   93|   		fprintf(stderr, "failed register files %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def154]
liburing-2.13/test/fd-install.c:91:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/fd-install.c:86:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fd-install.c:91:15: branch_false: ...to here
liburing-2.13/test/fd-install.c:91:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/fd-install.c:91:15: danger: ‘fds[1]’ leaks here
#   89|   	}
#   90|   
#   91|-> 	ret = io_uring_register_files(ring, &fds[0], 1);
#   92|   	if (ret) {
#   93|   		fprintf(stderr, "failed register files %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def155]
liburing-2.13/test/fd-install.c:148:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/fd-install.c:143:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fd-install.c:148:15: branch_false: ...to here
liburing-2.13/test/fd-install.c:148:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/fd-install.c:148:15: danger: ‘fds[0]’ leaks here
#  146|   	}
#  147|   
#  148|-> 	ret = io_uring_register_files(ring, &fds[0], 1);
#  149|   	if (ret) {
#  150|   		fprintf(stderr, "failed register files %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def156]
liburing-2.13/test/fd-install.c:148:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/fd-install.c:143:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fd-install.c:148:15: branch_false: ...to here
liburing-2.13/test/fd-install.c:148:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/fd-install.c:148:15: danger: ‘fds[1]’ leaks here
#  146|   	}
#  147|   
#  148|-> 	ret = io_uring_register_files(ring, &fds[0], 1);
#  149|   	if (ret) {
#  150|   		fprintf(stderr, "failed register files %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def157]
liburing-2.13/test/fd-install.c:217:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/fd-install.c:211:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fd-install.c:217:15: branch_false: ...to here
liburing-2.13/test/fd-install.c:217:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/fd-install.c:217:15: danger: ‘fds[0]’ leaks here
#  215|   
#  216|   	/* register read side */
#  217|-> 	ret = io_uring_register_files(ring, &fds[0], 1);
#  218|   	if (ret) {
#  219|   		fprintf(stderr, "failed register files %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def158]
liburing-2.13/test/fd-install.c:217:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/fd-install.c:211:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fd-install.c:217:15: branch_false: ...to here
liburing-2.13/test/fd-install.c:217:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/fd-install.c:217:15: danger: ‘fds[1]’ leaks here
#  215|   
#  216|   	/* register read side */
#  217|-> 	ret = io_uring_register_files(ring, &fds[0], 1);
#  218|   	if (ret) {
#  219|   		fprintf(stderr, "failed register files %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-910): [#def159]
liburing-2.13/test/fd-install.c:227:15: warning[-Wanalyzer-fd-use-after-close]: ‘read’ on closed file descriptor ‘fds[0]’
liburing-2.13/test/fd-install.c:211:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fd-install.c:217:15: branch_false: ...to here
liburing-2.13/test/fd-install.c:218:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fd-install.c:224:9: branch_false: ...to here
liburing-2.13/test/fd-install.c:224:9: release_resource: closed here
liburing-2.13/test/fd-install.c:227:15: danger: ‘read’ on closed file descriptor ‘fds[0]’; ‘close’ was at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
#  225|   
#  226|   	/* normal read should fail */
#  227|-> 	ret = read(fds[0], buf, 1);
#  228|   	if (ret != -1) {
#  229|   		fprintf(stderr, "unexpected read ret %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def160]
liburing-2.13/test/fd-install.c:378:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/fd-install.c:373:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fd-install.c:378:15: branch_false: ...to here
liburing-2.13/test/fd-install.c:378:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/fd-install.c:378:15: danger: ‘fds[0]’ leaks here
#  376|   	}
#  377|   
#  378|-> 	ret = io_uring_register_files(ring, &fds[0], 1);
#  379|   	if (ret) {
#  380|   		fprintf(stderr, "failed register files %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def161]
liburing-2.13/test/fd-install.c:378:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/fd-install.c:373:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fd-install.c:378:15: branch_false: ...to here
liburing-2.13/test/fd-install.c:378:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/fd-install.c:378:15: danger: ‘fds[1]’ leaks here
#  376|   	}
#  377|   
#  378|-> 	ret = io_uring_register_files(ring, &fds[0], 1);
#  379|   	if (ret) {
#  380|   		fprintf(stderr, "failed register files %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def162]
liburing-2.13/test/fdinfo-sqpoll.c:39:14: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/fdinfo-sqpoll.c:36:15: acquire_memory: allocated here
liburing-2.13/test/fdinfo-sqpoll.c:39:14: throw: if ‘open’ throws an exception...
liburing-2.13/test/fdinfo-sqpoll.c:39:14: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   37|   
#   38|   	sprintf(fd_name, "/proc/self/fdinfo/%d", d->ring.ring_fd);
#   39|-> 	fd = open(fd_name, O_RDONLY);
#   40|   	if (fd < 0) {
#   41|   		perror("open");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def163]
liburing-2.13/test/fdinfo-sqpoll.c:41:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/fdinfo-sqpoll.c:36:15: acquire_memory: allocated here
liburing-2.13/test/fdinfo-sqpoll.c:40:12: branch_true: following ‘true’ branch...
liburing-2.13/test/fdinfo-sqpoll.c:41:17: branch_true: ...to here
liburing-2.13/test/fdinfo-sqpoll.c:41:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/fdinfo-sqpoll.c:41:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   39|   	fd = open(fd_name, O_RDONLY);
#   40|   	if (fd < 0) {
#   41|-> 		perror("open");
#   42|   		return NULL;
#   43|   	}

Error: CPPCHECK_WARNING (CWE-401): [#def164]
liburing-2.13/test/fdinfo-sqpoll.c:42: error[memleak]: Memory leak: buf
#   40|   	if (fd < 0) {
#   41|   		perror("open");
#   42|-> 		return NULL;
#   43|   	}
#   44|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def165]
liburing-2.13/test/fdinfo-sqpoll.c:45:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fd_name, 0)’
liburing-2.13/test/fdinfo-sqpoll.c:39:14: acquire_resource: opened here
liburing-2.13/test/fdinfo-sqpoll.c:40:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fdinfo-sqpoll.c:45:9: branch_false: ...to here
liburing-2.13/test/fdinfo-sqpoll.c:51:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/fdinfo-sqpoll.c:45:9: danger: ‘open(&fd_name, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   43|   	}
#   44|   
#   45|-> 	pthread_barrier_wait(&d->barrier);
#   46|   
#   47|   	do {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def166]
liburing-2.13/test/fdinfo-sqpoll.c:51:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/fdinfo-sqpoll.c:36:15: acquire_memory: allocated here
liburing-2.13/test/fdinfo-sqpoll.c:40:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fdinfo-sqpoll.c:45:9: branch_false: ...to here
liburing-2.13/test/fdinfo-sqpoll.c:51:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/fdinfo-sqpoll.c:51:25: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#   49|   
#   50|   		if (ret < 0) {
#   51|-> 			perror("fdinfo read");
#   52|   			break;
#   53|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
liburing-2.13/test/fdinfo-sqpoll.c:56:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/fdinfo-sqpoll.c:36:15: acquire_memory: allocated here
liburing-2.13/test/fdinfo-sqpoll.c:40:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fdinfo-sqpoll.c:45:9: branch_false: ...to here
liburing-2.13/test/fdinfo-sqpoll.c:56:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/fdinfo-sqpoll.c:56:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#   54|   	} while (!d->done);
#   55|   
#   56|-> 	close(fd);
#   57|   	free(buf);
#   58|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def168]
liburing-2.13/test/fdinfo-sqpoll.c:59:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/fdinfo-sqpoll.c:36:15: acquire_memory: allocated here
liburing-2.13/test/fdinfo-sqpoll.c:40:12: branch_true: following ‘true’ branch...
liburing-2.13/test/fdinfo-sqpoll.c:41:17: branch_true: ...to here
liburing-2.13/test/fdinfo-sqpoll.c:59:1: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#   57|   	free(buf);
#   58|   	return NULL;
#   59|-> }
#   60|   
#   61|   static int __test(void)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def169]
liburing-2.13/test/fdinfo.c:36:14: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/fdinfo.c:337:12: enter_function: entry to ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:348:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/fdinfo.c:350:12: branch_false: ...to here
liburing-2.13/test/fdinfo.c:350:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/fdinfo.c:357:14: branch_false: ...to here
liburing-2.13/test/fdinfo.c:358:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/fdinfo.c:362:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:362:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:365:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fdinfo.c:369:9: branch_false: ...to here
liburing-2.13/test/fdinfo.c:369:9: call_function: calling ‘fdinfo_read’ from ‘test_eventfd_read’
#   34|   
#   35|   	sprintf(fd_name, "/proc/self/fdinfo/%d", ring->ring_fd);
#   36|-> 	fd = open(fd_name, O_RDONLY);
#   37|   	if (fd < 0) {
#   38|   		perror("open");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def170]
liburing-2.13/test/fdinfo.c:38:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/fdinfo.c:337:12: enter_function: entry to ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:348:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/fdinfo.c:350:12: branch_false: ...to here
liburing-2.13/test/fdinfo.c:350:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/fdinfo.c:357:14: branch_false: ...to here
liburing-2.13/test/fdinfo.c:358:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/fdinfo.c:362:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:362:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:365:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fdinfo.c:369:9: branch_false: ...to here
liburing-2.13/test/fdinfo.c:369:9: call_function: calling ‘fdinfo_read’ from ‘test_eventfd_read’
#   36|   	fd = open(fd_name, O_RDONLY);
#   37|   	if (fd < 0) {
#   38|-> 		perror("open");
#   39|   		return;
#   40|   	}

Error: CPPCHECK_WARNING (CWE-401): [#def171]
liburing-2.13/test/fdinfo.c:39: error[memleak]: Memory leak: buf
#   37|   	if (fd < 0) {
#   38|   		perror("open");
#   39|-> 		return;
#   40|   	}
#   41|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def172]
liburing-2.13/test/fdinfo.c:46:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fd_name, 0)’
liburing-2.13/test/fdinfo.c:337:12: enter_function: entry to ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:348:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/fdinfo.c:350:12: branch_false: ...to here
liburing-2.13/test/fdinfo.c:350:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/fdinfo.c:357:14: branch_false: ...to here
liburing-2.13/test/fdinfo.c:358:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/fdinfo.c:362:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:362:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:365:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fdinfo.c:369:9: branch_false: ...to here
liburing-2.13/test/fdinfo.c:369:9: call_function: calling ‘fdinfo_read’ from ‘test_eventfd_read’
#   44|   
#   45|   		if (ret < 0) {
#   46|-> 			perror("fdinfo read");
#   47|   			break;
#   48|   		} else if (ret == 4096) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def173]
liburing-2.13/test/fdinfo.c:46:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/fdinfo.c:337:12: enter_function: entry to ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:348:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/fdinfo.c:350:12: branch_false: ...to here
liburing-2.13/test/fdinfo.c:350:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/fdinfo.c:357:14: branch_false: ...to here
liburing-2.13/test/fdinfo.c:358:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/fdinfo.c:362:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:362:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:365:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fdinfo.c:369:9: branch_false: ...to here
liburing-2.13/test/fdinfo.c:369:9: call_function: calling ‘fdinfo_read’ from ‘test_eventfd_read’
#   44|   
#   45|   		if (ret < 0) {
#   46|-> 			perror("fdinfo read");
#   47|   			break;
#   48|   		} else if (ret == 4096) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def174]
liburing-2.13/test/fdinfo.c:54:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fd_name, 0)’
liburing-2.13/test/fdinfo.c:337:12: enter_function: entry to ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:348:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/fdinfo.c:350:12: branch_false: ...to here
liburing-2.13/test/fdinfo.c:350:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/fdinfo.c:357:14: branch_false: ...to here
liburing-2.13/test/fdinfo.c:358:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/fdinfo.c:362:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:362:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:365:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fdinfo.c:369:9: branch_false: ...to here
liburing-2.13/test/fdinfo.c:369:9: call_function: calling ‘fdinfo_read’ from ‘test_eventfd_read’
#   52|   	} while (1);
#   53|   
#   54|-> 	close(fd);
#   55|   	free(buf);
#   56|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def175]
liburing-2.13/test/fdinfo.c:54:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/fdinfo.c:337:12: enter_function: entry to ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:348:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/fdinfo.c:350:12: branch_false: ...to here
liburing-2.13/test/fdinfo.c:350:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/fdinfo.c:357:14: branch_false: ...to here
liburing-2.13/test/fdinfo.c:358:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/fdinfo.c:362:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:362:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:365:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fdinfo.c:369:9: branch_false: ...to here
liburing-2.13/test/fdinfo.c:369:9: call_function: calling ‘fdinfo_read’ from ‘test_eventfd_read’
#   52|   	} while (1);
#   53|   
#   54|-> 	close(fd);
#   55|   	free(buf);
#   56|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def176]
liburing-2.13/test/fdinfo.c:56:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/fdinfo.c:337:12: enter_function: entry to ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:348:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/fdinfo.c:350:12: branch_false: ...to here
liburing-2.13/test/fdinfo.c:350:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/fdinfo.c:357:14: branch_false: ...to here
liburing-2.13/test/fdinfo.c:358:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/fdinfo.c:362:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:362:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’
liburing-2.13/test/fdinfo.c:365:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fdinfo.c:369:9: branch_false: ...to here
liburing-2.13/test/fdinfo.c:369:9: call_function: calling ‘fdinfo_read’ from ‘test_eventfd_read’
#   54|   	close(fd);
#   55|   	free(buf);
#   56|-> }
#   57|   
#   58|   static int __test_io(const char *file, struct io_uring *ring, int write,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def177]
liburing-2.13/test/fdinfo.c:101:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/test/fdinfo.c:90:14: acquire_resource: opened here
liburing-2.13/test/fdinfo.c:91:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fdinfo.c:100:12: branch_false: ...to here
liburing-2.13/test/fdinfo.c:100:12: branch_true: following ‘true’ branch (when ‘sqthread != 0’)...
liburing-2.13/test/fdinfo.c:101:23: branch_true: ...to here
liburing-2.13/test/fdinfo.c:101:23: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/fdinfo.c:101:23: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#   99|   
#  100|   	if (sqthread) {
#  101|-> 		ret = io_uring_register_files(ring, &fd, 1);
#  102|   		if (ret) {
#  103|   			fprintf(stderr, "file reg failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def178]
liburing-2.13/test/fdinfo.c:273:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/test/fdinfo.c:276:12: enter_function: entry to ‘test_io’
liburing-2.13/test/fdinfo.c:290:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/fdinfo.c:292:12: branch_false: ...to here
liburing-2.13/test/fdinfo.c:292:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/fdinfo.c:297:15: branch_false: ...to here
liburing-2.13/test/fdinfo.c:297:15: call_function: calling ‘__test_io’ from ‘test_io’
#  271|   #endif
#  272|   	if (fd != -1)
#  273|-> 		close(fd);
#  274|   	return 1;
#  275|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def179]
liburing-2.13/test/fifo-futex-poll.c:47:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe’
liburing-2.13/test/fifo-futex-poll.c:27:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/fifo-futex-poll.c:35:15: branch_false: ...to here
liburing-2.13/test/fifo-futex-poll.c:36:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/fifo-futex-poll.c:40:16: branch_false: ...to here
liburing-2.13/test/fifo-futex-poll.c:40:16: acquire_resource: opened here
liburing-2.13/test/fifo-futex-poll.c:41:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fifo-futex-poll.c:47:15: branch_false: ...to here
liburing-2.13/test/fifo-futex-poll.c:47:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/fifo-futex-poll.c:47:15: danger: ‘pipe’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   45|   	}
#   46|   
#   47|-> 	ret = io_uring_queue_init(64, &ring, 0);
#   48|   	if (ret) {
#   49|   		ret = T_EXIT_FAIL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def180]
liburing-2.13/test/fifo-futex-poll.c:111:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe’
liburing-2.13/test/fifo-futex-poll.c:27:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/fifo-futex-poll.c:35:15: branch_false: ...to here
liburing-2.13/test/fifo-futex-poll.c:36:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/fifo-futex-poll.c:40:16: branch_false: ...to here
liburing-2.13/test/fifo-futex-poll.c:40:16: acquire_resource: opened here
liburing-2.13/test/fifo-futex-poll.c:41:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fifo-futex-poll.c:47:15: branch_false: ...to here
liburing-2.13/test/fifo-futex-poll.c:48:12: branch_true: following ‘true’ branch...
liburing-2.13/test/fifo-futex-poll.c:50:17: branch_true: ...to here
liburing-2.13/test/fifo-futex-poll.c:110:12: branch_true: following ‘true’ branch...
liburing-2.13/test/fifo-futex-poll.c:111:17: branch_true: ...to here
liburing-2.13/test/fifo-futex-poll.c:111:17: throw: if ‘close’ throws an exception...
liburing-2.13/test/fifo-futex-poll.c:111:17: danger: ‘pipe’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  109|   err:
#  110|   	if (pipe != -1)
#  111|-> 		close(pipe);
#  112|   	unlink("fifo");
#  113|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def181]
liburing-2.13/test/fifo-nonblock-read.c:30:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/fifo-nonblock-read.c:25:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fifo-nonblock-read.c:30:9: branch_false: ...to here
liburing-2.13/test/fifo-nonblock-read.c:30:9: throw: if ‘t_set_nonblock’ throws an exception...
liburing-2.13/test/fifo-nonblock-read.c:30:9: danger: ‘fds[0]’ leaks here
#   28|   	}
#   29|   
#   30|-> 	t_set_nonblock(fds[0]);
#   31|   
#   32|   	sqe = io_uring_get_sqe(&ring);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def182]
liburing-2.13/test/fifo-nonblock-read.c:30:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/fifo-nonblock-read.c:25:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fifo-nonblock-read.c:30:9: branch_false: ...to here
liburing-2.13/test/fifo-nonblock-read.c:30:9: throw: if ‘t_set_nonblock’ throws an exception...
liburing-2.13/test/fifo-nonblock-read.c:30:9: danger: ‘fds[1]’ leaks here
#   28|   	}
#   29|   
#   30|-> 	t_set_nonblock(fds[0]);
#   31|   
#   32|   	sqe = io_uring_get_sqe(&ring);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def183]
liburing-2.13/test/file-exit-unreg.c:29:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/file-exit-unreg.c:21:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/file-exit-unreg.c:24:13: branch_false: ...to here
liburing-2.13/test/file-exit-unreg.c:24:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-exit-unreg.c:29:15: branch_false: ...to here
liburing-2.13/test/file-exit-unreg.c:29:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/file-exit-unreg.c:29:15: danger: ‘fds[0]’ leaks here
#   27|   	}
#   28|   
#   29|-> 	ret = io_uring_queue_init(4, &ring, IORING_SETUP_SINGLE_ISSUER|IORING_SETUP_DEFER_TASKRUN);
#   30|   	if (ret == -EINVAL) {
#   31|   		return T_EXIT_SKIP;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def184]
liburing-2.13/test/file-exit-unreg.c:29:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/file-exit-unreg.c:21:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/file-exit-unreg.c:24:13: branch_false: ...to here
liburing-2.13/test/file-exit-unreg.c:24:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-exit-unreg.c:29:15: branch_false: ...to here
liburing-2.13/test/file-exit-unreg.c:29:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/file-exit-unreg.c:29:15: danger: ‘fds[1]’ leaks here
#   27|   	}
#   28|   
#   29|-> 	ret = io_uring_queue_init(4, &ring, IORING_SETUP_SINGLE_ISSUER|IORING_SETUP_DEFER_TASKRUN);
#   30|   	if (ret == -EINVAL) {
#   31|   		return T_EXIT_SKIP;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def185]
liburing-2.13/test/file-exit-unreg.c:37:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/file-exit-unreg.c:21:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/file-exit-unreg.c:24:13: branch_false: ...to here
liburing-2.13/test/file-exit-unreg.c:24:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-exit-unreg.c:29:15: branch_false: ...to here
liburing-2.13/test/file-exit-unreg.c:30:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-exit-unreg.c:32:19: branch_false: ...to here
liburing-2.13/test/file-exit-unreg.c:32:19: branch_false: following ‘false’ branch...
liburing-2.13/test/file-exit-unreg.c:37:15: branch_false: ...to here
liburing-2.13/test/file-exit-unreg.c:37:15: throw: if ‘io_uring_register_files_tags’ throws an exception...
liburing-2.13/test/file-exit-unreg.c:37:15: danger: ‘fds[0]’ leaks here
#   35|   	}
#   36|   
#   37|-> 	ret = io_uring_register_files_tags(&ring, fds, tags, 2);
#   38|   	if (ret == -EINVAL) {
#   39|   		return T_EXIT_SKIP;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def186]
liburing-2.13/test/file-exit-unreg.c:37:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/file-exit-unreg.c:21:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/file-exit-unreg.c:24:13: branch_false: ...to here
liburing-2.13/test/file-exit-unreg.c:24:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-exit-unreg.c:29:15: branch_false: ...to here
liburing-2.13/test/file-exit-unreg.c:30:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-exit-unreg.c:32:19: branch_false: ...to here
liburing-2.13/test/file-exit-unreg.c:32:19: branch_false: following ‘false’ branch...
liburing-2.13/test/file-exit-unreg.c:37:15: branch_false: ...to here
liburing-2.13/test/file-exit-unreg.c:37:15: throw: if ‘io_uring_register_files_tags’ throws an exception...
liburing-2.13/test/file-exit-unreg.c:37:15: danger: ‘fds[1]’ leaks here
#   35|   	}
#   36|   
#   37|-> 	ret = io_uring_register_files_tags(&ring, fds, tags, 2);
#   38|   	if (ret == -EINVAL) {
#   39|   		return T_EXIT_SKIP;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def187]
liburing-2.13/test/file-register.c:594:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
liburing-2.13/test/file-register.c:582:12: enter_function: entry to ‘test_skip’
liburing-2.13/test/file-register.c:587:17: call_function: calling ‘open_files’ from ‘test_skip’
liburing-2.13/test/file-register.c:587:17: return_function: returning to ‘test_skip’ from ‘open_files’
liburing-2.13/test/file-register.c:589:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:594:9: branch_false: ...to here
liburing-2.13/test/file-register.c:594:9: danger: dereference of NULL ‘open_files(100, 0, 0)’
#  592|   	}
#  593|   
#  594|-> 	files[90] = IORING_REGISTER_FILES_SKIP;
#  595|   	ret = io_uring_register_files_update(ring, 90, &files[90], 1);
#  596|   	if (ret != 1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def188]
liburing-2.13/test/file-register.c:700:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/file-register.c:692:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:696:13: branch_false: ...to here
liburing-2.13/test/file-register.c:696:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:700:15: branch_false: ...to here
liburing-2.13/test/file-register.c:700:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/file-register.c:700:15: danger: ‘fds[0]’ leaks here
#  698|   		return -1;
#  699|   	}
#  700|-> 	ret = io_uring_register_files(&ring, fds, 2);
#  701|   	if (ret) {
#  702|   		fprintf(stderr, "file_register: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def189]
liburing-2.13/test/file-register.c:700:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/file-register.c:692:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:696:13: branch_false: ...to here
liburing-2.13/test/file-register.c:696:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:700:15: branch_false: ...to here
liburing-2.13/test/file-register.c:700:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/file-register.c:700:15: danger: ‘fds[1]’ leaks here
#  698|   		return -1;
#  699|   	}
#  700|-> 	ret = io_uring_register_files(&ring, fds, 2);
#  701|   	if (ret) {
#  702|   		fprintf(stderr, "file_register: %d\n", ret);

Error: CPPCHECK_WARNING (CWE-457): [#def190]
liburing-2.13/test/file-register.c:726: error[uninitvar]: Uninitialized variable: buffer
#  724|   		return -1;
#  725|   	}
#  726|-> 	io_uring_prep_write(sqe, 1, buffer, sizeof(buffer), 0);
#  727|   	sqe->flags |= IOSQE_FIXED_FILE;
#  728|   	sqe->user_data = 2;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def191]
liburing-2.13/test/file-register.c:776:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/file-register.c:774:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:778:13: branch_false: ...to here
liburing-2.13/test/file-register.c:778:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:782:13: branch_false: ...to here
liburing-2.13/test/file-register.c:776:24: danger: ‘fds[0]’ leaks here
#  774|   	if (ret < 0) {
#  775|   		fprintf(stderr, "failed to init io_uring: %s\n", strerror(-ret));
#  776|-> 		return ret;
#  777|   	}
#  778|   	if (pipe(fds)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def192]
liburing-2.13/test/file-register.c:776:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/file-register.c:774:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:778:13: branch_false: ...to here
liburing-2.13/test/file-register.c:778:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:782:13: branch_false: ...to here
liburing-2.13/test/file-register.c:776:24: danger: ‘fds[1]’ leaks here
#  774|   	if (ret < 0) {
#  775|   		fprintf(stderr, "failed to init io_uring: %s\n", strerror(-ret));
#  776|-> 		return ret;
#  777|   	}
#  778|   	if (pipe(fds)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def193]
liburing-2.13/test/file-register.c:783:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/file-register.c:774:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:778:13: branch_false: ...to here
liburing-2.13/test/file-register.c:778:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:782:13: branch_false: ...to here
liburing-2.13/test/file-register.c:782:12: branch_true: following ‘true’ branch...
liburing-2.13/test/file-register.c:783:17: branch_true: ...to here
liburing-2.13/test/file-register.c:783:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/file-register.c:783:17: danger: ‘fds[0]’ leaks here
#  781|   	}
#  782|   	if (socketpair(AF_UNIX, SOCK_DGRAM, 0, sp) != 0) {
#  783|-> 		perror("Failed to create Unix-domain socket pair\n");
#  784|   		return 1;
#  785|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def194]
liburing-2.13/test/file-register.c:783:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/file-register.c:774:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:778:13: branch_false: ...to here
liburing-2.13/test/file-register.c:778:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:782:13: branch_false: ...to here
liburing-2.13/test/file-register.c:782:12: branch_true: following ‘true’ branch...
liburing-2.13/test/file-register.c:783:17: branch_true: ...to here
liburing-2.13/test/file-register.c:783:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/file-register.c:783:17: danger: ‘fds[1]’ leaks here
#  781|   	}
#  782|   	if (socketpair(AF_UNIX, SOCK_DGRAM, 0, sp) != 0) {
#  783|-> 		perror("Failed to create Unix-domain socket pair\n");
#  784|   		return 1;
#  785|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def195]
liburing-2.13/test/file-register.c:792:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/file-register.c:774:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:778:13: branch_false: ...to here
liburing-2.13/test/file-register.c:778:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:782:13: branch_false: ...to here
liburing-2.13/test/file-register.c:782:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:782:12: branch_false: ...to here
liburing-2.13/test/file-register.c:787:21: branch_true: following ‘true’ branch (when ‘i != 16’)...
liburing-2.13/test/file-register.c:788:25: branch_true: ...to here
liburing-2.13/test/file-register.c:787:21: branch_true: following ‘true’ branch (when ‘i != 16’)...
liburing-2.13/test/file-register.c:788:25: branch_true: ...to here
liburing-2.13/test/file-register.c:792:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/file-register.c:792:15: danger: ‘fds[1]’ leaks here
#  790|   	}
#  791|   
#  792|-> 	ret = io_uring_register_files(&ring, reg_fds, 32);
#  793|   	if (ret) {
#  794|   		fprintf(stderr, "file_register: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def196]
liburing-2.13/test/file-register.c:798:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/file-register.c:774:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:778:13: branch_false: ...to here
liburing-2.13/test/file-register.c:778:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:782:13: branch_false: ...to here
liburing-2.13/test/file-register.c:782:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:782:12: branch_false: ...to here
liburing-2.13/test/file-register.c:787:21: branch_true: following ‘true’ branch (when ‘i != 16’)...
liburing-2.13/test/file-register.c:788:25: branch_true: ...to here
liburing-2.13/test/file-register.c:787:21: branch_true: following ‘true’ branch (when ‘i != 16’)...
liburing-2.13/test/file-register.c:788:25: branch_true: ...to here
liburing-2.13/test/file-register.c:793:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:798:9: branch_false: ...to here
liburing-2.13/test/file-register.c:798:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/file-register.c:798:9: danger: ‘fds[1]’ leaks here
#  796|   	}
#  797|   
#  798|-> 	close(fds[0]);
#  799|   	close(fds[1]);
#  800|   	close(sp[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def197]
liburing-2.13/test/file-register.c:799:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/file-register.c:774:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:778:13: branch_false: ...to here
liburing-2.13/test/file-register.c:778:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:782:13: branch_false: ...to here
liburing-2.13/test/file-register.c:782:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:782:12: branch_false: ...to here
liburing-2.13/test/file-register.c:787:21: branch_true: following ‘true’ branch (when ‘i != 16’)...
liburing-2.13/test/file-register.c:788:25: branch_true: ...to here
liburing-2.13/test/file-register.c:793:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:798:9: branch_false: ...to here
liburing-2.13/test/file-register.c:799:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/file-register.c:799:9: danger: ‘fds[1]’ leaks here
#  797|   
#  798|   	close(fds[0]);
#  799|-> 	close(fds[1]);
#  800|   	close(sp[0]);
#  801|   	close(sp[1]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def198]
liburing-2.13/test/file-register.c:832:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/file-register.c:814:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:818:13: branch_false: ...to here
liburing-2.13/test/file-register.c:818:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:827:22: branch_false: ...to here
liburing-2.13/test/file-register.c:832:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/file-register.c:832:15: danger: ‘fds[0]’ leaks here
#  830|   	reg_fds[3] = ring.ring_fd;
#  831|   	reg_fds[4] = -1;
#  832|-> 	ret = io_uring_register_files(&ring, reg_fds, 5);
#  833|   	if (!ret) {
#  834|   		fprintf(stderr, "file_register unexpectedly succeeded\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def199]
liburing-2.13/test/file-register.c:832:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/file-register.c:814:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:818:13: branch_false: ...to here
liburing-2.13/test/file-register.c:818:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:827:22: branch_false: ...to here
liburing-2.13/test/file-register.c:832:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/file-register.c:832:15: danger: ‘fds[1]’ leaks here
#  830|   	reg_fds[3] = ring.ring_fd;
#  831|   	reg_fds[4] = -1;
#  832|-> 	ret = io_uring_register_files(&ring, reg_fds, 5);
#  833|   	if (!ret) {
#  834|   		fprintf(stderr, "file_register unexpectedly succeeded\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def200]
liburing-2.13/test/file-register.c:905:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[0]’
liburing-2.13/test/file-register.c:1007:12: enter_function: entry to ‘test_file_alloc_ranges’
liburing-2.13/test/file-register.c:1012:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1016:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1017:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1022:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1023:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1030:19: branch_false: ...to here
liburing-2.13/test/file-register.c:1030:19: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1035:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1036:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1043:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1043:15: call_function: calling ‘test_overallocating_file_range’ from ‘test_file_alloc_ranges’
#  903|   	int ret, i, fd;
#  904|   
#  905|-> 	ret = io_uring_register_file_alloc_range(ring, roff, rlen);
#  906|   	if (ret) {
#  907|   		fprintf(stderr, "io_uring_register_file_alloc_range %i\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def201]
liburing-2.13/test/file-register.c:905:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[1]’
liburing-2.13/test/file-register.c:1007:12: enter_function: entry to ‘test_file_alloc_ranges’
liburing-2.13/test/file-register.c:1012:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1016:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1017:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1022:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1023:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1030:19: branch_false: ...to here
liburing-2.13/test/file-register.c:1030:19: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1035:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1036:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1043:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1043:15: call_function: calling ‘test_overallocating_file_range’ from ‘test_file_alloc_ranges’
#  903|   	int ret, i, fd;
#  904|   
#  905|-> 	ret = io_uring_register_file_alloc_range(ring, roff, rlen);
#  906|   	if (ret) {
#  907|   		fprintf(stderr, "io_uring_register_file_alloc_range %i\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def202]
liburing-2.13/test/file-register.c:974:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/file-register.c:963:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:968:15: branch_false: ...to here
liburing-2.13/test/file-register.c:969:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/file-register.c:974:15: branch_false: ...to here
liburing-2.13/test/file-register.c:974:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/file-register.c:974:15: danger: ‘fds[0]’ leaks here
#  972|   	}
#  973|   
#  974|-> 	ret = io_uring_register_files(&ring, &fds[0], 2);
#  975|   	if (ret) {
#  976|   		fprintf(stderr, "bad register %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def203]
liburing-2.13/test/file-register.c:974:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/file-register.c:963:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:968:15: branch_false: ...to here
liburing-2.13/test/file-register.c:969:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/file-register.c:974:15: branch_false: ...to here
liburing-2.13/test/file-register.c:974:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/file-register.c:974:15: danger: ‘fds[1]’ leaks here
#  972|   	}
#  973|   
#  974|-> 	ret = io_uring_register_files(&ring, &fds[0], 2);
#  975|   	if (ret) {
#  976|   		fprintf(stderr, "bad register %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def204]
liburing-2.13/test/file-register.c:1014:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[0]’
liburing-2.13/test/file-register.c:1012:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1016:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1014:24: danger: ‘pipe_fds[0]’ leaks here
# 1012|   	if (pipe(pipe_fds)) {
# 1013|   		fprintf(stderr, "pipes\n");
# 1014|-> 		return 1;
# 1015|   	}
# 1016|   	ret = io_uring_queue_init(8, &ring, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def205]
liburing-2.13/test/file-register.c:1014:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[1]’
liburing-2.13/test/file-register.c:1012:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1016:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1014:24: danger: ‘pipe_fds[1]’ leaks here
# 1012|   	if (pipe(pipe_fds)) {
# 1013|   		fprintf(stderr, "pipes\n");
# 1014|-> 		return 1;
# 1015|   	}
# 1016|   	ret = io_uring_queue_init(8, &ring, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def206]
liburing-2.13/test/file-register.c:1016:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[0]’
liburing-2.13/test/file-register.c:1012:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1016:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1016:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/file-register.c:1016:15: danger: ‘pipe_fds[0]’ leaks here
# 1014|   		return 1;
# 1015|   	}
# 1016|-> 	ret = io_uring_queue_init(8, &ring, 0);
# 1017|   	if (ret) {
# 1018|   		fprintf(stderr, "queue_init: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def207]
liburing-2.13/test/file-register.c:1016:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[1]’
liburing-2.13/test/file-register.c:1012:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1016:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1016:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/file-register.c:1016:15: danger: ‘pipe_fds[1]’ leaks here
# 1014|   		return 1;
# 1015|   	}
# 1016|-> 	ret = io_uring_queue_init(8, &ring, 0);
# 1017|   	if (ret) {
# 1018|   		fprintf(stderr, "queue_init: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def208]
liburing-2.13/test/file-register.c:1022:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[0]’
liburing-2.13/test/file-register.c:1012:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1016:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1017:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1022:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1022:15: throw: if ‘io_uring_register_files_sparse’ throws an exception...
liburing-2.13/test/file-register.c:1022:15: danger: ‘pipe_fds[0]’ leaks here
# 1020|   	}
# 1021|   
# 1022|-> 	ret = io_uring_register_files_sparse(&ring, 10);
# 1023|   	if (ret == -EINVAL) {
# 1024|   not_supported:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def209]
liburing-2.13/test/file-register.c:1022:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[1]’
liburing-2.13/test/file-register.c:1012:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1016:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1017:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1022:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1022:15: throw: if ‘io_uring_register_files_sparse’ throws an exception...
liburing-2.13/test/file-register.c:1022:15: danger: ‘pipe_fds[1]’ leaks here
# 1020|   	}
# 1021|   
# 1022|-> 	ret = io_uring_register_files_sparse(&ring, 10);
# 1023|   	if (ret == -EINVAL) {
# 1024|   not_supported:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def210]
liburing-2.13/test/file-register.c:1025:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[0]’
liburing-2.13/test/file-register.c:1012:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1016:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1017:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1022:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1025:17: throw: if ‘close’ throws an exception...
liburing-2.13/test/file-register.c:1025:17: danger: ‘pipe_fds[0]’ leaks here
# 1023|   	if (ret == -EINVAL) {
# 1024|   not_supported:
# 1025|-> 		close(pipe_fds[0]);
# 1026|   		close(pipe_fds[1]);
# 1027|   		io_uring_queue_exit(&ring);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def211]
liburing-2.13/test/file-register.c:1025:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[1]’
liburing-2.13/test/file-register.c:1012:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1016:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1017:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1022:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1025:17: throw: if ‘close’ throws an exception...
liburing-2.13/test/file-register.c:1025:17: danger: ‘pipe_fds[1]’ leaks here
# 1023|   	if (ret == -EINVAL) {
# 1024|   not_supported:
# 1025|-> 		close(pipe_fds[0]);
# 1026|   		close(pipe_fds[1]);
# 1027|   		io_uring_queue_exit(&ring);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def212]
liburing-2.13/test/file-register.c:1026:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[1]’
liburing-2.13/test/file-register.c:1012:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1016:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1017:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1022:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1026:17: throw: if ‘close’ throws an exception...
liburing-2.13/test/file-register.c:1026:17: danger: ‘pipe_fds[1]’ leaks here
# 1024|   not_supported:
# 1025|   		close(pipe_fds[0]);
# 1026|-> 		close(pipe_fds[1]);
# 1027|   		io_uring_queue_exit(&ring);
# 1028|   		printf("file alloc ranges are not supported, skip\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def213]
liburing-2.13/test/file-register.c:1035:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[0]’
liburing-2.13/test/file-register.c:1012:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1016:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1017:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1022:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1023:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1030:19: branch_false: ...to here
liburing-2.13/test/file-register.c:1030:19: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1035:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1035:15: throw: if ‘io_uring_register_file_alloc_range’ throws an exception...
liburing-2.13/test/file-register.c:1035:15: danger: ‘pipe_fds[0]’ leaks here
# 1033|   	}
# 1034|   
# 1035|-> 	ret = io_uring_register_file_alloc_range(&ring, 0, 1);
# 1036|   	if (ret) {
# 1037|   		if (ret == -EINVAL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def214]
liburing-2.13/test/file-register.c:1035:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[1]’
liburing-2.13/test/file-register.c:1012:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1016:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1017:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1022:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1023:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1030:19: branch_false: ...to here
liburing-2.13/test/file-register.c:1030:19: branch_false: following ‘false’ branch...
liburing-2.13/test/file-register.c:1035:15: branch_false: ...to here
liburing-2.13/test/file-register.c:1035:15: throw: if ‘io_uring_register_file_alloc_range’ throws an exception...
liburing-2.13/test/file-register.c:1035:15: danger: ‘pipe_fds[1]’ leaks here
# 1033|   	}
# 1034|   
# 1035|-> 	ret = io_uring_register_file_alloc_range(&ring, 0, 1);
# 1036|   	if (ret) {
# 1037|   		if (ret == -EINVAL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def215]
liburing-2.13/test/file-verify.c:519:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname, 1)’
liburing-2.13/test/file-verify.c:510:14: acquire_resource: opened here
liburing-2.13/test/file-verify.c:511:12: branch_false: following ‘false’ branch...
liburing-2.13/test/file-verify.c:519:15: branch_false: ...to here
liburing-2.13/test/file-verify.c:519:15: throw: if ‘t_malloc’ throws an exception...
liburing-2.13/test/file-verify.c:519:15: danger: ‘open(fname, 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  517|   
#  518|   	val = 0;
#  519|-> 	buf = t_malloc(4096);
#  520|   	while (left) {
#  521|   		int u_in_buf = 4096 / sizeof(val);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def216]
liburing-2.13/test/files-exit-hang-poll.c:45:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock_listen_fd’
liburing-2.13/test/files-exit-hang-poll.c:59:5: enter_function: entry to ‘main’
liburing-2.13/test/files-exit-hang-poll.c:66:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/files-exit-hang-poll.c:69:26: branch_false: ...to here
liburing-2.13/test/files-exit-hang-poll.c:69:26: acquire_resource: socket created here
liburing-2.13/test/files-exit-hang-poll.c:70:12: branch_false: following ‘false’ branch (when ‘sock_listen_fd >= 0’)...
liburing-2.13/test/files-exit-hang-poll.c:75:9: branch_false: ...to here
liburing-2.13/test/files-exit-hang-poll.c:81:12: branch_false: following ‘false’ branch...
liburing-2.13/test/files-exit-hang-poll.c:86:13: branch_false: ...to here
liburing-2.13/test/files-exit-hang-poll.c:86:12: branch_false: following ‘false’ branch...
liburing-2.13/test/files-exit-hang-poll.c:91:13: branch_false: ...to here
liburing-2.13/test/files-exit-hang-poll.c:91:13: call_function: calling ‘setup_io_uring’ from ‘main’
#   43|   	int ret;
#   44|   
#   45|-> 	ret = io_uring_queue_init(16, &ring, 0);
#   46|   	if (ret) {
#   47|   		fprintf(stderr, "Unable to setup io_uring: %s\n", strerror(-ret));

Error: GCC_ANALYZER_WARNING (CWE-479): [#def217]
liburing-2.13/test/files-exit-hang-poll.c:56:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
liburing-2.13/test/files-exit-hang-poll.c:59:5: enter_function: entry to ‘main’
liburing-2.13/test/files-exit-hang-poll.c:66:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/files-exit-hang-poll.c:69:26: branch_false: ...to here
liburing-2.13/test/files-exit-hang-poll.c:70:12: branch_false: following ‘false’ branch (when ‘sock_listen_fd >= 0’)...
liburing-2.13/test/files-exit-hang-poll.c:75:9: branch_false: ...to here
liburing-2.13/test/files-exit-hang-poll.c:81:12: branch_false: following ‘false’ branch...
liburing-2.13/test/files-exit-hang-poll.c:86:13: branch_false: ...to here
liburing-2.13/test/files-exit-hang-poll.c:86:12: branch_false: following ‘false’ branch...
liburing-2.13/test/files-exit-hang-poll.c:91:13: branch_false: ...to here
liburing-2.13/test/files-exit-hang-poll.c:91:12: branch_false: following ‘false’ branch...
liburing-2.13/test/files-exit-hang-poll.c:94:9: branch_false: ...to here
liburing-2.13/test/files-exit-hang-poll.c:94:9: call_function: calling ‘add_poll’ from ‘main’
liburing-2.13/test/files-exit-hang-poll.c:94:9: return_function: returning to ‘main’ from ‘add_poll’
liburing-2.13/test/files-exit-hang-poll.c:95:9: call_function: calling ‘add_accept’ from ‘main’
liburing-2.13/test/files-exit-hang-poll.c:95:9: return_function: returning to ‘main’ from ‘add_accept’
liburing-2.13/test/files-exit-hang-poll.c:98:12: branch_false: following ‘false’ branch...
liburing-2.13/test/files-exit-hang-poll.c:103:9: branch_false: ...to here
liburing-2.13/test/files-exit-hang-poll.c:54:13: enter_function: entry to ‘alarm_sig’
liburing-2.13/test/files-exit-hang-poll.c:56:9: danger: call to ‘exit’ from within signal handler
#   54|   static void alarm_sig(int sig)
#   55|   {
#   56|-> 	exit(0);
#   57|   }
#   58|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def218]
liburing-2.13/test/files-exit-hang-poll.c:87:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock_listen_fd’
liburing-2.13/test/files-exit-hang-poll.c:66:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/files-exit-hang-poll.c:69:26: branch_false: ...to here
liburing-2.13/test/files-exit-hang-poll.c:69:26: acquire_resource: socket created here
liburing-2.13/test/files-exit-hang-poll.c:70:12: branch_false: following ‘false’ branch (when ‘sock_listen_fd >= 0’)...
liburing-2.13/test/files-exit-hang-poll.c:75:9: branch_false: ...to here
liburing-2.13/test/files-exit-hang-poll.c:81:12: branch_false: following ‘false’ branch...
liburing-2.13/test/files-exit-hang-poll.c:86:13: branch_false: ...to here
liburing-2.13/test/files-exit-hang-poll.c:86:12: branch_true: following ‘true’ branch...
liburing-2.13/test/files-exit-hang-poll.c:87:17: branch_true: ...to here
liburing-2.13/test/files-exit-hang-poll.c:87:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/files-exit-hang-poll.c:87:17: danger: ‘sock_listen_fd’ leaks here
#   85|   
#   86|   	if (listen(sock_listen_fd, BACKLOG) < 0) {
#   87|-> 		perror("Error listening on socket\n");
#   88|   		return T_EXIT_FAIL;
#   89|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def219]
liburing-2.13/test/files-exit-hang-timeout.c:52:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock_listen_fd’
liburing-2.13/test/files-exit-hang-timeout.c:66:5: enter_function: entry to ‘main’
liburing-2.13/test/files-exit-hang-timeout.c:74:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/files-exit-hang-timeout.c:77:26: branch_false: ...to here
liburing-2.13/test/files-exit-hang-timeout.c:77:26: acquire_resource: socket created here
liburing-2.13/test/files-exit-hang-timeout.c:78:12: branch_false: following ‘false’ branch (when ‘sock_listen_fd >= 0’)...
liburing-2.13/test/files-exit-hang-timeout.c:83:9: branch_false: ...to here
liburing-2.13/test/files-exit-hang-timeout.c:105:12: branch_false: following ‘false’ branch...
liburing-2.13/test/files-exit-hang-timeout.c:110:13: branch_false: ...to here
liburing-2.13/test/files-exit-hang-timeout.c:110:13: call_function: calling ‘setup_io_uring’ from ‘main’
#   50|   	int ret;
#   51|   
#   52|-> 	ret = io_uring_queue_init(16, &ring, 0);
#   53|   	if (ret) {
#   54|   		fprintf(stderr, "Unable to setup io_uring: %s\n", strerror(-ret));

Error: GCC_ANALYZER_WARNING (CWE-479): [#def220]
liburing-2.13/test/files-exit-hang-timeout.c:63:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
liburing-2.13/test/files-exit-hang-timeout.c:66:5: enter_function: entry to ‘main’
liburing-2.13/test/files-exit-hang-timeout.c:74:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/files-exit-hang-timeout.c:77:26: branch_false: ...to here
liburing-2.13/test/files-exit-hang-timeout.c:78:12: branch_false: following ‘false’ branch (when ‘sock_listen_fd >= 0’)...
liburing-2.13/test/files-exit-hang-timeout.c:83:9: branch_false: ...to here
liburing-2.13/test/files-exit-hang-timeout.c:105:12: branch_false: following ‘false’ branch...
liburing-2.13/test/files-exit-hang-timeout.c:110:13: branch_false: ...to here
liburing-2.13/test/files-exit-hang-timeout.c:110:12: branch_false: following ‘false’ branch...
liburing-2.13/test/files-exit-hang-timeout.c:113:9: branch_false: ...to here
liburing-2.13/test/files-exit-hang-timeout.c:113:9: call_function: calling ‘add_timeout’ from ‘main’
liburing-2.13/test/files-exit-hang-timeout.c:113:9: return_function: returning to ‘main’ from ‘add_timeout’
liburing-2.13/test/files-exit-hang-timeout.c:114:9: call_function: calling ‘add_accept’ from ‘main’
liburing-2.13/test/files-exit-hang-timeout.c:114:9: return_function: returning to ‘main’ from ‘add_accept’
liburing-2.13/test/files-exit-hang-timeout.c:117:12: branch_false: following ‘false’ branch...
liburing-2.13/test/files-exit-hang-timeout.c:122:9: branch_false: ...to here
liburing-2.13/test/files-exit-hang-timeout.c:61:13: enter_function: entry to ‘alarm_sig’
liburing-2.13/test/files-exit-hang-timeout.c:63:9: danger: call to ‘exit’ from within signal handler
#   61|   static void alarm_sig(int sig)
#   62|   {
#   63|-> 	exit(0);
#   64|   }
#   65|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def221]
liburing-2.13/test/files-exit-hang-timeout.c:106:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock_listen_fd’
liburing-2.13/test/files-exit-hang-timeout.c:74:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/files-exit-hang-timeout.c:77:26: branch_false: ...to here
liburing-2.13/test/files-exit-hang-timeout.c:77:26: acquire_resource: socket created here
liburing-2.13/test/files-exit-hang-timeout.c:78:12: branch_false: following ‘false’ branch (when ‘sock_listen_fd >= 0’)...
liburing-2.13/test/files-exit-hang-timeout.c:83:9: branch_false: ...to here
liburing-2.13/test/files-exit-hang-timeout.c:105:12: branch_true: following ‘true’ branch...
liburing-2.13/test/files-exit-hang-timeout.c:106:17: branch_true: ...to here
liburing-2.13/test/files-exit-hang-timeout.c:106:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/files-exit-hang-timeout.c:106:17: danger: ‘sock_listen_fd’ leaks here
#  104|   
#  105|   	if (listen(sock_listen_fd, BACKLOG) < 0) {
#  106|-> 		perror("Error listening on socket\n");
#  107|   		return T_EXIT_FAIL;
#  108|   	}

Error: GCC_ANALYZER_WARNING (CWE-688): [#def222]
liburing-2.13/test/fixed-buf-iter.c:42:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc(4096)’ where non-null expected
liburing-2.13/test/fixed-buf-iter.c:28:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fixed-buf-iter.c:33:18: branch_false: ...to here
liburing-2.13/test/fixed-buf-iter.c:34:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fixed-buf-iter.c:34:12: branch_false: ...to here
liburing-2.13/test/fixed-buf-iter.c:39:21: branch_true: following ‘true’ branch (when ‘i == 0’)...
liburing-2.13/test/fixed-buf-iter.c:40:35: branch_true: ...to here
liburing-2.13/test/fixed-buf-iter.c:40:35: acquire_memory: this call could return NULL
liburing-2.13/test/fixed-buf-iter.c:42:17: danger: argument 1 (‘malloc(4096)’) from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6) could be NULL where non-null expected
#   40|   		iov[i].iov_base = malloc(BUF_SIZE);
#   41|   		iov[i].iov_len = BUF_SIZE;
#   42|-> 		memset(iov[i].iov_base, 0, BUF_SIZE);
#   43|   	}
#   44|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
liburing-2.13/test/fixed-buf-iter.c:45:15: warning[-Wanalyzer-malloc-leak]: leak of ‘iov[0].iov_base’
liburing-2.13/test/fixed-buf-iter.c:28:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fixed-buf-iter.c:33:18: branch_false: ...to here
liburing-2.13/test/fixed-buf-iter.c:34:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fixed-buf-iter.c:34:12: branch_false: ...to here
liburing-2.13/test/fixed-buf-iter.c:39:21: branch_true: following ‘true’ branch (when ‘i == 0’)...
liburing-2.13/test/fixed-buf-iter.c:40:35: branch_true: ...to here
liburing-2.13/test/fixed-buf-iter.c:40:35: acquire_memory: allocated here
liburing-2.13/test/fixed-buf-iter.c:39:21: branch_false: following ‘false’ branch (when ‘i != 0’)...
liburing-2.13/test/fixed-buf-iter.c:45:15: branch_false: ...to here
liburing-2.13/test/fixed-buf-iter.c:45:15: throw: if ‘io_uring_register_buffers’ throws an exception...
liburing-2.13/test/fixed-buf-iter.c:45:15: danger: ‘iov[0].iov_base’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#   43|   	}
#   44|   
#   45|-> 	ret = io_uring_register_buffers(ring, iov, BUFFERS);
#   46|   	if (ret) {
#   47|   		fprintf(stderr, "Error registering buffers: %s", strerror(-ret));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def224]
liburing-2.13/test/fixed-link.c:30:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/zero", 0)’
liburing-2.13/test/fixed-link.c:21:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/fixed-link.c:24:14: branch_false: ...to here
liburing-2.13/test/fixed-link.c:24:14: acquire_resource: opened here
liburing-2.13/test/fixed-link.c:25:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fixed-link.c:30:13: branch_false: ...to here
liburing-2.13/test/fixed-link.c:30:13: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/fixed-link.c:30:13: danger: ‘open("/dev/zero", 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   28|   	}
#   29|   
#   30|-> 	if (io_uring_queue_init(32, &ring, 0) < 0) {
#   31|   		fprintf(stderr, "Failed to init io_uring\n");
#   32|   		close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def225]
liburing-2.13/test/fixed-link.c:31:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/zero", 0)’
liburing-2.13/test/fixed-link.c:21:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/fixed-link.c:24:14: branch_false: ...to here
liburing-2.13/test/fixed-link.c:24:14: acquire_resource: opened here
liburing-2.13/test/fixed-link.c:25:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fixed-link.c:30:13: branch_false: ...to here
liburing-2.13/test/fixed-link.c:30:12: branch_true: following ‘true’ branch...
liburing-2.13/test/fixed-link.c:31:17: branch_true: ...to here
liburing-2.13/test/fixed-link.c:31:17: danger: ‘open("/dev/zero", 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   29|   
#   30|   	if (io_uring_queue_init(32, &ring, 0) < 0) {
#   31|-> 		fprintf(stderr, "Failed to init io_uring\n");
#   32|   		close(fd);
#   33|   		return T_EXIT_FAIL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def226]
liburing-2.13/test/fixed-link.c:37:38: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/zero", 0)’
liburing-2.13/test/fixed-link.c:21:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/fixed-link.c:24:14: branch_false: ...to here
liburing-2.13/test/fixed-link.c:24:14: acquire_resource: opened here
liburing-2.13/test/fixed-link.c:25:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fixed-link.c:30:13: branch_false: ...to here
liburing-2.13/test/fixed-link.c:30:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fixed-link.c:30:12: branch_false: ...to here
liburing-2.13/test/fixed-link.c:36:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/test/fixed-link.c:37:38: branch_true: ...to here
liburing-2.13/test/fixed-link.c:37:38: throw: if ‘t_malloc’ throws an exception...
liburing-2.13/test/fixed-link.c:37:38: danger: ‘open("/dev/zero", 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#   35|   
#   36|   	for (i = 0; i < IOVECS_LEN; ++i) {
#   37|-> 		iovecs[i].iov_base = t_malloc(64);
#   38|   		iovecs[i].iov_len = 64;
#   39|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def227]
liburing-2.13/test/fixed-link.c:41:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/zero", 0)’
liburing-2.13/test/fixed-link.c:21:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/fixed-link.c:24:14: branch_false: ...to here
liburing-2.13/test/fixed-link.c:24:14: acquire_resource: opened here
liburing-2.13/test/fixed-link.c:25:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fixed-link.c:30:13: branch_false: ...to here
liburing-2.13/test/fixed-link.c:30:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fixed-link.c:30:12: branch_false: ...to here
liburing-2.13/test/fixed-link.c:36:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/test/fixed-link.c:37:38: branch_true: ...to here
liburing-2.13/test/fixed-link.c:41:15: throw: if ‘io_uring_register_buffers’ throws an exception...
liburing-2.13/test/fixed-link.c:41:15: danger: ‘open("/dev/zero", 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#   39|   	}
#   40|   
#   41|-> 	ret = io_uring_register_buffers(&ring, iovecs, IOVECS_LEN);
#   42|   	if (ret) {
#   43|   		fprintf(stderr, "Failed to register buffers\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def228]
liburing-2.13/test/fixed-link.c:42:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/zero", 0)’
liburing-2.13/test/fixed-link.c:21:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/fixed-link.c:24:14: branch_false: ...to here
liburing-2.13/test/fixed-link.c:24:14: acquire_resource: opened here
liburing-2.13/test/fixed-link.c:25:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fixed-link.c:30:13: branch_false: ...to here
liburing-2.13/test/fixed-link.c:30:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fixed-link.c:30:12: branch_false: ...to here
liburing-2.13/test/fixed-link.c:36:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/test/fixed-link.c:37:38: branch_true: ...to here
liburing-2.13/test/fixed-link.c:42:12: danger: ‘open("/dev/zero", 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#   40|   
#   41|   	ret = io_uring_register_buffers(&ring, iovecs, IOVECS_LEN);
#   42|-> 	if (ret) {
#   43|   		fprintf(stderr, "Failed to register buffers\n");
#   44|   		return T_EXIT_FAIL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def229]
liburing-2.13/test/fixed-seg.c:135:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
liburing-2.13/test/fixed-seg.c:117:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fixed-seg.c:121:15: branch_false: ...to here
liburing-2.13/test/fixed-seg.c:124:12: branch_true: following ‘true’ branch...
liburing-2.13/test/fixed-seg.c:124:20: branch_true: ...to here
liburing-2.13/test/fixed-seg.c:124:13: branch_false: following ‘false’ branch...
liburing-2.13/test/fixed-seg.c:129:18: branch_false: ...to here
liburing-2.13/test/fixed-seg.c:129:18: acquire_resource: opened here
liburing-2.13/test/fixed-seg.c:135:13: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  133|   	}
#  134|   
#  135|-> 	if (posix_memalign(&wvec.iov_base, 4096, 512*1024))
#  136|   		goto err;
#  137|   	wvec.iov_len = 512*1024;

Error: GCC_ANALYZER_WARNING: [#def230]
liburing-2.13/test/fixed-seg.c:139:15: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘open("/dev/urandom", 0)’
liburing-2.13/test/fixed-seg.c:117:12: branch_false: following ‘false’ branch...
liburing-2.13/test/fixed-seg.c:121:15: branch_false: ...to here
liburing-2.13/test/fixed-seg.c:124:12: branch_true: following ‘true’ branch...
liburing-2.13/test/fixed-seg.c:124:20: branch_true: ...to here
liburing-2.13/test/fixed-seg.c:124:13: branch_false: following ‘false’ branch...
liburing-2.13/test/fixed-seg.c:129:18: branch_false: ...to here
liburing-2.13/test/fixed-seg.c:129:18: acquire_resource: opened here
liburing-2.13/test/fixed-seg.c:135:13: branch_true: following ‘true’ branch...
liburing-2.13/test/fixed-seg.c:135:13: branch_true: ...to here
liburing-2.13/test/fixed-seg.c:139:15: danger: ‘open("/dev/urandom", 0)’ could be invalid: unchecked value from [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  137|   	wvec.iov_len = 512*1024;
#  138|   
#  139|-> 	ret = read(rnd_fd, wvec.iov_base, wvec.iov_len);
#  140|   	if (ret != wvec.iov_len) {
#  141|   		fprintf(stderr, "Precondition, urandom read failed, ret: %d\n", ret);

Error: CPPCHECK_WARNING (CWE-476): [#def231]
liburing-2.13/test/futex-kill.c:41: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: futex
#   39|   
#   40|   	futex = malloc(sizeof(*futex));
#   41|-> 	*futex = 0;
#   42|   	fw.uaddr = (unsigned long) futex;
#   43|   	fw.flags = FUTEX2_SIZE_U32|FUTEX2_PRIVATE;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def232]
liburing-2.13/test/futex-kill.c:41:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘futex’
liburing-2.13/test/futex-kill.c:79:5: enter_function: entry to ‘main’
liburing-2.13/test/futex-kill.c:83:15: call_function: calling ‘test’ from ‘main’
#   39|   
#   40|   	futex = malloc(sizeof(*futex));
#   41|-> 	*futex = 0;
#   42|   	fw.uaddr = (unsigned long) futex;
#   43|   	fw.flags = FUTEX2_SIZE_U32|FUTEX2_PRIVATE;

Error: CPPCHECK_WARNING (CWE-476): [#def233]
liburing-2.13/test/futex.c:182: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: futex
#  180|   
#  181|   	futex = malloc(sizeof(*futex));
#  182|-> 	*futex = 0;
#  183|   
#  184|   	fw.uaddr = (unsigned long) futex;

Error: CPPCHECK_WARNING (CWE-476): [#def234]
liburing-2.13/test/futex.c:271: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: futex
#  269|   
#  270|   	futex = malloc(sizeof(*futex));
#  271|-> 	*futex = 0;
#  272|   
#  273|   	fw.val = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def235]
liburing-2.13/test/futex.c:271:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘futex’
liburing-2.13/test/futex.c:267:12: branch_false: following ‘false’ branch...
liburing-2.13/test/futex.c:270:17: branch_false: ...to here
liburing-2.13/test/futex.c:270:17: acquire_memory: this call could return NULL
liburing-2.13/test/futex.c:271:9: danger: ‘futex’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  269|   
#  270|   	futex = malloc(sizeof(*futex));
#  271|-> 	*futex = 0;
#  272|   
#  273|   	fw.val = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def236]
liburing-2.13/test/futex.c:354: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: futex
#  352|   
#  353|   	futex = malloc(sizeof(*futex));
#  354|-> 	*futex = 0;
#  355|   
#  356|   	sqe = io_uring_get_sqe(&ring);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def237]
liburing-2.13/test/futex.c:354:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘futex’
liburing-2.13/test/futex.c:350:12: branch_false: following ‘false’ branch...
liburing-2.13/test/futex.c:353:17: branch_false: ...to here
liburing-2.13/test/futex.c:353:17: acquire_memory: this call could return NULL
liburing-2.13/test/futex.c:354:9: danger: ‘futex’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  352|   
#  353|   	futex = malloc(sizeof(*futex));
#  354|-> 	*futex = 0;
#  355|   
#  356|   	sqe = io_uring_get_sqe(&ring);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def238]
liburing-2.13/test/futex.c:357:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
liburing-2.13/test/futex.c:341:12: enter_function: entry to ‘test_wake_zero’
liburing-2.13/test/futex.c:350:12: branch_false: following ‘false’ branch...
liburing-2.13/test/futex.c:353:17: branch_false: ...to here
liburing-2.13/test/futex.c:356:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_wake_zero’
liburing-2.13/test/futex.c:356:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_wake_zero’
liburing-2.13/test/futex.c:357:9: danger: dereference of NULL ‘_io_uring_get_sqe(&ring)’
#  355|   
#  356|   	sqe = io_uring_get_sqe(&ring);
#  357|-> 	sqe->user_data = 1;
#  358|   	io_uring_prep_futex_wait(sqe, futex, 0, FUTEX_BITSET_MATCH_ANY,
#  359|   				 FUTEX2_SIZE_U32, 0);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def239]
liburing-2.13/test/futex.c:364:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
liburing-2.13/test/futex.c:341:12: enter_function: entry to ‘test_wake_zero’
liburing-2.13/test/futex.c:350:12: branch_false: following ‘false’ branch...
liburing-2.13/test/futex.c:353:17: branch_false: ...to here
liburing-2.13/test/futex.c:356:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_wake_zero’
liburing-2.13/test/futex.c:356:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_wake_zero’
liburing-2.13/test/futex.c:363:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_wake_zero’
liburing-2.13/test/futex.c:363:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_wake_zero’
liburing-2.13/test/futex.c:364:9: danger: dereference of NULL ‘_io_uring_get_sqe(&ring)’
#  362|   
#  363|   	sqe = io_uring_get_sqe(&ring);
#  364|-> 	sqe->user_data = 2;
#  365|   	io_uring_prep_futex_wake(sqe, futex, 0, FUTEX_BITSET_MATCH_ANY,
#  366|   				 FUTEX2_SIZE_U32, 0);

Error: CPPCHECK_WARNING (CWE-476): [#def240]
liburing-2.13/test/futex.c:412: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: futex
#  410|   
#  411|   	futex = malloc(sizeof(*futex));
#  412|-> 	*futex = 0;
#  413|   
#  414|   	sqe = io_uring_get_sqe(&ring);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def241]
liburing-2.13/test/futex.c:412:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘futex’
liburing-2.13/test/futex.c:408:12: branch_false: following ‘false’ branch...
liburing-2.13/test/futex.c:411:17: branch_false: ...to here
liburing-2.13/test/futex.c:411:17: acquire_memory: this call could return NULL
liburing-2.13/test/futex.c:412:9: danger: ‘futex’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
#  410|   
#  411|   	futex = malloc(sizeof(*futex));
#  412|-> 	*futex = 0;
#  413|   
#  414|   	sqe = io_uring_get_sqe(&ring);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def242]
liburing-2.13/test/futex.c:415:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
liburing-2.13/test/futex.c:398:12: enter_function: entry to ‘test_invalid’
liburing-2.13/test/futex.c:408:12: branch_false: following ‘false’ branch...
liburing-2.13/test/futex.c:411:17: branch_false: ...to here
liburing-2.13/test/futex.c:414:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_invalid’
liburing-2.13/test/futex.c:414:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_invalid’
liburing-2.13/test/futex.c:415:9: danger: dereference of NULL ‘_io_uring_get_sqe(&ring)’
#  413|   
#  414|   	sqe = io_uring_get_sqe(&ring);
#  415|-> 	sqe->user_data = 1;
#  416|   	io_uring_prep_futex_wait(sqe, futex, 0, FUTEX_BITSET_MATCH_ANY, 0x1000,
#  417|   				 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def243]
liburing-2.13/test/helpers.c:84:9: warning[-Wanalyzer-malloc-leak]: leak of ‘t_malloc(size)’
liburing-2.13/test/helpers.c:77:13: enter_function: entry to ‘__t_create_file’
liburing-2.13/test/helpers.c:83:15: call_function: calling ‘t_malloc’ from ‘__t_create_file’
liburing-2.13/test/helpers.c:83:15: return_function: returning to ‘__t_create_file’ from ‘t_malloc’
liburing-2.13/test/helpers.c:86:14: throw: if ‘open’ throws an exception...
liburing-2.13/test/helpers.c:84:9: danger: ‘t_malloc(size)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#   82|   
#   83|   	buf = t_malloc(size);
#   84|-> 	memset(buf, pattern, size);
#   85|   
#   86|   	fd = open(file, O_WRONLY | O_CREAT, 0644);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def244]
liburing-2.13/test/helpers.c:187:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor
liburing-2.13/test/helpers.c:184:17: acquire_resource: socket created here
liburing-2.13/test/helpers.c:185:12: branch_false: following ‘false’ branch...
liburing-2.13/test/helpers.c:187:17: branch_false: ...to here
liburing-2.13/test/helpers.c:187:17: danger: leaks here
#  185|   	if (fd[0] < 0)
#  186|   		return errno;
#  187|-> 	fd[1] = socket(AF_INET, type, 0);
#  188|   	if (fd[1] < 0) {
#  189|   		ret = errno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def245]
liburing-2.13/test/helpers.c:211:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*fd’
liburing-2.13/test/helpers.c:185:12: branch_false: following ‘false’ branch...
liburing-2.13/test/helpers.c:187:17: branch_false: ...to here
liburing-2.13/test/helpers.c:188:12: branch_false: following ‘false’ branch...
liburing-2.13/test/helpers.c:194:9: branch_false: ...to here
liburing-2.13/test/helpers.c:195:12: branch_false: following ‘false’ branch...
liburing-2.13/test/helpers.c:198:9: branch_false: ...to here
liburing-2.13/test/helpers.c:206:12: branch_false: following ‘false’ branch...
liburing-2.13/test/helpers.c:211:12: branch_false: ...to here
liburing-2.13/test/helpers.c:211:12: branch_true: following ‘true’ branch (when ‘stream != 0’)...
liburing-2.13/test/helpers.c:211:23: branch_true: ...to here
liburing-2.13/test/helpers.c:211:23: danger: ‘*fd’ leaks here
#  209|   	}
#  210|   
#  211|-> 	if (stream && listen(fd[0], 16)) {
#  212|   		fprintf(stderr, "listen failed\n");
#  213|   		goto errno_cleanup;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def246]
liburing-2.13/test/io-cancel.c:146:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 16386)’
liburing-2.13/test/io-cancel.c:138:14: acquire_resource: opened here
liburing-2.13/test/io-cancel.c:139:12: branch_false: following ‘false’ branch...
liburing-2.13/test/io-cancel.c:146:15: branch_false: ...to here
liburing-2.13/test/io-cancel.c:146:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/io-cancel.c:146:15: danger: ‘open(file, 16386)’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  144|   	}
#  145|   
#  146|-> 	ret = io_uring_queue_init(4 * BUFFERS, &ring, 0);
#  147|   	if (ret) {
#  148|   		fprintf(stderr, "ring create failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def247]
liburing-2.13/test/io-cancel.c:194:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/io-cancel.c:182:12: enter_function: entry to ‘test_dont_cancel_another_ring’
liburing-2.13/test/io-cancel.c:192:12: branch_false: following ‘false’ branch...
liburing-2.13/test/io-cancel.c:196:15: branch_false: ...to here
liburing-2.13/test/io-cancel.c:197:12: branch_false: following ‘false’ branch...
liburing-2.13/test/io-cancel.c:201:13: branch_false: ...to here
liburing-2.13/test/io-cancel.c:201:12: branch_false: following ‘false’ branch...
liburing-2.13/test/io-cancel.c:206:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_dont_cancel_another_ring’
liburing-2.13/test/io-cancel.c:206:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_dont_cancel_another_ring’
liburing-2.13/test/io-cancel.c:207:12: branch_true: following ‘true’ branch...
liburing-2.13/test/io-cancel.c:208:17: branch_true: ...to here
liburing-2.13/test/io-cancel.c:194:24: danger: ‘fds[0]’ leaks here
#  192|   	if (ret) {
#  193|   		fprintf(stderr, "ring create failed: %d\n", ret);
#  194|-> 		return 1;
#  195|   	}
#  196|   	ret = io_uring_queue_init(8, &ring2, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def248]
liburing-2.13/test/io-cancel.c:194:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/io-cancel.c:182:12: enter_function: entry to ‘test_dont_cancel_another_ring’
liburing-2.13/test/io-cancel.c:192:12: branch_false: following ‘false’ branch...
liburing-2.13/test/io-cancel.c:196:15: branch_false: ...to here
liburing-2.13/test/io-cancel.c:197:12: branch_false: following ‘false’ branch...
liburing-2.13/test/io-cancel.c:201:13: branch_false: ...to here
liburing-2.13/test/io-cancel.c:201:12: branch_false: following ‘false’ branch...
liburing-2.13/test/io-cancel.c:206:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_dont_cancel_another_ring’
liburing-2.13/test/io-cancel.c:206:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_dont_cancel_another_ring’
liburing-2.13/test/io-cancel.c:207:12: branch_true: following ‘true’ branch...
liburing-2.13/test/io-cancel.c:208:17: branch_true: ...to here
liburing-2.13/test/io-cancel.c:194:24: danger: ‘fds[1]’ leaks here
#  192|   	if (ret) {
#  193|   		fprintf(stderr, "ring create failed: %d\n", ret);
#  194|-> 		return 1;
#  195|   	}
#  196|   	ret = io_uring_queue_init(8, &ring2, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def249]
liburing-2.13/test/io-cancel.c:274:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/io-cancel.c:262:12: enter_function: entry to ‘test_cancel_req_across_fork’
liburing-2.13/test/io-cancel.c:272:12: branch_false: following ‘false’ branch...
liburing-2.13/test/io-cancel.c:276:13: branch_false: ...to here
liburing-2.13/test/io-cancel.c:276:12: branch_false: following ‘false’ branch...
liburing-2.13/test/io-cancel.c:280:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_cancel_req_across_fork’
liburing-2.13/test/io-cancel.c:280:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_cancel_req_across_fork’
liburing-2.13/test/io-cancel.c:281:12: branch_true: following ‘true’ branch...
liburing-2.13/test/io-cancel.c:282:17: branch_true: ...to here
liburing-2.13/test/io-cancel.c:274:24: danger: ‘fds[0]’ leaks here
#  272|   	if (ret) {
#  273|   		fprintf(stderr, "ring create failed: %d\n", ret);
#  274|-> 		return 1;
#  275|   	}
#  276|   	if (pipe(fds)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def250]
liburing-2.13/test/io-cancel.c:274:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/io-cancel.c:262:12: enter_function: entry to ‘test_cancel_req_across_fork’
liburing-2.13/test/io-cancel.c:272:12: branch_false: following ‘false’ branch...
liburing-2.13/test/io-cancel.c:276:13: branch_false: ...to here
liburing-2.13/test/io-cancel.c:276:12: branch_false: following ‘false’ branch...
liburing-2.13/test/io-cancel.c:280:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_cancel_req_across_fork’
liburing-2.13/test/io-cancel.c:280:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_cancel_req_across_fork’
liburing-2.13/test/io-cancel.c:281:12: branch_true: following ‘true’ branch...
liburing-2.13/test/io-cancel.c:282:17: branch_true: ...to here
liburing-2.13/test/io-cancel.c:274:24: danger: ‘fds[1]’ leaks here
#  272|   	if (ret) {
#  273|   		fprintf(stderr, "ring create failed: %d\n", ret);
#  274|-> 		return 1;
#  275|   	}
#  276|   	if (pipe(fds)) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def251]
liburing-2.13/test/io_uring_passthrough.c:109:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/test/io_uring_passthrough.c:100:14: acquire_resource: opened here
liburing-2.13/test/io_uring_passthrough.c:101:12: branch_false: following ‘false’ branch...
liburing-2.13/test/io_uring_passthrough.c:108:12: branch_false: ...to here
liburing-2.13/test/io_uring_passthrough.c:108:12: branch_true: following ‘true’ branch (when ‘sqthread != 0’)...
liburing-2.13/test/io_uring_passthrough.c:109:23: branch_true: ...to here
liburing-2.13/test/io_uring_passthrough.c:109:23: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/io_uring_passthrough.c:109:23: danger: ‘fd’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  107|   
#  108|   	if (sqthread) {
#  109|-> 		ret = io_uring_register_files(ring, &fd, 1);
#  110|   		if (ret) {
#  111|   			fprintf(stderr, "file reg failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def252]
liburing-2.13/test/io_uring_passthrough.c:261:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/test/io_uring_passthrough.c:265:12: enter_function: entry to ‘test_io’
liburing-2.13/test/io_uring_passthrough.c:284:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/io_uring_passthrough.c:286:12: branch_false: ...to here
liburing-2.13/test/io_uring_passthrough.c:286:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/io_uring_passthrough.c:295:15: branch_false: ...to here
liburing-2.13/test/io_uring_passthrough.c:295:15: call_function: calling ‘__test_io’ from ‘test_io’
#  259|   err:
#  260|   	if (fd != -1)
#  261|-> 		close(fd);
#  262|   	return 1;
#  263|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def253]
liburing-2.13/test/io_uring_register.c:40:15: warning[-Wanalyzer-malloc-leak]: leak of ‘iovs’
liburing-2.13/test/io_uring_register.c:277:12: enter_function: entry to ‘test_iovec_nr’
liburing-2.13/test/io_uring_register.c:284:16: acquire_memory: allocated here
liburing-2.13/test/io_uring_register.c:285:12: branch_false: following ‘false’ branch (when ‘iovs’ is non-NULL)...
liburing-2.13/test/io_uring_register.c:289:15: branch_false: ...to here
liburing-2.13/test/io_uring_register.c:291:21: branch_true: following ‘true’ branch (when ‘i != 1000000’)...
liburing-2.13/test/io_uring_register.c:292:21: branch_true: ...to here
liburing-2.13/test/io_uring_register.c:296:19: call_function: calling ‘expect_fail’ from ‘test_iovec_nr’
#   38|   	int ret;
#   39|   
#   40|-> 	ret = io_uring_register(fd, opcode, arg, nr_args);
#   41|   	if (ret >= 0) {
#   42|   		int ret2 = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
liburing-2.13/test/io_uring_register.c:46:32: warning[-Wanalyzer-malloc-leak]: leak of ‘iovs’
liburing-2.13/test/io_uring_register.c:277:12: enter_function: entry to ‘test_iovec_nr’
liburing-2.13/test/io_uring_register.c:284:16: acquire_memory: allocated here
liburing-2.13/test/io_uring_register.c:285:12: branch_false: following ‘false’ branch (when ‘iovs’ is non-NULL)...
liburing-2.13/test/io_uring_register.c:289:15: branch_false: ...to here
liburing-2.13/test/io_uring_register.c:291:21: branch_true: following ‘true’ branch (when ‘i != 1000000’)...
liburing-2.13/test/io_uring_register.c:292:21: branch_true: ...to here
liburing-2.13/test/io_uring_register.c:296:19: call_function: calling ‘expect_fail’ from ‘test_iovec_nr’
#   44|   		fprintf(stderr, "expected %s, but call succeeded\n", strerror(error));
#   45|   		if (opcode == IORING_REGISTER_BUFFERS) {
#   46|-> 			ret2 = io_uring_register(fd, IORING_UNREGISTER_BUFFERS,
#   47|   						 0, 0);
#   48|   		} else if (opcode == IORING_REGISTER_FILES) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def255]
liburing-2.13/test/io_uring_register.c:178:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
liburing-2.13/test/io_uring_register.c:152:12: branch_false: following ‘false’ branch (when ‘fd_as != 18446744073709551615’)...
liburing-2.13/test/io_uring_register.c:159:22: branch_false: ...to here
liburing-2.13/test/io_uring_register.c:160:12: branch_false: following ‘false’ branch...
liburing-2.13/test/io_uring_register.c:164:9: branch_false: ...to here
liburing-2.13/test/io_uring_register.c:166:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/io_uring_register.c:171:17: branch_false: ...to here
liburing-2.13/test/io_uring_register.c:171:17: acquire_resource: opened here
liburing-2.13/test/io_uring_register.c:172:12: branch_false: following ‘false’ branch...
liburing-2.13/test/io_uring_register.c:176:15: branch_false: ...to here
liburing-2.13/test/io_uring_register.c:178:12: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  176|   	fds = mmap(fd_as, 128*1024*1024, PROT_READ|PROT_WRITE,
#  177|   		   MAP_SHARED|MAP_FIXED, fdtable_fd, 0);
#  178|-> 	if (fds == MAP_FAILED) {
#  179|   		perror("mmap fdtable");
#  180|   		exit(1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def256]
liburing-2.13/test/io_uring_register.c:186:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
liburing-2.13/test/io_uring_register.c:152:12: branch_false: following ‘false’ branch (when ‘fd_as != 18446744073709551615’)...
liburing-2.13/test/io_uring_register.c:159:22: branch_false: ...to here
liburing-2.13/test/io_uring_register.c:160:12: branch_false: following ‘false’ branch...
liburing-2.13/test/io_uring_register.c:164:9: branch_false: ...to here
liburing-2.13/test/io_uring_register.c:166:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/io_uring_register.c:171:17: branch_false: ...to here
liburing-2.13/test/io_uring_register.c:171:17: acquire_resource: opened here
liburing-2.13/test/io_uring_register.c:172:12: branch_false: following ‘false’ branch...
liburing-2.13/test/io_uring_register.c:176:15: branch_false: ...to here
liburing-2.13/test/io_uring_register.c:178:12: branch_false: following ‘false’ branch (when ‘fds != 18446744073709551615’)...
liburing-2.13/test/io_uring_register.c:178:12: branch_false: ...to here
liburing-2.13/test/io_uring_register.c:185:21: branch_true: following ‘true’ branch (when ‘i != 33554432’)...
liburing-2.13/test/io_uring_register.c:186:20: branch_true: ...to here
liburing-2.13/test/io_uring_register.c:185:21: branch_false: following ‘false’ branch (when ‘i == 33554432’)...
liburing-2.13/test/io_uring_register.c:185:21: branch_false: ...to here
liburing-2.13/test/io_uring_register.c:190:21: branch_true: following ‘true’ branch (when ‘i != 127’)...
liburing-2.13/test/io_uring_register.c:191:17: branch_true: ...to here
liburing-2.13/test/io_uring_register.c:186:20: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  184|   	nr_fds = 128*1024*1024 / sizeof(int);
#  185|   	for (i = 0; i < nr_fds; i++)
#  186|-> 		fds[i] = io_fd;
#  187|   
#  188|   	/* map the file through the rest of the address space */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def257]
liburing-2.13/test/io_uring_register.c:289:15: warning[-Wanalyzer-malloc-leak]: leak of ‘iovs’
liburing-2.13/test/io_uring_register.c:284:16: acquire_memory: allocated here
liburing-2.13/test/io_uring_register.c:285:12: branch_false: following ‘false’ branch (when ‘iovs’ is non-NULL)...
liburing-2.13/test/io_uring_register.c:289:15: branch_false: ...to here
liburing-2.13/test/io_uring_register.c:289:15: throw: if ‘t_malloc’ throws an exception...
liburing-2.13/test/io_uring_register.c:289:15: danger: ‘iovs’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  287|   		return 0;
#  288|   	}
#  289|-> 	buf = t_malloc(pagesize);
#  290|   
#  291|   	for (i = 0; i < nr; i++) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def258]
liburing-2.13/test/io_uring_register.c:300:15: warning[-Wanalyzer-malloc-leak]: leak of ‘iovs’
liburing-2.13/test/io_uring_register.c:284:16: acquire_memory: allocated here
liburing-2.13/test/io_uring_register.c:285:12: branch_false: following ‘false’ branch (when ‘iovs’ is non-NULL)...
liburing-2.13/test/io_uring_register.c:289:15: branch_false: ...to here
liburing-2.13/test/io_uring_register.c:291:21: branch_true: following ‘true’ branch (when ‘i != 1000000’)...
liburing-2.13/test/io_uring_register.c:292:21: branch_true: ...to here
liburing-2.13/test/io_uring_register.c:300:15: throw: if ‘io_uring_register’ throws an exception...
liburing-2.13/test/io_uring_register.c:300:15: danger: ‘iovs’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  298|   	/* reduce to UIO_MAXIOV */
#  299|   	nr = UIO_MAXIOV;
#  300|-> 	ret = io_uring_register(fd, IORING_REGISTER_BUFFERS, iovs, nr);
#  301|   	if ((ret == -ENOMEM || ret == -EPERM) && geteuid()) {
#  302|   		fprintf(stderr, "can't register large iovec for regular users, skip\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def259]
liburing-2.13/test/io_uring_register.c:307:17: warning[-Wanalyzer-malloc-leak]: leak of ‘iovs’
liburing-2.13/test/io_uring_register.c:284:16: acquire_memory: allocated here
liburing-2.13/test/io_uring_register.c:285:12: branch_false: following ‘false’ branch (when ‘iovs’ is non-NULL)...
liburing-2.13/test/io_uring_register.c:289:15: branch_false: ...to here
liburing-2.13/test/io_uring_register.c:291:21: branch_true: following ‘true’ branch (when ‘i != 1000000’)...
liburing-2.13/test/io_uring_register.c:292:21: branch_true: ...to here
liburing-2.13/test/io_uring_register.c:303:19: branch_false: following ‘false’ branch...
liburing-2.13/test/io_uring_register.c:307:17: branch_false: ...to here
liburing-2.13/test/io_uring_register.c:307:17: throw: if ‘io_uring_register’ throws an exception...
liburing-2.13/test/io_uring_register.c:307:17: danger: ‘iovs’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  305|   		status = 1;
#  306|   	} else {
#  307|-> 		io_uring_register(fd, IORING_UNREGISTER_BUFFERS, 0, 0);
#  308|   	}
#  309|   	free(buf);

Error: COMPILER_WARNING: [#def260]
liburing-2.13/test/io_uring_register.c:410:9: warning[-Wstringop-overflow=]: ‘memset’ writing 63 bytes into a region of size 0 overflows the destination
#destination object is likely at address zero
#  408|   
#  409|   	sqe = io_uring_get_sqe(ring);
#  410|-> 	memset(sqe, 0, sizeof(*sqe));
#  411|   	sqe->opcode = IORING_OP_POLL_ADD;
#  412|   	if (fixed)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def261]
liburing-2.13/test/io_uring_register.c:411:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
liburing-2.13/test/io_uring_register.c:403:12: enter_function: entry to ‘ioring_poll’
liburing-2.13/test/io_uring_register.c:409:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘ioring_poll’
liburing-2.13/test/io_uring_register.c:409:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘ioring_poll’
liburing-2.13/test/io_uring_register.c:411:9: danger: dereference of NULL ‘_io_uring_get_sqe(ring)’
#  409|   	sqe = io_uring_get_sqe(ring);
#  410|   	memset(sqe, 0, sizeof(*sqe));
#  411|-> 	sqe->opcode = IORING_OP_POLL_ADD;
#  412|   	if (fixed)
#  413|   		sqe->flags = IOSQE_FIXED_FILE;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def262]
liburing-2.13/test/iopoll-leak.c:35:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname, 16384)’
liburing-2.13/test/iopoll-leak.c:27:14: acquire_resource: opened here
liburing-2.13/test/iopoll-leak.c:28:12: branch_false: following ‘false’ branch...
liburing-2.13/test/iopoll-leak.c:35:15: branch_false: ...to here
liburing-2.13/test/iopoll-leak.c:35:15: throw: if ‘t_create_buffers’ throws an exception...
liburing-2.13/test/iopoll-leak.c:35:15: danger: ‘open(fname, 16384)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   33|   	}
#   34|   
#   35|-> 	iov = t_create_buffers(1, 4096);
#   36|   
#   37|   	t_create_ring(2, &ring, IORING_SETUP_IOPOLL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def263]
liburing-2.13/test/iopoll-leak.c:37:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname, 16384)’
liburing-2.13/test/iopoll-leak.c:27:14: acquire_resource: opened here
liburing-2.13/test/iopoll-leak.c:28:12: branch_false: following ‘false’ branch...
liburing-2.13/test/iopoll-leak.c:35:15: branch_false: ...to here
liburing-2.13/test/iopoll-leak.c:37:9: throw: if ‘t_create_ring’ throws an exception...
liburing-2.13/test/iopoll-leak.c:37:9: danger: ‘open(fname, 16384)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   35|   	iov = t_create_buffers(1, 4096);
#   36|   
#   37|-> 	t_create_ring(2, &ring, IORING_SETUP_IOPOLL);
#   38|   
#   39|   	sqe = io_uring_get_sqe(&ring);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def264]
liburing-2.13/test/iopoll-overflow.c:108:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname, 16384)’
liburing-2.13/test/iopoll-overflow.c:80:12: branch_false: following ‘false’ branch...
liburing-2.13/test/iopoll-overflow.c:82:12: branch_false: ...to here
liburing-2.13/test/iopoll-overflow.c:82:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/iopoll-overflow.c:87:12: branch_false: ...to here
liburing-2.13/test/iopoll-overflow.c:97:14: acquire_resource: opened here
liburing-2.13/test/iopoll-overflow.c:98:12: branch_false: following ‘false’ branch...
liburing-2.13/test/iopoll-overflow.c:108:16: branch_false: ...to here
liburing-2.13/test/iopoll-overflow.c:108:16: throw: if ‘t_create_buffers’ throws an exception...
liburing-2.13/test/iopoll-overflow.c:108:16: danger: ‘open(fname, 16384)’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  106|   	}
#  107|   
#  108|-> 	vecs = t_create_buffers(BUFFERS, BS);
#  109|   
#  110|   	ret = test(&ring, fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def265]
liburing-2.13/test/iopoll.c:97:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/test/iopoll.c:354:12: enter_function: entry to ‘test_io’
liburing-2.13/test/iopoll.c:360:12: branch_false: following ‘false’ branch...
liburing-2.13/test/iopoll.c:363:12: branch_false: ...to here
liburing-2.13/test/iopoll.c:371:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/iopoll.c:374:12: branch_false: ...to here
liburing-2.13/test/iopoll.c:374:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/iopoll.c:382:15: branch_false: ...to here
liburing-2.13/test/iopoll.c:382:15: call_function: calling ‘__test_io’ from ‘test_io’
#   95|   	}
#   96|   	if (sqthread) {
#   97|-> 		ret = io_uring_register_files(ring, &fd, 1);
#   98|   		if (ret) {
#   99|   			fprintf(stderr, "file reg failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def266]
liburing-2.13/test/iopoll.c:203:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/test/iopoll.c:354:12: enter_function: entry to ‘test_io’
liburing-2.13/test/iopoll.c:360:12: branch_false: following ‘false’ branch...
liburing-2.13/test/iopoll.c:363:12: branch_false: ...to here
liburing-2.13/test/iopoll.c:371:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/iopoll.c:374:12: branch_false: ...to here
liburing-2.13/test/iopoll.c:374:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/iopoll.c:382:15: branch_false: ...to here
liburing-2.13/test/iopoll.c:382:15: call_function: calling ‘__test_io’ from ‘test_io’
#  201|   err:
#  202|   	if (fd != -1)
#  203|-> 		close(fd);
#  204|   	return 1;
#  205|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def267]
liburing-2.13/test/iowait.c:54:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/iowait.c:56:12: branch_false: following ‘false’ branch...
liburing-2.13/test/iowait.c:61:15: branch_false: ...to here
liburing-2.13/test/iowait.c:62:12: branch_true: following ‘true’ branch...
liburing-2.13/test/iowait.c:63:17: branch_true: ...to here
liburing-2.13/test/iowait.c:54:24: danger: ‘fds[0]’ leaks here
#   52|   
#   53|   	if (!(ring->features & IORING_FEAT_NO_IOWAIT))
#   54|-> 		return T_EXIT_SKIP;
#   55|   
#   56|   	if (pipe(fds) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def268]
liburing-2.13/test/iowait.c:54:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/iowait.c:56:12: branch_false: following ‘false’ branch...
liburing-2.13/test/iowait.c:61:15: branch_false: ...to here
liburing-2.13/test/iowait.c:62:12: branch_true: following ‘true’ branch...
liburing-2.13/test/iowait.c:63:17: branch_true: ...to here
liburing-2.13/test/iowait.c:54:24: danger: ‘fds[1]’ leaks here
#   52|   
#   53|   	if (!(ring->features & IORING_FEAT_NO_IOWAIT))
#   54|-> 		return T_EXIT_SKIP;
#   55|   
#   56|   	if (pipe(fds) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def269]
liburing-2.13/test/iowait.c:54:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[with_iowait]’
liburing-2.13/test/iowait.c:106:5: enter_function: entry to ‘main’
liburing-2.13/test/iowait.c:114:12: branch_false: following ‘false’ branch...
liburing-2.13/test/iowait.c:117:15: branch_false: ...to here
liburing-2.13/test/iowait.c:118:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/iowait.c:120:17: branch_false: ...to here
liburing-2.13/test/iowait.c:120:17: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/iowait.c:123:15: branch_false: ...to here
liburing-2.13/test/iowait.c:123:15: call_function: calling ‘test’ from ‘main’
#   52|   
#   53|   	if (!(ring->features & IORING_FEAT_NO_IOWAIT))
#   54|-> 		return T_EXIT_SKIP;
#   55|   
#   56|   	if (pipe(fds) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def270]
liburing-2.13/test/iowait.c:61:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/iowait.c:56:12: branch_false: following ‘false’ branch...
liburing-2.13/test/iowait.c:61:15: branch_false: ...to here
liburing-2.13/test/iowait.c:61:15: throw: if ‘io_uring_set_iowait’ throws an exception...
liburing-2.13/test/iowait.c:61:15: danger: ‘fds[0]’ leaks here
#   59|   	}
#   60|   
#   61|-> 	ret = io_uring_set_iowait(ring, with_iowait);
#   62|   	if (ret) {
#   63|   		fprintf(stderr, "set_iowait=%d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def271]
liburing-2.13/test/iowait.c:61:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/iowait.c:56:12: branch_false: following ‘false’ branch...
liburing-2.13/test/iowait.c:61:15: branch_false: ...to here
liburing-2.13/test/iowait.c:61:15: throw: if ‘io_uring_set_iowait’ throws an exception...
liburing-2.13/test/iowait.c:61:15: danger: ‘fds[1]’ leaks here
#   59|   	}
#   60|   
#   61|-> 	ret = io_uring_set_iowait(ring, with_iowait);
#   62|   	if (ret) {
#   63|   		fprintf(stderr, "set_iowait=%d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def272]
liburing-2.13/test/iowait.c:61:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[with_iowait]’
liburing-2.13/test/iowait.c:106:5: enter_function: entry to ‘main’
liburing-2.13/test/iowait.c:114:12: branch_false: following ‘false’ branch...
liburing-2.13/test/iowait.c:117:15: branch_false: ...to here
liburing-2.13/test/iowait.c:118:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/iowait.c:120:17: branch_false: ...to here
liburing-2.13/test/iowait.c:120:17: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/iowait.c:123:15: branch_false: ...to here
liburing-2.13/test/iowait.c:123:15: call_function: calling ‘test’ from ‘main’
#   59|   	}
#   60|   
#   61|-> 	ret = io_uring_set_iowait(ring, with_iowait);
#   62|   	if (ret) {
#   63|   		fprintf(stderr, "set_iowait=%d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def273]
liburing-2.13/test/lfs-openat-write.c:109:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/tmp", 65536)’
liburing-2.13/test/lfs-openat-write.c:102:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/lfs-openat-write.c:105:15: branch_false: ...to here
liburing-2.13/test/lfs-openat-write.c:105:15: acquire_resource: opened here
liburing-2.13/test/lfs-openat-write.c:106:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat-write.c:109:15: branch_false: ...to here
liburing-2.13/test/lfs-openat-write.c:109:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/lfs-openat-write.c:109:15: danger: ‘open("/tmp", 65536)’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  107|   		DIE("open /tmp: %s\n", strerror(errno));
#  108|   
#  109|-> 	ret = io_uring_queue_init(RSIZE, &ring, 0);
#  110|   	if (ret < 0)
#  111|   		DIE("failed to init io_uring: %s\n", strerror(-ret));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def274]
liburing-2.13/test/lfs-openat-write.c:110:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/tmp", 65536)’
liburing-2.13/test/lfs-openat-write.c:102:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/lfs-openat-write.c:105:15: branch_false: ...to here
liburing-2.13/test/lfs-openat-write.c:105:15: acquire_resource: opened here
liburing-2.13/test/lfs-openat-write.c:106:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat-write.c:109:15: branch_false: ...to here
liburing-2.13/test/lfs-openat-write.c:110:12: danger: ‘open("/tmp", 65536)’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  108|   
#  109|   	ret = io_uring_queue_init(RSIZE, &ring, 0);
#  110|-> 	if (ret < 0)
#  111|   		DIE("failed to init io_uring: %s\n", strerror(-ret));
#  112|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def275]
liburing-2.13/test/lfs-openat.c:64:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/tmp", 2097152)’
liburing-2.13/test/lfs-openat.c:213:5: enter_function: entry to ‘main’
liburing-2.13/test/lfs-openat.c:219:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/lfs-openat.c:222:15: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:222:15: acquire_resource: opened here
liburing-2.13/test/lfs-openat.c:223:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:226:15: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:227:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:230:13: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:230:13: call_function: calling ‘prepare_file’ from ‘main’
#   62|   	int fd, res;
#   63|   
#   64|-> 	fd = openat(dfd, fn, OPEN_FLAGS, OPEN_MODE);
#   65|   	if (fd < 0) {
#   66|   		fprintf(stderr, "prepare/open: %s\n", strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def276]
liburing-2.13/test/lfs-openat.c:93:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/lfs-openat.c:78:12: enter_function: entry to ‘test_linked_files’
liburing-2.13/test/lfs-openat.c:88:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:91:13: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:91:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:96:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_linked_files’
liburing-2.13/test/lfs-openat.c:96:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_linked_files’
liburing-2.13/test/lfs-openat.c:97:12: branch_true: following ‘true’ branch...
liburing-2.13/test/lfs-openat.c:98:17: branch_true: ...to here
liburing-2.13/test/lfs-openat.c:93:24: danger: ‘fds[0]’ leaks here
#   91|   	if (pipe(fds)) {
#   92|   		perror("pipe");
#   93|-> 		return 1;
#   94|   	}
#   95|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def277]
liburing-2.13/test/lfs-openat.c:93:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/lfs-openat.c:78:12: enter_function: entry to ‘test_linked_files’
liburing-2.13/test/lfs-openat.c:88:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:91:13: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:91:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:96:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_linked_files’
liburing-2.13/test/lfs-openat.c:96:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_linked_files’
liburing-2.13/test/lfs-openat.c:97:12: branch_true: following ‘true’ branch...
liburing-2.13/test/lfs-openat.c:98:17: branch_true: ...to here
liburing-2.13/test/lfs-openat.c:93:24: danger: ‘fds[1]’ leaks here
#   91|   	if (pipe(fds)) {
#   92|   		perror("pipe");
#   93|-> 		return 1;
#   94|   	}
#   95|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def278]
liburing-2.13/test/lfs-openat.c:126:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/test/lfs-openat.c:78:12: enter_function: entry to ‘test_linked_files’
liburing-2.13/test/lfs-openat.c:88:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:91:13: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:91:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:96:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_linked_files’
liburing-2.13/test/lfs-openat.c:96:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_linked_files’
liburing-2.13/test/lfs-openat.c:97:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:101:9: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:106:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_linked_files’
liburing-2.13/test/lfs-openat.c:106:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_linked_files’
liburing-2.13/test/lfs-openat.c:107:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:111:9: call_function: inlined call to ‘io_uring_prep_openat’ from ‘test_linked_files’
liburing-2.13/test/lfs-openat.c:114:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:119:14: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:119:14: acquire_resource: opened here
liburing-2.13/test/lfs-openat.c:120:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/lfs-openat.c:126:9: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:126:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/lfs-openat.c:126:9: danger: ‘fd’ leaks here; was opened at [(29)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/28)
#  124|   
#  125|   	/* io_uring->flush() */
#  126|-> 	close(fd);
#  127|   
#  128|   	io_uring_queue_exit(&ring);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def279]
liburing-2.13/test/lfs-openat.c:146:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/lfs-openat.c:132:12: enter_function: entry to ‘test_drained_files’
liburing-2.13/test/lfs-openat.c:141:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:144:13: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:144:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:149:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_drained_files’
liburing-2.13/test/lfs-openat.c:149:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_drained_files’
liburing-2.13/test/lfs-openat.c:150:12: branch_true: following ‘true’ branch...
liburing-2.13/test/lfs-openat.c:151:17: branch_true: ...to here
liburing-2.13/test/lfs-openat.c:146:24: danger: ‘fds[0]’ leaks here
#  144|   	if (pipe(fds)) {
#  145|   		perror("pipe");
#  146|-> 		return 1;
#  147|   	}
#  148|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def280]
liburing-2.13/test/lfs-openat.c:146:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/lfs-openat.c:132:12: enter_function: entry to ‘test_drained_files’
liburing-2.13/test/lfs-openat.c:141:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:144:13: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:144:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:149:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_drained_files’
liburing-2.13/test/lfs-openat.c:149:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_drained_files’
liburing-2.13/test/lfs-openat.c:150:12: branch_true: following ‘true’ branch...
liburing-2.13/test/lfs-openat.c:151:17: branch_true: ...to here
liburing-2.13/test/lfs-openat.c:146:24: danger: ‘fds[1]’ leaks here
#  144|   	if (pipe(fds)) {
#  145|   		perror("pipe");
#  146|-> 		return 1;
#  147|   	}
#  148|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def281]
liburing-2.13/test/lfs-openat.c:208:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/test/lfs-openat.c:132:12: enter_function: entry to ‘test_drained_files’
liburing-2.13/test/lfs-openat.c:141:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:144:13: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:144:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:149:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_drained_files’
liburing-2.13/test/lfs-openat.c:149:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_drained_files’
liburing-2.13/test/lfs-openat.c:150:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:154:9: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:181:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_drained_files’
liburing-2.13/test/lfs-openat.c:181:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_drained_files’
liburing-2.13/test/lfs-openat.c:182:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:186:9: call_function: inlined call to ‘io_uring_prep_openat’ from ‘test_drained_files’
liburing-2.13/test/lfs-openat.c:193:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:198:14: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:198:14: acquire_resource: opened here
liburing-2.13/test/lfs-openat.c:199:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/lfs-openat.c:208:9: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:208:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/lfs-openat.c:208:9: danger: ‘fd’ leaks here; was opened at [(29)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/28)
#  206|   	 * should successfully return and not hang.
#  207|   	 */
#  208|-> 	close(fd);
#  209|   	io_uring_queue_exit(&ring);
#  210|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def282]
liburing-2.13/test/lfs-openat.c:226:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/tmp", 2097152)’
liburing-2.13/test/lfs-openat.c:219:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/lfs-openat.c:222:15: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:222:15: acquire_resource: opened here
liburing-2.13/test/lfs-openat.c:223:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:226:15: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:226:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/lfs-openat.c:226:15: danger: ‘open("/tmp", 2097152)’ leaks here; was opened at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  224|   		DIE("open /tmp: %s\n", strerror(errno));
#  225|   
#  226|-> 	ret = io_uring_queue_init(RSIZE, &ring, 0);
#  227|   	if (ret < 0)
#  228|   		DIE("failed to init io_uring: %s\n", strerror(-ret));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def283]
liburing-2.13/test/lfs-openat.c:227:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/tmp", 2097152)’
liburing-2.13/test/lfs-openat.c:219:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/lfs-openat.c:222:15: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:222:15: acquire_resource: opened here
liburing-2.13/test/lfs-openat.c:223:12: branch_false: following ‘false’ branch...
liburing-2.13/test/lfs-openat.c:226:15: branch_false: ...to here
liburing-2.13/test/lfs-openat.c:227:12: danger: ‘open("/tmp", 2097152)’ leaks here; was opened at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  225|   
#  226|   	ret = io_uring_queue_init(RSIZE, &ring, 0);
#  227|-> 	if (ret < 0)
#  228|   		DIE("failed to init io_uring: %s\n", strerror(-ret));
#  229|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def284]
liburing-2.13/test/link-timeout.c:685:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/link-timeout.c:1143:5: enter_function: entry to ‘main’
liburing-2.13/test/link-timeout.c:1148:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/link-timeout.c:1151:15: branch_false: ...to here
liburing-2.13/test/link-timeout.c:1152:12: branch_false: following ‘false’ branch...
liburing-2.13/test/link-timeout.c:1157:15: branch_false: ...to here
liburing-2.13/test/link-timeout.c:1157:15: call_function: calling ‘test_timeout_link_chain1’ from ‘main’
#  683|   	if (pipe(fds)) {
#  684|   		perror("pipe");
#  685|-> 		return 1;
#  686|   	}
#  687|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def285]
liburing-2.13/test/link-timeout.c:685:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/link-timeout.c:1143:5: enter_function: entry to ‘main’
liburing-2.13/test/link-timeout.c:1148:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/link-timeout.c:1151:15: branch_false: ...to here
liburing-2.13/test/link-timeout.c:1152:12: branch_false: following ‘false’ branch...
liburing-2.13/test/link-timeout.c:1157:15: branch_false: ...to here
liburing-2.13/test/link-timeout.c:1157:15: call_function: calling ‘test_timeout_link_chain1’ from ‘main’
#  683|   	if (pipe(fds)) {
#  684|   		perror("pipe");
#  685|-> 		return 1;
#  686|   	}
#  687|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def286]
liburing-2.13/test/linked-defer-close.c:54:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/linked-defer-close.c:48:18: acquire_resource: stream socket created here
liburing-2.13/test/linked-defer-close.c:49:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/linked-defer-close.c:54:15: branch_false: ...to here
liburing-2.13/test/linked-defer-close.c:54:15: throw: if ‘connect’ throws an exception...
liburing-2.13/test/linked-defer-close.c:54:15: danger: ‘sockfd’ leaks here
#   52|   	}
#   53|   
#   54|-> 	ret = connect(sockfd, (struct sockaddr *) &saddr, sizeof(saddr));
#   55|   	if (ret < 0) {
#   56|   		perror("connect");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def287]
liburing-2.13/test/linked-defer-close.c:125:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/linked-defer-close.c:98:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/linked-defer-close.c:101:9: branch_false: ...to here
liburing-2.13/test/linked-defer-close.c:106:18: acquire_resource: stream socket created here
liburing-2.13/test/linked-defer-close.c:107:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/linked-defer-close.c:112:9: branch_false: ...to here
liburing-2.13/test/linked-defer-close.c:117:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/linked-defer-close.c:123:15: branch_false: ...to here
liburing-2.13/test/linked-defer-close.c:124:12: branch_true: following ‘true’ branch (when ‘ret < 0’)...
liburing-2.13/test/linked-defer-close.c:125:17: branch_true: ...to here
liburing-2.13/test/linked-defer-close.c:125:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/linked-defer-close.c:125:17: danger: ‘sockfd’ leaks here
#  123|   	ret = listen(sockfd, 1);
#  124|   	if (ret < 0) {
#  125|-> 		perror("listen");
#  126|   		close(sockfd);
#  127|   		return T_EXIT_FAIL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def288]
liburing-2.13/test/linked-defer-close.c:126:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/linked-defer-close.c:98:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/linked-defer-close.c:101:9: branch_false: ...to here
liburing-2.13/test/linked-defer-close.c:106:18: acquire_resource: stream socket created here
liburing-2.13/test/linked-defer-close.c:107:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/linked-defer-close.c:112:9: branch_false: ...to here
liburing-2.13/test/linked-defer-close.c:117:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/linked-defer-close.c:123:15: branch_false: ...to here
liburing-2.13/test/linked-defer-close.c:124:12: branch_true: following ‘true’ branch (when ‘ret < 0’)...
liburing-2.13/test/linked-defer-close.c:125:17: branch_true: ...to here
liburing-2.13/test/linked-defer-close.c:126:17: throw: if ‘close’ throws an exception...
liburing-2.13/test/linked-defer-close.c:126:17: danger: ‘sockfd’ leaks here
#  124|   	if (ret < 0) {
#  125|   		perror("listen");
#  126|-> 		close(sockfd);
#  127|   		return T_EXIT_FAIL;
#  128|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def289]
liburing-2.13/test/linked-defer-close.c:130:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/linked-defer-close.c:98:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/linked-defer-close.c:101:9: branch_false: ...to here
liburing-2.13/test/linked-defer-close.c:106:18: acquire_resource: stream socket created here
liburing-2.13/test/linked-defer-close.c:107:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/linked-defer-close.c:112:9: branch_false: ...to here
liburing-2.13/test/linked-defer-close.c:117:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/linked-defer-close.c:123:15: branch_false: ...to here
liburing-2.13/test/linked-defer-close.c:124:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/linked-defer-close.c:130:15: branch_false: ...to here
liburing-2.13/test/linked-defer-close.c:130:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/linked-defer-close.c:130:15: danger: ‘sockfd’ leaks here
#  128|   	}
#  129|   
#  130|-> 	ret = io_uring_queue_init(8, &ring, IORING_SETUP_SINGLE_ISSUER |
#  131|   					    IORING_SETUP_DEFER_TASKRUN);
#  132|   	if (ret == -EINVAL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def290]
liburing-2.13/test/linked-defer-close.c:133:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/linked-defer-close.c:98:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/linked-defer-close.c:101:9: branch_false: ...to here
liburing-2.13/test/linked-defer-close.c:106:18: acquire_resource: stream socket created here
liburing-2.13/test/linked-defer-close.c:107:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/linked-defer-close.c:112:9: branch_false: ...to here
liburing-2.13/test/linked-defer-close.c:117:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/linked-defer-close.c:123:15: branch_false: ...to here
liburing-2.13/test/linked-defer-close.c:124:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/linked-defer-close.c:130:15: branch_false: ...to here
liburing-2.13/test/linked-defer-close.c:132:12: branch_true: following ‘true’ branch...
liburing-2.13/test/linked-defer-close.c:133:17: branch_true: ...to here
liburing-2.13/test/linked-defer-close.c:133:17: throw: if ‘close’ throws an exception...
liburing-2.13/test/linked-defer-close.c:133:17: danger: ‘sockfd’ leaks here
#  131|   					    IORING_SETUP_DEFER_TASKRUN);
#  132|   	if (ret == -EINVAL) {
#  133|-> 		close(sockfd);
#  134|   		return T_EXIT_SKIP;
#  135|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def291]
liburing-2.13/test/madvise.c:85:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
liburing-2.13/test/madvise.c:77:14: acquire_resource: opened here
liburing-2.13/test/madvise.c:78:12: branch_false: following ‘false’ branch...
liburing-2.13/test/madvise.c:85:15: branch_false: ...to here
liburing-2.13/test/madvise.c:85:15: throw: if ‘t_malloc’ throws an exception...
liburing-2.13/test/madvise.c:85:15: danger: ‘open(filename, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   83|   	}
#   84|   
#   85|-> 	buf = t_malloc(FILE_SIZE);
#   86|   
#   87|   	ptr = mmap(NULL, FILE_SIZE, PROT_READ, MAP_PRIVATE, fd, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def292]
liburing-2.13/test/min-timeout.c:83:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0][0]’
liburing-2.13/test/min-timeout.c:149:5: enter_function: entry to ‘main’
liburing-2.13/test/min-timeout.c:153:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/min-timeout.c:156:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:156:15: call_function: calling ‘test’ from ‘main’
#   81|   	ret = io_uring_queue_init_params(NPIPES, &ring, &p);
#   82|   	if (ret == -EINVAL)
#   83|-> 		return T_EXIT_SKIP;
#   84|   	if (!(p.features & IORING_FEAT_MIN_TIMEOUT)) {
#   85|   		no_min_timeout = 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def293]
liburing-2.13/test/min-timeout.c:83:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0][1]’
liburing-2.13/test/min-timeout.c:149:5: enter_function: entry to ‘main’
liburing-2.13/test/min-timeout.c:153:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/min-timeout.c:156:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:156:15: call_function: calling ‘test’ from ‘main’
#   81|   	ret = io_uring_queue_init_params(NPIPES, &ring, &p);
#   82|   	if (ret == -EINVAL)
#   83|-> 		return T_EXIT_SKIP;
#   84|   	if (!(p.features & IORING_FEAT_MIN_TIMEOUT)) {
#   85|   		no_min_timeout = 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def294]
liburing-2.13/test/min-timeout.c:83:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1][0]’
liburing-2.13/test/min-timeout.c:149:5: enter_function: entry to ‘main’
liburing-2.13/test/min-timeout.c:153:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/min-timeout.c:156:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:156:15: call_function: calling ‘test’ from ‘main’
#   81|   	ret = io_uring_queue_init_params(NPIPES, &ring, &p);
#   82|   	if (ret == -EINVAL)
#   83|-> 		return T_EXIT_SKIP;
#   84|   	if (!(p.features & IORING_FEAT_MIN_TIMEOUT)) {
#   85|   		no_min_timeout = 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def295]
liburing-2.13/test/min-timeout.c:83:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1][1]’
liburing-2.13/test/min-timeout.c:149:5: enter_function: entry to ‘main’
liburing-2.13/test/min-timeout.c:153:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/min-timeout.c:156:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:156:15: call_function: calling ‘test’ from ‘main’
#   81|   	ret = io_uring_queue_init_params(NPIPES, &ring, &p);
#   82|   	if (ret == -EINVAL)
#   83|-> 		return T_EXIT_SKIP;
#   84|   	if (!(p.features & IORING_FEAT_MIN_TIMEOUT)) {
#   85|   		no_min_timeout = 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def296]
liburing-2.13/test/min-timeout.c:83:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[2][0]’
liburing-2.13/test/min-timeout.c:149:5: enter_function: entry to ‘main’
liburing-2.13/test/min-timeout.c:153:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/min-timeout.c:156:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:156:15: call_function: calling ‘test’ from ‘main’
#   81|   	ret = io_uring_queue_init_params(NPIPES, &ring, &p);
#   82|   	if (ret == -EINVAL)
#   83|-> 		return T_EXIT_SKIP;
#   84|   	if (!(p.features & IORING_FEAT_MIN_TIMEOUT)) {
#   85|   		no_min_timeout = 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def297]
liburing-2.13/test/min-timeout.c:83:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[2][1]’
liburing-2.13/test/min-timeout.c:149:5: enter_function: entry to ‘main’
liburing-2.13/test/min-timeout.c:153:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/min-timeout.c:156:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:156:15: call_function: calling ‘test’ from ‘main’
#   81|   	ret = io_uring_queue_init_params(NPIPES, &ring, &p);
#   82|   	if (ret == -EINVAL)
#   83|-> 		return T_EXIT_SKIP;
#   84|   	if (!(p.features & IORING_FEAT_MIN_TIMEOUT)) {
#   85|   		no_min_timeout = 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def298]
liburing-2.13/test/min-timeout.c:91:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.fd[0]’
liburing-2.13/test/min-timeout.c:149:5: enter_function: entry to ‘main’
liburing-2.13/test/min-timeout.c:153:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/min-timeout.c:156:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:156:15: call_function: calling ‘test’ from ‘main’
#   89|   	for (i = 0; i < NPIPES; i++) {
#   90|   		if (pipe(fds[i]) < 0) {
#   91|-> 			perror("pipe");
#   92|   			return 1;
#   93|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def299]
liburing-2.13/test/min-timeout.c:91:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.fd[1]’
liburing-2.13/test/min-timeout.c:149:5: enter_function: entry to ‘main’
liburing-2.13/test/min-timeout.c:153:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/min-timeout.c:156:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:156:15: call_function: calling ‘test’ from ‘main’
#   89|   	for (i = 0; i < NPIPES; i++) {
#   90|   		if (pipe(fds[i]) < 0) {
#   91|-> 			perror("pipe");
#   92|   			return 1;
#   93|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def300]
liburing-2.13/test/min-timeout.c:91:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.fd[2]’
liburing-2.13/test/min-timeout.c:149:5: enter_function: entry to ‘main’
liburing-2.13/test/min-timeout.c:153:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/min-timeout.c:156:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:156:15: call_function: calling ‘test’ from ‘main’
#   89|   	for (i = 0; i < NPIPES; i++) {
#   90|   		if (pipe(fds[i]) < 0) {
#   91|-> 			perror("pipe");
#   92|   			return 1;
#   93|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def301]
liburing-2.13/test/min-timeout.c:91:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0][0]’
liburing-2.13/test/min-timeout.c:149:5: enter_function: entry to ‘main’
liburing-2.13/test/min-timeout.c:153:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/min-timeout.c:156:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:156:15: call_function: calling ‘test’ from ‘main’
#   89|   	for (i = 0; i < NPIPES; i++) {
#   90|   		if (pipe(fds[i]) < 0) {
#   91|-> 			perror("pipe");
#   92|   			return 1;
#   93|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def302]
liburing-2.13/test/min-timeout.c:91:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0][1]’
liburing-2.13/test/min-timeout.c:149:5: enter_function: entry to ‘main’
liburing-2.13/test/min-timeout.c:153:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/min-timeout.c:156:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:157:12: branch_false: following ‘false’ branch...
liburing-2.13/test/min-timeout.c:159:13: branch_false: ...to here
liburing-2.13/test/min-timeout.c:159:12: branch_false: following ‘false’ branch...
liburing-2.13/test/min-timeout.c:162:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:162:15: call_function: calling ‘test’ from ‘main’
#   89|   	for (i = 0; i < NPIPES; i++) {
#   90|   		if (pipe(fds[i]) < 0) {
#   91|-> 			perror("pipe");
#   92|   			return 1;
#   93|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def303]
liburing-2.13/test/min-timeout.c:91:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1][0]’
liburing-2.13/test/min-timeout.c:149:5: enter_function: entry to ‘main’
liburing-2.13/test/min-timeout.c:153:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/min-timeout.c:156:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:156:15: call_function: calling ‘test’ from ‘main’
#   89|   	for (i = 0; i < NPIPES; i++) {
#   90|   		if (pipe(fds[i]) < 0) {
#   91|-> 			perror("pipe");
#   92|   			return 1;
#   93|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def304]
liburing-2.13/test/min-timeout.c:91:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1][1]’
liburing-2.13/test/min-timeout.c:149:5: enter_function: entry to ‘main’
liburing-2.13/test/min-timeout.c:153:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/min-timeout.c:156:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:157:12: branch_false: following ‘false’ branch...
liburing-2.13/test/min-timeout.c:159:13: branch_false: ...to here
liburing-2.13/test/min-timeout.c:159:12: branch_false: following ‘false’ branch...
liburing-2.13/test/min-timeout.c:162:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:162:15: call_function: calling ‘test’ from ‘main’
#   89|   	for (i = 0; i < NPIPES; i++) {
#   90|   		if (pipe(fds[i]) < 0) {
#   91|-> 			perror("pipe");
#   92|   			return 1;
#   93|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def305]
liburing-2.13/test/min-timeout.c:91:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[2][0]’
liburing-2.13/test/min-timeout.c:149:5: enter_function: entry to ‘main’
liburing-2.13/test/min-timeout.c:153:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/min-timeout.c:156:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:156:15: call_function: calling ‘test’ from ‘main’
#   89|   	for (i = 0; i < NPIPES; i++) {
#   90|   		if (pipe(fds[i]) < 0) {
#   91|-> 			perror("pipe");
#   92|   			return 1;
#   93|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def306]
liburing-2.13/test/min-timeout.c:91:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[2][1]’
liburing-2.13/test/min-timeout.c:149:5: enter_function: entry to ‘main’
liburing-2.13/test/min-timeout.c:153:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/min-timeout.c:156:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:157:12: branch_false: following ‘false’ branch...
liburing-2.13/test/min-timeout.c:159:13: branch_false: ...to here
liburing-2.13/test/min-timeout.c:159:12: branch_false: following ‘false’ branch...
liburing-2.13/test/min-timeout.c:162:15: branch_false: ...to here
liburing-2.13/test/min-timeout.c:162:15: call_function: calling ‘test’ from ‘main’
#   89|   	for (i = 0; i < NPIPES; i++) {
#   90|   		if (pipe(fds[i]) < 0) {
#   91|-> 			perror("pipe");
#   92|   			return 1;
#   93|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def307]
liburing-2.13/test/mock_file.c:75:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
liburing-2.13/test/mock_file.c:289:12: enter_function: entry to ‘test_rw’
liburing-2.13/test/mock_file.c:295:12: branch_false: following ‘false’ branch...
liburing-2.13/test/mock_file.c:300:18: branch_false: ...to here
liburing-2.13/test/mock_file.c:300:18: acquire_memory: allocated here
liburing-2.13/test/mock_file.c:301:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
liburing-2.13/test/mock_file.c:306:15: branch_false: ...to here
liburing-2.13/test/mock_file.c:307:12: branch_false: following ‘false’ branch...
liburing-2.13/test/mock_file.c:307:12: branch_false: ...to here
liburing-2.13/test/mock_file.c:312:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/mock_file.c:314:22: branch_true: ...to here
liburing-2.13/test/mock_file.c:320:20: branch_false: following ‘false’ branch...
liburing-2.13/test/mock_file.c:325:20: branch_false: ...to here
liburing-2.13/test/mock_file.c:325:20: branch_false: following ‘false’ branch (when ‘nowait == 0’)...
liburing-2.13/test/mock_file.c:330:20: branch_false: ...to here
liburing-2.13/test/mock_file.c:330:20: branch_false: following ‘false’ branch...
liburing-2.13/test/mock_file.c:335:17: branch_false: ...to here
liburing-2.13/test/mock_file.c:336:21: call_function: calling ‘create_mock_file’ from ‘test_rw’
#   73|   	sqe->len = sizeof(*mc);
#   74|   
#   75|-> 	ret = t_submit_and_wait_single(&mgr_ring, &cqe);
#   76|   	if (ret || cqe->res) {
#   77|   		fprintf(stderr, "file create cmd failed %i %i\n", ret, cqe->res);

Error: CPPCHECK_WARNING (CWE-476): [#def308]
liburing-2.13/test/mock_file.c:148: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf_src
#  146|   
#  147|   	for (i = 0; i < size; i++)
#  148|-> 		buf_src[i] = 'a' + (i % 26);
#  149|   
#  150|   	buf_iovec[0].iov_base = buf_src;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def309]
liburing-2.13/test/mock_file.c:306:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
liburing-2.13/test/mock_file.c:295:12: branch_false: following ‘false’ branch...
liburing-2.13/test/mock_file.c:300:18: branch_false: ...to here
liburing-2.13/test/mock_file.c:300:18: acquire_memory: allocated here
liburing-2.13/test/mock_file.c:301:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
liburing-2.13/test/mock_file.c:306:15: branch_false: ...to here
liburing-2.13/test/mock_file.c:306:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/mock_file.c:306:15: danger: ‘buffer’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  304|   	}
#  305|   
#  306|-> 	ret = io_uring_queue_init(32, &ring, 0);
#  307|   	if (ret) {
#  308|   		fprintf(stderr, "ring setup failed: %d\n", ret);

Error: CPPCHECK_WARNING (CWE-401): [#def310]
liburing-2.13/test/mock_file.c:309: error[memleak]: Memory leak: buffer
#  307|   	if (ret) {
#  308|   		fprintf(stderr, "ring setup failed: %d\n", ret);
#  309|-> 		return 1;
#  310|   	}
#  311|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def311]
liburing-2.13/test/mock_file.c:353:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
liburing-2.13/test/mock_file.c:295:12: branch_false: following ‘false’ branch...
liburing-2.13/test/mock_file.c:300:18: branch_false: ...to here
liburing-2.13/test/mock_file.c:300:18: acquire_memory: allocated here
liburing-2.13/test/mock_file.c:301:12: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
liburing-2.13/test/mock_file.c:306:15: branch_false: ...to here
liburing-2.13/test/mock_file.c:353:1: danger: ‘buffer’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  351|   	io_uring_queue_exit(&ring);
#  352|   	return 0;
#  353|-> }
#  354|   
#  355|   int main(int argc, char *argv[])

Error: GCC_ANALYZER_WARNING (CWE-775): [#def312]
liburing-2.13/test/msg-ring-fd.c:168:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/msg-ring-fd.c:272:12: enter_function: entry to ‘test’
liburing-2.13/test/msg-ring-fd.c:278:12: branch_false: following ‘false’ branch...
liburing-2.13/test/msg-ring-fd.c:284:15: branch_false: ...to here
liburing-2.13/test/msg-ring-fd.c:285:12: branch_false: following ‘false’ branch...
liburing-2.13/test/msg-ring-fd.c:290:15: branch_false: ...to here
liburing-2.13/test/msg-ring-fd.c:290:15: call_function: calling ‘test_local’ from ‘test’
#  166|   
#  167|   	if (no_fd_pass)
#  168|-> 		return 0;
#  169|   
#  170|   	fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def313]
liburing-2.13/test/msg-ring-fd.c:185:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/msg-ring-fd.c:272:12: enter_function: entry to ‘test’
liburing-2.13/test/msg-ring-fd.c:278:12: branch_false: following ‘false’ branch...
liburing-2.13/test/msg-ring-fd.c:284:15: branch_false: ...to here
liburing-2.13/test/msg-ring-fd.c:285:12: branch_false: following ‘false’ branch...
liburing-2.13/test/msg-ring-fd.c:290:15: branch_false: ...to here
liburing-2.13/test/msg-ring-fd.c:290:15: call_function: calling ‘test_local’ from ‘test’
#  183|   
#  184|   	fd = fds[0];
#  185|-> 	ret = io_uring_register_files(src, &fd, 1);
#  186|   	if (ret) {
#  187|   		fprintf(stderr, "register files failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def314]
liburing-2.13/test/msg-ring-fd.c:185:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/test/msg-ring-fd.c:272:12: enter_function: entry to ‘test’
liburing-2.13/test/msg-ring-fd.c:278:12: branch_false: following ‘false’ branch...
liburing-2.13/test/msg-ring-fd.c:284:15: branch_false: ...to here
liburing-2.13/test/msg-ring-fd.c:285:12: branch_false: following ‘false’ branch...
liburing-2.13/test/msg-ring-fd.c:290:15: branch_false: ...to here
liburing-2.13/test/msg-ring-fd.c:290:15: call_function: calling ‘test_local’ from ‘test’
#  183|   
#  184|   	fd = fds[0];
#  185|-> 	ret = io_uring_register_files(src, &fd, 1);
#  186|   	if (ret) {
#  187|   		fprintf(stderr, "register files failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def315]
liburing-2.13/test/multicqes_drain.c:197:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipes[0][0]’
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:197:25: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:197:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/multicqes_drain.c:197:25: danger: ‘pipes[0][0]’ leaks here
#  195|   	for (i = 0; i < max_entry; i++) {
#  196|   		if (pipe(pipes[i]) != 0) {
#  197|-> 			perror("pipe");
#  198|   			return 1;
#  199|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def316]
liburing-2.13/test/multicqes_drain.c:197:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipes[0][1]’
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:197:25: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:197:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/multicqes_drain.c:197:25: danger: ‘pipes[0][1]’ leaks here
#  195|   	for (i = 0; i < max_entry; i++) {
#  196|   		if (pipe(pipes[i]) != 0) {
#  197|-> 			perror("pipe");
#  198|   			return 1;
#  199|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def317]
liburing-2.13/test/multicqes_drain.c:197:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipes[1][0]’
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:197:25: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:197:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/multicqes_drain.c:197:25: danger: ‘pipes[1][0]’ leaks here
#  195|   	for (i = 0; i < max_entry; i++) {
#  196|   		if (pipe(pipes[i]) != 0) {
#  197|-> 			perror("pipe");
#  198|   			return 1;
#  199|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def318]
liburing-2.13/test/multicqes_drain.c:197:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipes[1][1]’
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:197:25: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:197:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/multicqes_drain.c:197:25: danger: ‘pipes[1][1]’ leaks here
#  195|   	for (i = 0; i < max_entry; i++) {
#  196|   		if (pipe(pipes[i]) != 0) {
#  197|-> 			perror("pipe");
#  198|   			return 1;
#  199|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def319]
liburing-2.13/test/multicqes_drain.c:197:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipes[2][0]’
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:197:25: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:197:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/multicqes_drain.c:197:25: danger: ‘pipes[2][0]’ leaks here
#  195|   	for (i = 0; i < max_entry; i++) {
#  196|   		if (pipe(pipes[i]) != 0) {
#  197|-> 			perror("pipe");
#  198|   			return 1;
#  199|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def320]
liburing-2.13/test/multicqes_drain.c:197:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipes[2][1]’
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:197:25: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:197:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/multicqes_drain.c:197:25: danger: ‘pipes[2][1]’ leaks here
#  195|   	for (i = 0; i < max_entry; i++) {
#  196|   		if (pipe(pipes[i]) != 0) {
#  197|-> 			perror("pipe");
#  198|   			return 1;
#  199|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def321]
liburing-2.13/test/multicqes_drain.c:198:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipes[0][0]’
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:197:25: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:198:32: danger: ‘pipes[0][0]’ leaks here
#  196|   		if (pipe(pipes[i]) != 0) {
#  197|   			perror("pipe");
#  198|-> 			return 1;
#  199|   		}
#  200|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def322]
liburing-2.13/test/multicqes_drain.c:198:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipes[0][1]’
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:197:25: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:198:32: danger: ‘pipes[0][1]’ leaks here
#  196|   		if (pipe(pipes[i]) != 0) {
#  197|   			perror("pipe");
#  198|-> 			return 1;
#  199|   		}
#  200|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def323]
liburing-2.13/test/multicqes_drain.c:198:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipes[1][0]’
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:197:25: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:198:32: danger: ‘pipes[1][0]’ leaks here
#  196|   		if (pipe(pipes[i]) != 0) {
#  197|   			perror("pipe");
#  198|-> 			return 1;
#  199|   		}
#  200|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def324]
liburing-2.13/test/multicqes_drain.c:198:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipes[1][1]’
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:197:25: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:198:32: danger: ‘pipes[1][1]’ leaks here
#  196|   		if (pipe(pipes[i]) != 0) {
#  197|   			perror("pipe");
#  198|-> 			return 1;
#  199|   		}
#  200|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def325]
liburing-2.13/test/multicqes_drain.c:198:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipes[2][0]’
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:197:25: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:198:32: danger: ‘pipes[2][0]’ leaks here
#  196|   		if (pipe(pipes[i]) != 0) {
#  197|   			perror("pipe");
#  198|-> 			return 1;
#  199|   		}
#  200|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def326]
liburing-2.13/test/multicqes_drain.c:198:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipes[2][1]’
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:195:36: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:195:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/multicqes_drain.c:196:26: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:196:20: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:197:25: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:198:32: danger: ‘pipes[2][1]’ leaks here
#  196|   		if (pipe(pipes[i]) != 0) {
#  197|   			perror("pipe");
#  198|-> 			return 1;
#  199|   		}
#  200|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def327]
liburing-2.13/test/multicqes_drain.c:287:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/multicqes_drain.c:286:12: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:286:33: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:286:13: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:287:17: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:287:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/multicqes_drain.c:287:17: danger: ‘pipe1[0]’ leaks here
#  285|   
#  286|   	if (pipe(pipe1) != 0 || pipe(pipe2) != 0) {
#  287|-> 		perror("pipe");
#  288|   		return 1;
#  289|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def328]
liburing-2.13/test/multicqes_drain.c:287:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/multicqes_drain.c:286:12: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:286:33: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:286:13: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:287:17: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:287:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/multicqes_drain.c:287:17: danger: ‘pipe1[1]’ leaks here
#  285|   
#  286|   	if (pipe(pipe1) != 0 || pipe(pipe2) != 0) {
#  287|-> 		perror("pipe");
#  288|   		return 1;
#  289|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def329]
liburing-2.13/test/multicqes_drain.c:287:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[i]’
liburing-2.13/test/multicqes_drain.c:370:12: enter_function: entry to ‘test’
liburing-2.13/test/multicqes_drain.c:381:12: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:381:12: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:386:21: branch_true: following ‘true’ branch (when ‘i != 5’)...
liburing-2.13/test/multicqes_drain.c:387:23: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:387:23: call_function: calling ‘test_simple_drain’ from ‘test’
#  285|   
#  286|   	if (pipe(pipe1) != 0 || pipe(pipe2) != 0) {
#  287|-> 		perror("pipe");
#  288|   		return 1;
#  289|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def330]
liburing-2.13/test/multicqes_drain.c:288:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/multicqes_drain.c:286:12: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:286:33: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:286:13: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:287:17: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:288:24: danger: ‘pipe1[0]’ leaks here
#  286|   	if (pipe(pipe1) != 0 || pipe(pipe2) != 0) {
#  287|   		perror("pipe");
#  288|-> 		return 1;
#  289|   	}
#  290|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def331]
liburing-2.13/test/multicqes_drain.c:288:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/multicqes_drain.c:286:12: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:286:33: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:286:13: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:287:17: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:288:24: danger: ‘pipe1[1]’ leaks here
#  286|   	if (pipe(pipe1) != 0 || pipe(pipe2) != 0) {
#  287|   		perror("pipe");
#  288|-> 		return 1;
#  289|   	}
#  290|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def332]
liburing-2.13/test/multicqes_drain.c:288:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[i]’
liburing-2.13/test/multicqes_drain.c:370:12: enter_function: entry to ‘test’
liburing-2.13/test/multicqes_drain.c:381:12: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:381:12: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:386:21: branch_true: following ‘true’ branch (when ‘i != 5’)...
liburing-2.13/test/multicqes_drain.c:387:23: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:387:23: call_function: calling ‘test_simple_drain’ from ‘test’
#  286|   	if (pipe(pipe1) != 0 || pipe(pipe2) != 0) {
#  287|   		perror("pipe");
#  288|-> 		return 1;
#  289|   	}
#  290|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def333]
liburing-2.13/test/multicqes_drain.c:288:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe2[0]’
liburing-2.13/test/multicqes_drain.c:279:12: enter_function: entry to ‘test_simple_drain’
liburing-2.13/test/multicqes_drain.c:286:12: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:286:33: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:286:13: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:286:13: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:291:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/test/multicqes_drain.c:292:26: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_simple_drain’
liburing-2.13/test/multicqes_drain.c:293:20: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:294:25: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:288:24: danger: ‘pipe2[0]’ leaks here
#  286|   	if (pipe(pipe1) != 0 || pipe(pipe2) != 0) {
#  287|   		perror("pipe");
#  288|-> 		return 1;
#  289|   	}
#  290|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def334]
liburing-2.13/test/multicqes_drain.c:288:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe2[1]’
liburing-2.13/test/multicqes_drain.c:279:12: enter_function: entry to ‘test_simple_drain’
liburing-2.13/test/multicqes_drain.c:286:12: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:286:33: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:286:13: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:286:13: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:291:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/test/multicqes_drain.c:292:26: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_simple_drain’
liburing-2.13/test/multicqes_drain.c:293:20: branch_true: following ‘true’ branch...
liburing-2.13/test/multicqes_drain.c:294:25: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:288:24: danger: ‘pipe2[1]’ leaks here
#  286|   	if (pipe(pipe1) != 0 || pipe(pipe2) != 0) {
#  287|   		perror("pipe");
#  288|-> 		return 1;
#  289|   	}
#  290|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def335]
liburing-2.13/test/multicqes_drain.c:288:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe2[i]’
liburing-2.13/test/multicqes_drain.c:370:12: enter_function: entry to ‘test’
liburing-2.13/test/multicqes_drain.c:381:12: branch_false: following ‘false’ branch...
liburing-2.13/test/multicqes_drain.c:381:12: branch_false: ...to here
liburing-2.13/test/multicqes_drain.c:386:21: branch_true: following ‘true’ branch (when ‘i != 5’)...
liburing-2.13/test/multicqes_drain.c:387:23: branch_true: ...to here
liburing-2.13/test/multicqes_drain.c:387:23: call_function: calling ‘test_simple_drain’ from ‘test’
#  286|   	if (pipe(pipe1) != 0 || pipe(pipe2) != 0) {
#  287|   		perror("pipe");
#  288|-> 		return 1;
#  289|   	}
#  290|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def336]
liburing-2.13/test/napi-test.c:69:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/test/napi-test.c:53:12: branch_false: following ‘false’ branch...
liburing-2.13/test/napi-test.c:55:9: branch_false: ...to here
liburing-2.13/test/napi-test.c:61:9: branch_true: following ‘true’ branch (when ‘ret == 1’)...
liburing-2.13/test/napi-test.c:63:14: branch_true: ...to here
liburing-2.13/test/napi-test.c:63:14: acquire_resource: stream socket created here
liburing-2.13/test/napi-test.c:64:9: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
liburing-2.13/test/napi-test.c:64:9: branch_true: ...to here
liburing-2.13/test/napi-test.c:69:23: throw: if ‘connect’ throws an exception...
liburing-2.13/test/napi-test.c:69:23: danger: ‘fd’ leaks here
#   67|   	i = 0;
#   68|   	do {
#   69|-> 		ret = connect(fd, (void *)&addr, sizeof(addr));
#   70|   		if (!ret)
#   71|   			break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def337]
liburing-2.13/test/napi-test.c:142:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘listen_fd’
liburing-2.13/test/napi-test.c:102:12: enter_function: entry to ‘receiver’
liburing-2.13/test/napi-test.c:113:12: branch_false: following ‘false’ branch...
liburing-2.13/test/napi-test.c:120:9: branch_false: ...to here
liburing-2.13/test/napi-test.c:129:21: acquire_resource: stream socket created here
liburing-2.13/test/napi-test.c:130:9: branch_true: following ‘true’ branch (when ‘listen_fd >= 0’)...
liburing-2.13/test/napi-test.c:132:9: branch_true: ...to here
liburing-2.13/test/napi-test.c:132:9: call_function: calling ‘do_setsockopt’ from ‘receiver’
liburing-2.13/test/napi-test.c:132:9: return_function: returning to ‘receiver’ from ‘do_setsockopt’
liburing-2.13/test/napi-test.c:134:12: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/napi-test.c:139:15: branch_false: ...to here
liburing-2.13/test/napi-test.c:140:9: branch_true: following ‘true’ branch (when ‘ret == 0’)...
liburing-2.13/test/napi-test.c:142:14: branch_true: ...to here
liburing-2.13/test/napi-test.c:142:14: throw: if ‘accept’ throws an exception...
liburing-2.13/test/napi-test.c:142:14: danger: ‘listen_fd’ leaks here
#  140|   	assert(ret == 0);
#  141|   
#  142|-> 	fd = accept(listen_fd, NULL, NULL);
#  143|   	assert(fd >= 0);
#  144|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def338]
liburing-2.13/test/ooo-file-unreg.c:47:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/ooo-file-unreg.c:23:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/ooo-file-unreg.c:26:15: branch_false: ...to here
liburing-2.13/test/ooo-file-unreg.c:27:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ooo-file-unreg.c:32:15: branch_false: ...to here
liburing-2.13/test/ooo-file-unreg.c:33:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ooo-file-unreg.c:40:18: branch_false: ...to here
liburing-2.13/test/ooo-file-unreg.c:40:18: acquire_resource: datagram socket created here
liburing-2.13/test/ooo-file-unreg.c:41:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ooo-file-unreg.c:45:18: branch_false: ...to here
liburing-2.13/test/ooo-file-unreg.c:46:12: branch_true: following ‘true’ branch...
liburing-2.13/test/ooo-file-unreg.c:47:17: branch_true: ...to here
liburing-2.13/test/ooo-file-unreg.c:47:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/ooo-file-unreg.c:47:17: danger: ‘fds[0]’ leaks here
#   45|   	fds[1] = socket(AF_INET, SOCK_DGRAM, 0);
#   46|   	if (fds[1] < 0) {
#   47|-> 		perror("socket");
#   48|   		return T_EXIT_FAIL;
#   49|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def339]
liburing-2.13/test/ooo-file-unreg.c:51:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/ooo-file-unreg.c:23:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/ooo-file-unreg.c:26:15: branch_false: ...to here
liburing-2.13/test/ooo-file-unreg.c:27:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ooo-file-unreg.c:32:15: branch_false: ...to here
liburing-2.13/test/ooo-file-unreg.c:33:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ooo-file-unreg.c:40:18: branch_false: ...to here
liburing-2.13/test/ooo-file-unreg.c:40:18: acquire_resource: datagram socket created here
liburing-2.13/test/ooo-file-unreg.c:41:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ooo-file-unreg.c:45:18: branch_false: ...to here
liburing-2.13/test/ooo-file-unreg.c:46:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ooo-file-unreg.c:51:15: branch_false: ...to here
liburing-2.13/test/ooo-file-unreg.c:51:15: throw: if ‘io_uring_register_files_update’ throws an exception...
liburing-2.13/test/ooo-file-unreg.c:51:15: danger: ‘fds[0]’ leaks here
#   49|   	}
#   50|   
#   51|-> 	res = io_uring_register_files_update(&ring, 0, fds, 2);
#   52|   	if (res != 2) {
#   53|   		fprintf(stderr, "files updates; %d\n", res);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def340]
liburing-2.13/test/ooo-file-unreg.c:51:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/ooo-file-unreg.c:23:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/ooo-file-unreg.c:26:15: branch_false: ...to here
liburing-2.13/test/ooo-file-unreg.c:27:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ooo-file-unreg.c:32:15: branch_false: ...to here
liburing-2.13/test/ooo-file-unreg.c:33:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ooo-file-unreg.c:40:18: branch_false: ...to here
liburing-2.13/test/ooo-file-unreg.c:41:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ooo-file-unreg.c:45:18: branch_false: ...to here
liburing-2.13/test/ooo-file-unreg.c:45:18: acquire_resource: datagram socket created here
liburing-2.13/test/ooo-file-unreg.c:46:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ooo-file-unreg.c:51:15: branch_false: ...to here
liburing-2.13/test/ooo-file-unreg.c:51:15: throw: if ‘io_uring_register_files_update’ throws an exception...
liburing-2.13/test/ooo-file-unreg.c:51:15: danger: ‘fds[1]’ leaks here
#   49|   	}
#   50|   
#   51|-> 	res = io_uring_register_files_update(&ring, 0, fds, 2);
#   52|   	if (res != 2) {
#   53|   		fprintf(stderr, "files updates; %d\n", res);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def341]
liburing-2.13/test/openat2.c:192:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[0]’
liburing-2.13/test/openat2.c:190:12: branch_false: following ‘false’ branch...
liburing-2.13/test/openat2.c:194:15: branch_false: ...to here
liburing-2.13/test/openat2.c:195:12: branch_true: following ‘true’ branch...
liburing-2.13/test/openat2.c:196:17: branch_true: ...to here
liburing-2.13/test/openat2.c:192:24: danger: ‘pipe_fds[0]’ leaks here
#  190|   	if (pipe2(pipe_fds, O_NONBLOCK)) {
#  191|   		fprintf(stderr, "pipe() failed\n");
#  192|-> 		return -1;
#  193|   	}
#  194|   	ret = io_uring_queue_init(8, &ring, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def342]
liburing-2.13/test/openat2.c:192:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[1]’
liburing-2.13/test/openat2.c:190:12: branch_false: following ‘false’ branch...
liburing-2.13/test/openat2.c:194:15: branch_false: ...to here
liburing-2.13/test/openat2.c:195:12: branch_true: following ‘true’ branch...
liburing-2.13/test/openat2.c:196:17: branch_true: ...to here
liburing-2.13/test/openat2.c:192:24: danger: ‘pipe_fds[1]’ leaks here
#  190|   	if (pipe2(pipe_fds, O_NONBLOCK)) {
#  191|   		fprintf(stderr, "pipe() failed\n");
#  192|-> 		return -1;
#  193|   	}
#  194|   	ret = io_uring_queue_init(8, &ring, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def343]
liburing-2.13/test/openat2.c:194:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[0]’
liburing-2.13/test/openat2.c:190:12: branch_false: following ‘false’ branch...
liburing-2.13/test/openat2.c:194:15: branch_false: ...to here
liburing-2.13/test/openat2.c:194:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/openat2.c:194:15: danger: ‘pipe_fds[0]’ leaks here
#  192|   		return -1;
#  193|   	}
#  194|-> 	ret = io_uring_queue_init(8, &ring, 0);
#  195|   	if (ret) {
#  196|   		fprintf(stderr, "ring setup failed\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def344]
liburing-2.13/test/openat2.c:194:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[1]’
liburing-2.13/test/openat2.c:190:12: branch_false: following ‘false’ branch...
liburing-2.13/test/openat2.c:194:15: branch_false: ...to here
liburing-2.13/test/openat2.c:194:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/openat2.c:194:15: danger: ‘pipe_fds[1]’ leaks here
#  192|   		return -1;
#  193|   	}
#  194|-> 	ret = io_uring_queue_init(8, &ring, 0);
#  195|   	if (ret) {
#  196|   		fprintf(stderr, "ring setup failed\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def345]
liburing-2.13/test/openat2.c:199:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[0]’
liburing-2.13/test/openat2.c:190:12: branch_false: following ‘false’ branch...
liburing-2.13/test/openat2.c:194:15: branch_false: ...to here
liburing-2.13/test/openat2.c:195:12: branch_false: following ‘false’ branch...
liburing-2.13/test/openat2.c:199:15: branch_false: ...to here
liburing-2.13/test/openat2.c:199:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/openat2.c:199:15: danger: ‘pipe_fds[0]’ leaks here
#  197|   		return -1;
#  198|   	}
#  199|-> 	ret = io_uring_register_files(&ring, pipe_fds, 2);
#  200|   	if (ret) {
#  201|   		fprintf(stderr, "%s: register ret=%d\n", __FUNCTION__, ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def346]
liburing-2.13/test/openat2.c:199:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_fds[1]’
liburing-2.13/test/openat2.c:190:12: branch_false: following ‘false’ branch...
liburing-2.13/test/openat2.c:194:15: branch_false: ...to here
liburing-2.13/test/openat2.c:195:12: branch_false: following ‘false’ branch...
liburing-2.13/test/openat2.c:199:15: branch_false: ...to here
liburing-2.13/test/openat2.c:199:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/openat2.c:199:15: danger: ‘pipe_fds[1]’ leaks here
#  197|   		return -1;
#  198|   	}
#  199|-> 	ret = io_uring_register_files(&ring, pipe_fds, 2);
#  200|   	if (ret) {
#  201|   		fprintf(stderr, "%s: register ret=%d\n", __FUNCTION__, ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def347]
liburing-2.13/test/pipe-bug.c:40:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/pipe-bug.c:25:12: enter_function: entry to ‘pipe_bug’
liburing-2.13/test/pipe-bug.c:38:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-bug.c:41:19: branch_false: ...to here
liburing-2.13/test/pipe-bug.c:41:19: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-bug.c:46:9: branch_false: ...to here
liburing-2.13/test/pipe-bug.c:46:9: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-bug.c:49:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘pipe_bug’
liburing-2.13/test/pipe-bug.c:49:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘pipe_bug’
liburing-2.13/test/pipe-bug.c:50:9: branch_true: following ‘true’ branch...
liburing-2.13/test/pipe-bug.c:50:9: branch_true: ...to here
liburing-2.13/test/pipe-bug.c:40:24: danger: ‘fds[0]’ leaks here
#   38|   	if (ret == -ENOMEM) {
#   39|   		usleep(1000);
#   40|-> 		return 0;
#   41|   	} else if (ret) {
#   42|   		fprintf(stderr, "ring_init: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def348]
liburing-2.13/test/pipe-bug.c:40:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/pipe-bug.c:25:12: enter_function: entry to ‘pipe_bug’
liburing-2.13/test/pipe-bug.c:38:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-bug.c:41:19: branch_false: ...to here
liburing-2.13/test/pipe-bug.c:41:19: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-bug.c:46:9: branch_false: ...to here
liburing-2.13/test/pipe-bug.c:46:9: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-bug.c:49:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘pipe_bug’
liburing-2.13/test/pipe-bug.c:49:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘pipe_bug’
liburing-2.13/test/pipe-bug.c:50:9: branch_true: following ‘true’ branch...
liburing-2.13/test/pipe-bug.c:50:9: branch_true: ...to here
liburing-2.13/test/pipe-bug.c:40:24: danger: ‘fds[1]’ leaks here
#   38|   	if (ret == -ENOMEM) {
#   39|   		usleep(1000);
#   40|-> 		return 0;
#   41|   	} else if (ret) {
#   42|   		fprintf(stderr, "ring_init: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def349]
liburing-2.13/test/pipe-bug.c:40:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[i]’
liburing-2.13/test/pipe-bug.c:88:5: enter_function: entry to ‘main’
liburing-2.13/test/pipe-bug.c:92:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/pipe-bug.c:92:12: branch_false: ...to here
liburing-2.13/test/pipe-bug.c:95:21: branch_true: following ‘true’ branch (when ‘i != 10000’)...
liburing-2.13/test/pipe-bug.c:96:21: branch_true: ...to here
liburing-2.13/test/pipe-bug.c:96:21: call_function: calling ‘pipe_bug’ from ‘main’
#   38|   	if (ret == -ENOMEM) {
#   39|   		usleep(1000);
#   40|-> 		return 0;
#   41|   	} else if (ret) {
#   42|   		fprintf(stderr, "ring_init: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def350]
liburing-2.13/test/pipe-eof.c:54:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.fds[0]’
liburing-2.13/test/pipe-eof.c:45:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/pipe-eof.c:48:13: branch_false: ...to here
liburing-2.13/test/pipe-eof.c:48:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-eof.c:52:9: branch_false: ...to here
liburing-2.13/test/pipe-eof.c:54:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/pipe-eof.c:54:15: danger: ‘d.fds[0]’ leaks here
#   52|   	d.str = buf;
#   53|   
#   54|-> 	ret = io_uring_queue_init(8, &ring, 0);
#   55|   	if (ret == -ENOMEM) {
#   56|   		return T_EXIT_SKIP;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def351]
liburing-2.13/test/pipe-eof.c:54:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.fds[1]’
liburing-2.13/test/pipe-eof.c:45:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/pipe-eof.c:48:13: branch_false: ...to here
liburing-2.13/test/pipe-eof.c:48:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-eof.c:52:9: branch_false: ...to here
liburing-2.13/test/pipe-eof.c:54:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/pipe-eof.c:54:15: danger: ‘d.fds[1]’ leaks here
#   52|   	d.str = buf;
#   53|   
#   54|-> 	ret = io_uring_queue_init(8, &ring, 0);
#   55|   	if (ret == -ENOMEM) {
#   56|   		return T_EXIT_SKIP;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def352]
liburing-2.13/test/pipe-reuse.c:41:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/pipe-reuse.c:27:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-reuse.c:27:12: branch_false: ...to here
liburing-2.13/test/pipe-reuse.c:33:21: branch_true: following ‘true’ branch (when ‘i != 16’)...
liburing-2.13/test/pipe-reuse.c:36:17: branch_true: ...to here
liburing-2.13/test/pipe-reuse.c:41:15: throw: if ‘io_uring_queue_init_params’ throws an exception...
liburing-2.13/test/pipe-reuse.c:41:15: danger: ‘fds[0]’ leaks here
#   39|   	}
#   40|   
#   41|-> 	ret = io_uring_queue_init_params(8, &ring, &p);
#   42|   	if (ret) {
#   43|   		fprintf(stderr, "queue_init: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def353]
liburing-2.13/test/pipe-reuse.c:41:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/pipe-reuse.c:27:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-reuse.c:27:12: branch_false: ...to here
liburing-2.13/test/pipe-reuse.c:33:21: branch_true: following ‘true’ branch (when ‘i != 16’)...
liburing-2.13/test/pipe-reuse.c:36:17: branch_true: ...to here
liburing-2.13/test/pipe-reuse.c:41:15: throw: if ‘io_uring_queue_init_params’ throws an exception...
liburing-2.13/test/pipe-reuse.c:41:15: danger: ‘fds[1]’ leaks here
#   39|   	}
#   40|   
#   41|-> 	ret = io_uring_queue_init_params(8, &ring, &p);
#   42|   	if (ret) {
#   43|   		fprintf(stderr, "queue_init: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def354]
liburing-2.13/test/pipe-reuse.c:56:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/pipe-reuse.c:27:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-reuse.c:27:12: branch_false: ...to here
liburing-2.13/test/pipe-reuse.c:33:21: branch_true: following ‘true’ branch (when ‘i != 16’)...
liburing-2.13/test/pipe-reuse.c:36:17: branch_true: ...to here
liburing-2.13/test/pipe-reuse.c:42:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-reuse.c:46:15: branch_false: ...to here
liburing-2.13/test/pipe-reuse.c:46:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-reuse.c:52:9: branch_false: ...to here
liburing-2.13/test/pipe-reuse.c:56:15: throw: if ‘write’ throws an exception...
liburing-2.13/test/pipe-reuse.c:56:15: danger: ‘fds[0]’ leaks here
#   54|   	memset(ptr, 0x22, sizeof(wbuf) / 2);
#   55|   
#   56|-> 	ret = write(fds[1], wbuf, sizeof(wbuf) / 2);
#   57|   	if (ret != sizeof(wbuf) / 2) {
#   58|   		fprintf(stderr, "Bad write\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def355]
liburing-2.13/test/pipe-reuse.c:56:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/pipe-reuse.c:27:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-reuse.c:27:12: branch_false: ...to here
liburing-2.13/test/pipe-reuse.c:33:21: branch_true: following ‘true’ branch (when ‘i != 16’)...
liburing-2.13/test/pipe-reuse.c:36:17: branch_true: ...to here
liburing-2.13/test/pipe-reuse.c:42:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-reuse.c:46:15: branch_false: ...to here
liburing-2.13/test/pipe-reuse.c:46:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-reuse.c:52:9: branch_false: ...to here
liburing-2.13/test/pipe-reuse.c:56:15: throw: if ‘write’ throws an exception...
liburing-2.13/test/pipe-reuse.c:56:15: danger: ‘fds[1]’ leaks here
#   54|   	memset(ptr, 0x22, sizeof(wbuf) / 2);
#   55|   
#   56|-> 	ret = write(fds[1], wbuf, sizeof(wbuf) / 2);
#   57|   	if (ret != sizeof(wbuf) / 2) {
#   58|   		fprintf(stderr, "Bad write\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def356]
liburing-2.13/test/pipe-reuse.c:103:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/pipe-reuse.c:27:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-reuse.c:27:12: branch_false: ...to here
liburing-2.13/test/pipe-reuse.c:33:21: branch_true: following ‘true’ branch (when ‘i != 16’)...
liburing-2.13/test/pipe-reuse.c:36:17: branch_true: ...to here
liburing-2.13/test/pipe-reuse.c:42:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-reuse.c:46:15: branch_false: ...to here
liburing-2.13/test/pipe-reuse.c:46:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-reuse.c:52:9: branch_false: ...to here
liburing-2.13/test/pipe-reuse.c:57:12: branch_true: following ‘true’ branch (when ‘ret != 8192’)...
liburing-2.13/test/pipe-reuse.c:58:17: branch_true: ...to here
liburing-2.13/test/pipe-reuse.c:103:9: throw: if ‘io_uring_queue_exit’ throws an exception...
liburing-2.13/test/pipe-reuse.c:103:9: danger: ‘fds[0]’ leaks here
#  101|   
#  102|   err:
#  103|-> 	io_uring_queue_exit(&ring);
#  104|   	return ret;
#  105|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def357]
liburing-2.13/test/pipe-reuse.c:103:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[ret]’
liburing-2.13/test/pipe-reuse.c:27:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-reuse.c:27:12: branch_false: ...to here
liburing-2.13/test/pipe-reuse.c:33:21: branch_true: following ‘true’ branch (when ‘i != 16’)...
liburing-2.13/test/pipe-reuse.c:36:17: branch_true: ...to here
liburing-2.13/test/pipe-reuse.c:42:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-reuse.c:46:15: branch_false: ...to here
liburing-2.13/test/pipe-reuse.c:46:12: branch_false: following ‘false’ branch...
liburing-2.13/test/pipe-reuse.c:52:9: branch_false: ...to here
liburing-2.13/test/pipe-reuse.c:57:12: branch_true: following ‘true’ branch (when ‘ret != 8192’)...
liburing-2.13/test/pipe-reuse.c:58:17: branch_true: ...to here
liburing-2.13/test/pipe-reuse.c:103:9: throw: if ‘io_uring_queue_exit’ throws an exception...
liburing-2.13/test/pipe-reuse.c:103:9: danger: ‘fds[ret]’ leaks here
#  101|   
#  102|   err:
#  103|-> 	io_uring_queue_exit(&ring);
#  104|   	return ret;
#  105|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def358]
liburing-2.13/test/poll-cancel-all.c:357:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd2[0]’
liburing-2.13/test/poll-cancel-all.c:268:12: enter_function: entry to ‘test3’
liburing-2.13/test/poll-cancel-all.c:274:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-cancel-all.c:274:12: branch_false: ...to here
liburing-2.13/test/poll-cancel-all.c:279:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/poll-cancel-all.c:280:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test3’
liburing-2.13/test/poll-cancel-all.c:281:20: branch_true: following ‘true’ branch...
liburing-2.13/test/poll-cancel-all.c:282:25: branch_true: ...to here
liburing-2.13/test/poll-cancel-all.c:357:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/poll-cancel-all.c:357:9: danger: ‘fd2[0]’ leaks here
#  355|   	return 0;
#  356|   err:
#  357|-> 	close(fd2[0]);
#  358|   	close(fd2[1]);
#  359|   	return 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def359]
liburing-2.13/test/poll-cancel-all.c:357:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd2[1]’
liburing-2.13/test/poll-cancel-all.c:268:12: enter_function: entry to ‘test3’
liburing-2.13/test/poll-cancel-all.c:274:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-cancel-all.c:274:12: branch_false: ...to here
liburing-2.13/test/poll-cancel-all.c:279:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/poll-cancel-all.c:280:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test3’
liburing-2.13/test/poll-cancel-all.c:281:20: branch_true: following ‘true’ branch...
liburing-2.13/test/poll-cancel-all.c:282:25: branch_true: ...to here
liburing-2.13/test/poll-cancel-all.c:357:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/poll-cancel-all.c:357:9: danger: ‘fd2[1]’ leaks here
#  355|   	return 0;
#  356|   err:
#  357|-> 	close(fd2[0]);
#  358|   	close(fd2[1]);
#  359|   	return 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def360]
liburing-2.13/test/poll-cancel-all.c:358:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd2[1]’
liburing-2.13/test/poll-cancel-all.c:268:12: enter_function: entry to ‘test3’
liburing-2.13/test/poll-cancel-all.c:274:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-cancel-all.c:274:12: branch_false: ...to here
liburing-2.13/test/poll-cancel-all.c:279:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/poll-cancel-all.c:280:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test3’
liburing-2.13/test/poll-cancel-all.c:281:20: branch_true: following ‘true’ branch...
liburing-2.13/test/poll-cancel-all.c:282:25: branch_true: ...to here
liburing-2.13/test/poll-cancel-all.c:358:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/poll-cancel-all.c:358:9: danger: ‘fd2[1]’ leaks here
#  356|   err:
#  357|   	close(fd2[0]);
#  358|-> 	close(fd2[1]);
#  359|   	return 1;
#  360|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def361]
liburing-2.13/test/poll-cancel-all.c:457:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
liburing-2.13/test/poll-cancel-all.c:449:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/poll-cancel-all.c:452:13: branch_false: ...to here
liburing-2.13/test/poll-cancel-all.c:452:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-cancel-all.c:457:15: branch_false: ...to here
liburing-2.13/test/poll-cancel-all.c:457:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/poll-cancel-all.c:457:15: danger: ‘fd[0]’ leaks here
#  455|   	}
#  456|   
#  457|-> 	ret = io_uring_queue_init(8, &ring, 0);
#  458|   	if (ret) {
#  459|   		fprintf(stderr, "ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def362]
liburing-2.13/test/poll-cancel-all.c:457:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
liburing-2.13/test/poll-cancel-all.c:449:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/poll-cancel-all.c:452:13: branch_false: ...to here
liburing-2.13/test/poll-cancel-all.c:452:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-cancel-all.c:457:15: branch_false: ...to here
liburing-2.13/test/poll-cancel-all.c:457:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/poll-cancel-all.c:457:15: danger: ‘fd[1]’ leaks here
#  455|   	}
#  456|   
#  457|-> 	ret = io_uring_queue_init(8, &ring, 0);
#  458|   	if (ret) {
#  459|   		fprintf(stderr, "ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def363]
liburing-2.13/test/poll-cancel-ton.c:118:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/poll-cancel-ton.c:108:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/poll-cancel-ton.c:111:13: branch_false: ...to here
liburing-2.13/test/poll-cancel-ton.c:111:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-cancel-ton.c:116:9: branch_false: ...to here
liburing-2.13/test/poll-cancel-ton.c:118:15: throw: if ‘io_uring_queue_init_params’ throws an exception...
liburing-2.13/test/poll-cancel-ton.c:118:15: danger: ‘pipe1[0]’ leaks here
#  116|   	p.flags = IORING_SETUP_CQSIZE;
#  117|   	p.cq_entries = 16384;
#  118|-> 	ret = io_uring_queue_init_params(1024, &ring, &p);
#  119|   	if (ret) {
#  120|   		if (ret == -EINVAL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def364]
liburing-2.13/test/poll-cancel-ton.c:118:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll-cancel-ton.c:108:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/poll-cancel-ton.c:111:13: branch_false: ...to here
liburing-2.13/test/poll-cancel-ton.c:111:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-cancel-ton.c:116:9: branch_false: ...to here
liburing-2.13/test/poll-cancel-ton.c:118:15: throw: if ‘io_uring_queue_init_params’ throws an exception...
liburing-2.13/test/poll-cancel-ton.c:118:15: danger: ‘pipe1[1]’ leaks here
#  116|   	p.flags = IORING_SETUP_CQSIZE;
#  117|   	p.cq_entries = 16384;
#  118|-> 	ret = io_uring_queue_init_params(1024, &ring, &p);
#  119|   	if (ret) {
#  120|   		if (ret == -EINVAL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def365]
liburing-2.13/test/poll-cancel-ton.c:122:31: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/poll-cancel-ton.c:108:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/poll-cancel-ton.c:111:13: branch_false: ...to here
liburing-2.13/test/poll-cancel-ton.c:111:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-cancel-ton.c:116:9: branch_false: ...to here
liburing-2.13/test/poll-cancel-ton.c:119:12: branch_true: following ‘true’ branch...
liburing-2.13/test/poll-cancel-ton.c:120:20: branch_true: ...to here
liburing-2.13/test/poll-cancel-ton.c:120:20: branch_true: following ‘true’ branch...
liburing-2.13/test/poll-cancel-ton.c:121:25: branch_true: ...to here
liburing-2.13/test/poll-cancel-ton.c:122:31: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/poll-cancel-ton.c:122:31: danger: ‘pipe1[0]’ leaks here
#  120|   		if (ret == -EINVAL) {
#  121|   			fprintf(stdout, "No CQSIZE, trying without\n");
#  122|-> 			ret = io_uring_queue_init(1024, &ring, 0);
#  123|   			if (ret) {
#  124|   				fprintf(stderr, "ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def366]
liburing-2.13/test/poll-cancel-ton.c:122:31: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll-cancel-ton.c:108:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/poll-cancel-ton.c:111:13: branch_false: ...to here
liburing-2.13/test/poll-cancel-ton.c:111:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-cancel-ton.c:116:9: branch_false: ...to here
liburing-2.13/test/poll-cancel-ton.c:119:12: branch_true: following ‘true’ branch...
liburing-2.13/test/poll-cancel-ton.c:120:20: branch_true: ...to here
liburing-2.13/test/poll-cancel-ton.c:120:20: branch_true: following ‘true’ branch...
liburing-2.13/test/poll-cancel-ton.c:121:25: branch_true: ...to here
liburing-2.13/test/poll-cancel-ton.c:122:31: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/poll-cancel-ton.c:122:31: danger: ‘pipe1[1]’ leaks here
#  120|   		if (ret == -EINVAL) {
#  121|   			fprintf(stdout, "No CQSIZE, trying without\n");
#  122|-> 			ret = io_uring_queue_init(1024, &ring, 0);
#  123|   			if (ret) {
#  124|   				fprintf(stderr, "ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def367]
liburing-2.13/test/poll-cancel.c:41:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/poll-cancel.c:39:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-cancel.c:44:15: branch_false: ...to here
liburing-2.13/test/poll-cancel.c:41:24: danger: ‘pipe1[0]’ leaks here
#   39|   	if (pipe(pipe1) != 0) {
#   40|   		perror("pipe");
#   41|-> 		return 1;
#   42|   	}
#   43|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def368]
liburing-2.13/test/poll-cancel.c:41:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll-cancel.c:39:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-cancel.c:44:15: branch_false: ...to here
liburing-2.13/test/poll-cancel.c:41:24: danger: ‘pipe1[1]’ leaks here
#   39|   	if (pipe(pipe1) != 0) {
#   40|   		perror("pipe");
#   41|-> 		return 1;
#   42|   	}
#   43|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def369]
liburing-2.13/test/poll-cancel.c:44:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/poll-cancel.c:39:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-cancel.c:44:15: branch_false: ...to here
liburing-2.13/test/poll-cancel.c:44:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/poll-cancel.c:44:15: danger: ‘pipe1[0]’ leaks here
#   42|   	}
#   43|   
#   44|-> 	ret = io_uring_queue_init(2, &ring, 0);
#   45|   	if (ret) {
#   46|   		fprintf(stderr, "ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def370]
liburing-2.13/test/poll-cancel.c:44:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll-cancel.c:39:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-cancel.c:44:15: branch_false: ...to here
liburing-2.13/test/poll-cancel.c:44:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/poll-cancel.c:44:15: danger: ‘pipe1[1]’ leaks here
#   42|   	}
#   43|   
#   44|-> 	ret = io_uring_queue_init(2, &ring, 0);
#   45|   	if (ret) {
#   46|   		fprintf(stderr, "ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def371]
liburing-2.13/test/poll-link.c:67:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s0’
liburing-2.13/test/poll-link.c:60:14: acquire_resource: stream socket created here
liburing-2.13/test/poll-link.c:61:9: branch_true: following ‘true’ branch (when ‘s0 != -1’)...
liburing-2.13/test/poll-link.c:63:9: branch_true: ...to here
liburing-2.13/test/poll-link.c:67:13: throw: if ‘connect’ throws an exception...
liburing-2.13/test/poll-link.c:67:13: danger: ‘s0’ leaks here
#   65|   	addr.sin_addr.s_addr = data->addr;
#   66|   
#   67|-> 	if (connect(s0, (struct sockaddr*)&addr, sizeof(addr)) != -1)
#   68|   		wait_for_var(&recv_thread_done);
#   69|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def372]
liburing-2.13/test/poll-mshot-overflow.c:70:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/poll-mshot-overflow.c:53:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-mshot-overflow.c:58:32: branch_false: ...to here
liburing-2.13/test/poll-mshot-overflow.c:70:15: throw: if ‘io_uring_queue_init_params’ throws an exception...
liburing-2.13/test/poll-mshot-overflow.c:70:15: danger: ‘pipe1[0]’ leaks here
#   68|   				IORING_SETUP_DEFER_TASKRUN;
#   69|   
#   70|-> 	ret = io_uring_queue_init_params(2, &ring, &params);
#   71|   	if (ret)
#   72|   		return T_EXIT_SKIP;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def373]
liburing-2.13/test/poll-mshot-overflow.c:70:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll-mshot-overflow.c:53:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-mshot-overflow.c:58:32: branch_false: ...to here
liburing-2.13/test/poll-mshot-overflow.c:70:15: throw: if ‘io_uring_queue_init_params’ throws an exception...
liburing-2.13/test/poll-mshot-overflow.c:70:15: danger: ‘pipe1[1]’ leaks here
#   68|   				IORING_SETUP_DEFER_TASKRUN;
#   69|   
#   70|-> 	ret = io_uring_queue_init_params(2, &ring, &params);
#   71|   	if (ret)
#   72|   		return T_EXIT_SKIP;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def374]
liburing-2.13/test/poll-mshot-overflow.c:151:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/poll-mshot-overflow.c:149:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-mshot-overflow.c:154:32: branch_false: ...to here
liburing-2.13/test/poll-mshot-overflow.c:151:24: danger: ‘fds[0]’ leaks here
#  149|   	if (pipe(fds) != 0) {
#  150|   		perror("pipe");
#  151|-> 		return -1;
#  152|   	}
#  153|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def375]
liburing-2.13/test/poll-mshot-overflow.c:151:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/poll-mshot-overflow.c:149:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-mshot-overflow.c:154:32: branch_false: ...to here
liburing-2.13/test/poll-mshot-overflow.c:151:24: danger: ‘fds[1]’ leaks here
#  149|   	if (pipe(fds) != 0) {
#  150|   		perror("pipe");
#  151|-> 		return -1;
#  152|   	}
#  153|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def376]
liburing-2.13/test/poll-mshot-overflow.c:159:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/poll-mshot-overflow.c:149:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-mshot-overflow.c:154:32: branch_false: ...to here
liburing-2.13/test/poll-mshot-overflow.c:159:15: throw: if ‘io_uring_queue_init_params’ throws an exception...
liburing-2.13/test/poll-mshot-overflow.c:159:15: danger: ‘fds[1]’ leaks here
#  157|   	};
#  158|   
#  159|-> 	ret = io_uring_queue_init_params(2, &ring, &params);
#  160|   	if (ret) {
#  161|   		fprintf(stderr, "queue init: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def377]
liburing-2.13/test/poll-mshot-overflow.c:159:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[tmp]’
liburing-2.13/test/poll-mshot-overflow.c:149:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-mshot-overflow.c:154:32: branch_false: ...to here
liburing-2.13/test/poll-mshot-overflow.c:159:15: throw: if ‘io_uring_queue_init_params’ throws an exception...
liburing-2.13/test/poll-mshot-overflow.c:159:15: danger: ‘fds[tmp]’ leaks here
#  157|   	};
#  158|   
#  159|-> 	ret = io_uring_queue_init_params(2, &ring, &params);
#  160|   	if (ret) {
#  161|   		fprintf(stderr, "queue init: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def378]
liburing-2.13/test/poll-mshot-update.c:227:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor
liburing-2.13/test/poll-mshot-update.c:226:21: branch_true: following ‘true’ branch...
liburing-2.13/test/poll-mshot-update.c:227:26: branch_true: ...to here
liburing-2.13/test/poll-mshot-update.c:227:20: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-mshot-update.c:231:17: branch_false: ...to here
liburing-2.13/test/poll-mshot-update.c:226:21: branch_true: following ‘true’ branch...
liburing-2.13/test/poll-mshot-update.c:227:26: branch_true: ...to here
liburing-2.13/test/poll-mshot-update.c:227:21: danger: leaks here
#  225|   
#  226|   	for (i = 0; i < nfiles; i++) {
#  227|-> 		if (pipe(p[i].fd) < 0) {
#  228|   			perror("pipe");
#  229|   			return 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def379]
liburing-2.13/test/poll-v-poll.c:100:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll-v-poll.c:98:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:103:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:100:24: danger: ‘pipe1[1]’ leaks here
#   98|   	if (pipe(pipe1) < 0) {
#   99|   		perror("pipe");
#  100|-> 		return 1;
#  101|   	}
#  102|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def380]
liburing-2.13/test/poll-v-poll.c:110:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll-v-poll.c:98:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:103:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:110:9: throw: if ‘usleep’ throws an exception...
liburing-2.13/test/poll-v-poll.c:110:9: danger: ‘pipe1[1]’ leaks here
#  108|   	pthread_create(&threads[1], NULL, iou_poll, &td);
#  109|   	pthread_create(&threads[0], NULL, poll_pipe, &td);
#  110|-> 	usleep(100000);
#  111|   
#  112|   	buf = 0x89;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def381]
liburing-2.13/test/poll-v-poll.c:113:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll-v-poll.c:98:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:103:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:113:15: throw: if ‘write’ throws an exception...
liburing-2.13/test/poll-v-poll.c:113:15: danger: ‘pipe1[1]’ leaks here
#  111|   
#  112|   	buf = 0x89;
#  113|-> 	ret = write(pipe1[1], &buf, sizeof(buf));
#  114|   	if (ret != sizeof(buf)) {
#  115|   		fprintf(stderr, "write failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def382]
liburing-2.13/test/poll-v-poll.c:119:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll-v-poll.c:98:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:103:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:114:12: branch_false: following ‘false’ branch (when ‘ret == 1’)...
liburing-2.13/test/poll-v-poll.c:119:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:119:9: throw: if ‘pthread_join’ throws an exception...
liburing-2.13/test/poll-v-poll.c:119:9: danger: ‘pipe1[1]’ leaks here
#  117|   	}
#  118|   
#  119|-> 	pthread_join(threads[0], NULL);
#  120|   	pthread_join(threads[1], NULL);
#  121|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def383]
liburing-2.13/test/poll-v-poll.c:120:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll-v-poll.c:98:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:103:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:114:12: branch_false: following ‘false’ branch (when ‘ret == 1’)...
liburing-2.13/test/poll-v-poll.c:119:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:120:9: throw: if ‘pthread_join’ throws an exception...
liburing-2.13/test/poll-v-poll.c:120:9: danger: ‘pipe1[1]’ leaks here
#  118|   
#  119|   	pthread_join(threads[0], NULL);
#  120|-> 	pthread_join(threads[1], NULL);
#  121|   
#  122|   	if (td.out[0] != td.out[1]) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def384]
liburing-2.13/test/poll-v-poll.c:139:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/poll-v-poll.c:137:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:142:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:139:24: danger: ‘pipe1[0]’ leaks here
#  137|   	if (pipe(pipe1) < 0) {
#  138|   		perror("pipe");
#  139|-> 		return 1;
#  140|   	}
#  141|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def385]
liburing-2.13/test/poll-v-poll.c:149:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/poll-v-poll.c:137:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:142:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:149:9: throw: if ‘usleep’ throws an exception...
liburing-2.13/test/poll-v-poll.c:149:9: danger: ‘pipe1[0]’ leaks here
#  147|   	pthread_create(&threads[0], NULL, poll_pipe, &td);
#  148|   	pthread_create(&threads[1], NULL, iou_poll, &td);
#  149|-> 	usleep(100000);
#  150|   
#  151|   	buf = 0x89;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def386]
liburing-2.13/test/poll-v-poll.c:152:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/poll-v-poll.c:137:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:142:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:152:15: throw: if ‘write’ throws an exception...
liburing-2.13/test/poll-v-poll.c:152:15: danger: ‘pipe1[0]’ leaks here
#  150|   
#  151|   	buf = 0x89;
#  152|-> 	ret = write(pipe1[1], &buf, sizeof(buf));
#  153|   	if (ret != sizeof(buf)) {
#  154|   		fprintf(stderr, "write failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def387]
liburing-2.13/test/poll-v-poll.c:158:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/poll-v-poll.c:137:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:142:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:153:12: branch_false: following ‘false’ branch (when ‘ret == 1’)...
liburing-2.13/test/poll-v-poll.c:158:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:158:9: throw: if ‘pthread_join’ throws an exception...
liburing-2.13/test/poll-v-poll.c:158:9: danger: ‘pipe1[0]’ leaks here
#  156|   	}
#  157|   
#  158|-> 	pthread_join(threads[0], NULL);
#  159|   	pthread_join(threads[1], NULL);
#  160|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def388]
liburing-2.13/test/poll-v-poll.c:159:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/poll-v-poll.c:137:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:142:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:153:12: branch_false: following ‘false’ branch (when ‘ret == 1’)...
liburing-2.13/test/poll-v-poll.c:158:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:159:9: throw: if ‘pthread_join’ throws an exception...
liburing-2.13/test/poll-v-poll.c:159:9: danger: ‘pipe1[0]’ leaks here
#  157|   
#  158|   	pthread_join(threads[0], NULL);
#  159|-> 	pthread_join(threads[1], NULL);
#  160|   
#  161|   	if (td.out[0] != td.out[1]) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def389]
liburing-2.13/test/poll-v-poll.c:248:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/poll-v-poll.c:236:12: enter_function: entry to ‘do_test_epoll’
liburing-2.13/test/poll-v-poll.c:246:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/poll-v-poll.c:251:13: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:251:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:256:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:259:12: branch_false: following ‘false’ branch (when ‘iou_epoll_add != 0’)...
liburing-2.13/test/poll-v-poll.c:265:23: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:265:23: call_function: calling ‘iou_epoll_ctl’ from ‘do_test_epoll’
liburing-2.13/test/poll-v-poll.c:265:23: return_function: returning to ‘do_test_epoll’ from ‘iou_epoll_ctl’
liburing-2.13/test/poll-v-poll.c:266:20: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:269:27: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:269:27: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:274:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:248:24: danger: ‘pipe1[0]’ leaks here
#  246|   	if (fd < 0) {
#  247|   		perror("epoll_create");
#  248|-> 		return 1;
#  249|   	}
#  250|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def390]
liburing-2.13/test/poll-v-poll.c:248:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll-v-poll.c:246:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/poll-v-poll.c:251:13: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:251:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:256:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:259:12: branch_true: following ‘true’ branch (when ‘iou_epoll_add == 0’)...
liburing-2.13/test/poll-v-poll.c:260:21: branch_true: ...to here
liburing-2.13/test/poll-v-poll.c:248:24: danger: ‘pipe1[1]’ leaks here
#  246|   	if (fd < 0) {
#  247|   		perror("epoll_create");
#  248|-> 		return 1;
#  249|   	}
#  250|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def391]
liburing-2.13/test/poll-v-poll.c:261:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll-v-poll.c:246:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/poll-v-poll.c:251:13: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:251:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:256:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:259:12: branch_true: following ‘true’ branch (when ‘iou_epoll_add == 0’)...
liburing-2.13/test/poll-v-poll.c:260:21: branch_true: ...to here
liburing-2.13/test/poll-v-poll.c:260:20: branch_true: following ‘true’ branch...
liburing-2.13/test/poll-v-poll.c:261:25: branch_true: ...to here
liburing-2.13/test/poll-v-poll.c:261:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/poll-v-poll.c:261:25: danger: ‘pipe1[1]’ leaks here
#  259|   	if (!iou_epoll_add) {
#  260|   		if (epoll_ctl(fd, EPOLL_CTL_ADD, pipe1[0], &ev) < 0) {
#  261|-> 			perror("epoll_ctrl");
#  262|   			return 1;
#  263|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def392]
liburing-2.13/test/poll-v-poll.c:281:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ev.data.fd’
liburing-2.13/test/poll-v-poll.c:236:12: enter_function: entry to ‘do_test_epoll’
liburing-2.13/test/poll-v-poll.c:246:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/poll-v-poll.c:251:13: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:251:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:256:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:259:12: branch_false: following ‘false’ branch (when ‘iou_epoll_add != 0’)...
liburing-2.13/test/poll-v-poll.c:265:23: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:265:23: call_function: calling ‘iou_epoll_ctl’ from ‘do_test_epoll’
liburing-2.13/test/poll-v-poll.c:265:23: return_function: returning to ‘do_test_epoll’ from ‘iou_epoll_ctl’
liburing-2.13/test/poll-v-poll.c:266:20: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:269:27: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:269:27: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:274:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:281:9: throw: if ‘usleep’ throws an exception...
liburing-2.13/test/poll-v-poll.c:281:9: danger: ‘ev.data.fd’ leaks here
#  279|   	pthread_create(&threads[0], NULL, iou_poll, &td);
#  280|   	pthread_create(&threads[1], NULL, epoll_wait_fn, &td);
#  281|-> 	usleep(100000);
#  282|   
#  283|   	buf = 0x89;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def393]
liburing-2.13/test/poll-v-poll.c:281:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll-v-poll.c:246:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/poll-v-poll.c:251:13: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:251:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:256:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:259:12: branch_true: following ‘true’ branch (when ‘iou_epoll_add == 0’)...
liburing-2.13/test/poll-v-poll.c:260:21: branch_true: ...to here
liburing-2.13/test/poll-v-poll.c:260:20: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:274:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:281:9: throw: if ‘usleep’ throws an exception...
liburing-2.13/test/poll-v-poll.c:281:9: danger: ‘pipe1[1]’ leaks here
#  279|   	pthread_create(&threads[0], NULL, iou_poll, &td);
#  280|   	pthread_create(&threads[1], NULL, epoll_wait_fn, &td);
#  281|-> 	usleep(100000);
#  282|   
#  283|   	buf = 0x89;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def394]
liburing-2.13/test/poll-v-poll.c:284:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ev.data.fd’
liburing-2.13/test/poll-v-poll.c:236:12: enter_function: entry to ‘do_test_epoll’
liburing-2.13/test/poll-v-poll.c:246:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/poll-v-poll.c:251:13: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:251:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:256:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:259:12: branch_false: following ‘false’ branch (when ‘iou_epoll_add != 0’)...
liburing-2.13/test/poll-v-poll.c:265:23: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:265:23: call_function: calling ‘iou_epoll_ctl’ from ‘do_test_epoll’
liburing-2.13/test/poll-v-poll.c:265:23: return_function: returning to ‘do_test_epoll’ from ‘iou_epoll_ctl’
liburing-2.13/test/poll-v-poll.c:266:20: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:269:27: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:269:27: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:274:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:284:15: throw: if ‘write’ throws an exception...
liburing-2.13/test/poll-v-poll.c:284:15: danger: ‘ev.data.fd’ leaks here
#  282|   
#  283|   	buf = 0x89;
#  284|-> 	ret = write(pipe1[1], &buf, sizeof(buf));
#  285|   	if (ret != sizeof(buf)) {
#  286|   		fprintf(stderr, "write failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def395]
liburing-2.13/test/poll-v-poll.c:284:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll-v-poll.c:246:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/poll-v-poll.c:251:13: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:251:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:256:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:259:12: branch_true: following ‘true’ branch (when ‘iou_epoll_add == 0’)...
liburing-2.13/test/poll-v-poll.c:260:21: branch_true: ...to here
liburing-2.13/test/poll-v-poll.c:260:20: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:274:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:284:15: throw: if ‘write’ throws an exception...
liburing-2.13/test/poll-v-poll.c:284:15: danger: ‘pipe1[1]’ leaks here
#  282|   
#  283|   	buf = 0x89;
#  284|-> 	ret = write(pipe1[1], &buf, sizeof(buf));
#  285|   	if (ret != sizeof(buf)) {
#  286|   		fprintf(stderr, "write failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def396]
liburing-2.13/test/poll-v-poll.c:290:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ev.data.fd’
liburing-2.13/test/poll-v-poll.c:236:12: enter_function: entry to ‘do_test_epoll’
liburing-2.13/test/poll-v-poll.c:246:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/poll-v-poll.c:251:13: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:251:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:256:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:259:12: branch_false: following ‘false’ branch (when ‘iou_epoll_add != 0’)...
liburing-2.13/test/poll-v-poll.c:265:23: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:265:23: call_function: calling ‘iou_epoll_ctl’ from ‘do_test_epoll’
liburing-2.13/test/poll-v-poll.c:265:23: return_function: returning to ‘do_test_epoll’ from ‘iou_epoll_ctl’
liburing-2.13/test/poll-v-poll.c:266:20: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:269:27: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:269:27: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:274:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:285:12: branch_false: following ‘false’ branch (when ‘ret == 1’)...
liburing-2.13/test/poll-v-poll.c:290:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:290:9: throw: if ‘pthread_join’ throws an exception...
liburing-2.13/test/poll-v-poll.c:290:9: danger: ‘ev.data.fd’ leaks here
#  288|   	}
#  289|   
#  290|-> 	pthread_join(threads[0], NULL);
#  291|   	pthread_join(threads[1], NULL);
#  292|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def397]
liburing-2.13/test/poll-v-poll.c:290:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll-v-poll.c:246:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/poll-v-poll.c:251:13: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:251:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:256:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:259:12: branch_true: following ‘true’ branch (when ‘iou_epoll_add == 0’)...
liburing-2.13/test/poll-v-poll.c:260:21: branch_true: ...to here
liburing-2.13/test/poll-v-poll.c:260:20: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:274:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:285:12: branch_false: following ‘false’ branch (when ‘ret == 1’)...
liburing-2.13/test/poll-v-poll.c:290:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:290:9: throw: if ‘pthread_join’ throws an exception...
liburing-2.13/test/poll-v-poll.c:290:9: danger: ‘pipe1[1]’ leaks here
#  288|   	}
#  289|   
#  290|-> 	pthread_join(threads[0], NULL);
#  291|   	pthread_join(threads[1], NULL);
#  292|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def398]
liburing-2.13/test/poll-v-poll.c:291:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ev.data.fd’
liburing-2.13/test/poll-v-poll.c:236:12: enter_function: entry to ‘do_test_epoll’
liburing-2.13/test/poll-v-poll.c:246:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/poll-v-poll.c:251:13: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:251:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:256:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:259:12: branch_false: following ‘false’ branch (when ‘iou_epoll_add != 0’)...
liburing-2.13/test/poll-v-poll.c:265:23: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:265:23: call_function: calling ‘iou_epoll_ctl’ from ‘do_test_epoll’
liburing-2.13/test/poll-v-poll.c:265:23: return_function: returning to ‘do_test_epoll’ from ‘iou_epoll_ctl’
liburing-2.13/test/poll-v-poll.c:266:20: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:269:27: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:269:27: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:274:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:285:12: branch_false: following ‘false’ branch (when ‘ret == 1’)...
liburing-2.13/test/poll-v-poll.c:290:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:291:9: throw: if ‘pthread_join’ throws an exception...
liburing-2.13/test/poll-v-poll.c:291:9: danger: ‘ev.data.fd’ leaks here
#  289|   
#  290|   	pthread_join(threads[0], NULL);
#  291|-> 	pthread_join(threads[1], NULL);
#  292|   	return 0;
#  293|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def399]
liburing-2.13/test/poll-v-poll.c:291:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll-v-poll.c:246:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/poll-v-poll.c:251:13: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:251:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:256:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:259:12: branch_true: following ‘true’ branch (when ‘iou_epoll_add == 0’)...
liburing-2.13/test/poll-v-poll.c:260:21: branch_true: ...to here
liburing-2.13/test/poll-v-poll.c:260:20: branch_false: following ‘false’ branch...
liburing-2.13/test/poll-v-poll.c:274:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:285:12: branch_false: following ‘false’ branch (when ‘ret == 1’)...
liburing-2.13/test/poll-v-poll.c:290:9: branch_false: ...to here
liburing-2.13/test/poll-v-poll.c:291:9: throw: if ‘pthread_join’ throws an exception...
liburing-2.13/test/poll-v-poll.c:291:9: danger: ‘pipe1[1]’ leaks here
#  289|   
#  290|   	pthread_join(threads[0], NULL);
#  291|-> 	pthread_join(threads[1], NULL);
#  292|   	return 0;
#  293|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def400]
liburing-2.13/test/poll.c:45:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/poll.c:286:5: enter_function: entry to ‘main’
liburing-2.13/test/poll.c:290:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/poll.c:293:15: branch_false: ...to here
liburing-2.13/test/poll.c:293:15: call_function: calling ‘test_basic’ from ‘main’
#   43|   	if (pipe(pipe1) != 0) {
#   44|   		perror("pipe");
#   45|-> 		return 1;
#   46|   	}
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def401]
liburing-2.13/test/poll.c:45:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll.c:286:5: enter_function: entry to ‘main’
liburing-2.13/test/poll.c:290:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/poll.c:293:15: branch_false: ...to here
liburing-2.13/test/poll.c:293:15: call_function: calling ‘test_basic’ from ‘main’
#   43|   	if (pipe(pipe1) != 0) {
#   44|   		perror("pipe");
#   45|-> 		return 1;
#   46|   	}
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def402]
liburing-2.13/test/poll.c:50:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/poll.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll.c:48:13: branch_false: ...to here
liburing-2.13/test/poll.c:49:12: branch_true: following ‘true’ branch (when ‘p == -1’)...
liburing-2.13/test/poll.c:50:17: branch_true: ...to here
liburing-2.13/test/poll.c:50:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/poll.c:50:17: danger: ‘pipe1[0]’ leaks here
#   48|   	p = fork();
#   49|   	if (p == -1) {
#   50|-> 		perror("fork");
#   51|   		exit(2);
#   52|   	} else if (p == 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def403]
liburing-2.13/test/poll.c:50:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll.c:48:13: branch_false: ...to here
liburing-2.13/test/poll.c:49:12: branch_true: following ‘true’ branch (when ‘p == -1’)...
liburing-2.13/test/poll.c:50:17: branch_true: ...to here
liburing-2.13/test/poll.c:50:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/poll.c:50:17: danger: ‘pipe1[1]’ leaks here
#   48|   	p = fork();
#   49|   	if (p == -1) {
#   50|-> 		perror("fork");
#   51|   		exit(2);
#   52|   	} else if (p == 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def404]
liburing-2.13/test/poll.c:53:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/poll.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll.c:48:13: branch_false: ...to here
liburing-2.13/test/poll.c:49:12: branch_false: following ‘false’ branch (when ‘p != -1’)...
liburing-2.13/test/poll.c:52:19: branch_false: ...to here
liburing-2.13/test/poll.c:52:19: branch_true: following ‘true’ branch (when ‘p == 0’)...
liburing-2.13/test/poll.c:53:23: branch_true: ...to here
liburing-2.13/test/poll.c:53:23: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/poll.c:53:23: danger: ‘pipe1[0]’ leaks here
#   51|   		exit(2);
#   52|   	} else if (p == 0) {
#   53|-> 		ret = io_uring_queue_init(1, &ring, 0);
#   54|   		if (ret) {
#   55|   			fprintf(stderr, "child: ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def405]
liburing-2.13/test/poll.c:53:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll.c:48:13: branch_false: ...to here
liburing-2.13/test/poll.c:49:12: branch_false: following ‘false’ branch (when ‘p != -1’)...
liburing-2.13/test/poll.c:52:19: branch_false: ...to here
liburing-2.13/test/poll.c:52:19: branch_true: following ‘true’ branch (when ‘p == 0’)...
liburing-2.13/test/poll.c:53:23: branch_true: ...to here
liburing-2.13/test/poll.c:53:23: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/poll.c:53:23: danger: ‘pipe1[1]’ leaks here
#   51|   		exit(2);
#   52|   	} else if (p == 0) {
#   53|-> 		ret = io_uring_queue_init(1, &ring, 0);
#   54|   		if (ret) {
#   55|   			fprintf(stderr, "child: ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def406]
liburing-2.13/test/poll.c:101:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/poll.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll.c:48:13: branch_false: ...to here
liburing-2.13/test/poll.c:49:12: branch_false: following ‘false’ branch (when ‘p != -1’)...
liburing-2.13/test/poll.c:52:19: branch_false: ...to here
liburing-2.13/test/poll.c:52:19: branch_false: following ‘false’ branch (when ‘p != 0’)...
liburing-2.13/test/poll.c:52:19: branch_false: ...to here
liburing-2.13/test/poll.c:101:23: throw: if ‘write’ throws an exception...
liburing-2.13/test/poll.c:101:23: danger: ‘pipe1[0]’ leaks here
#   99|   	do {
#  100|   		errno = 0;
#  101|-> 		ret = write(pipe1[1], "foo", 3);
#  102|   	} while (ret == -1 && errno == EINTR);
#  103|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def407]
liburing-2.13/test/poll.c:101:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll.c:48:13: branch_false: ...to here
liburing-2.13/test/poll.c:49:12: branch_false: following ‘false’ branch (when ‘p != -1’)...
liburing-2.13/test/poll.c:52:19: branch_false: ...to here
liburing-2.13/test/poll.c:52:19: branch_false: following ‘false’ branch (when ‘p != 0’)...
liburing-2.13/test/poll.c:52:19: branch_false: ...to here
liburing-2.13/test/poll.c:101:23: throw: if ‘write’ throws an exception...
liburing-2.13/test/poll.c:101:23: danger: ‘pipe1[1]’ leaks here
#   99|   	do {
#  100|   		errno = 0;
#  101|-> 		ret = write(pipe1[1], "foo", 3);
#  102|   	} while (ret == -1 && errno == EINTR);
#  103|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def408]
liburing-2.13/test/poll.c:108:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/poll.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll.c:48:13: branch_false: ...to here
liburing-2.13/test/poll.c:49:12: branch_false: following ‘false’ branch (when ‘p != -1’)...
liburing-2.13/test/poll.c:52:19: branch_false: ...to here
liburing-2.13/test/poll.c:52:19: branch_false: following ‘false’ branch (when ‘p != 0’)...
liburing-2.13/test/poll.c:52:19: branch_false: ...to here
liburing-2.13/test/poll.c:102:18: branch_false: following ‘false’ branch (when ‘ret != -1’)...
liburing-2.13/test/poll.c:104:12: branch_false: ...to here
liburing-2.13/test/poll.c:104:12: branch_false: following ‘false’ branch (when ‘ret == 3’)...
liburing-2.13/test/poll.c:108:9: branch_false: ...to here
liburing-2.13/test/poll.c:108:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/poll.c:108:9: danger: ‘pipe1[0]’ leaks here
#  106|   		return 1;
#  107|   	}
#  108|-> 	close(pipe1[0]);
#  109|   	close(pipe1[1]);
#  110|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def409]
liburing-2.13/test/poll.c:108:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll.c:48:13: branch_false: ...to here
liburing-2.13/test/poll.c:49:12: branch_false: following ‘false’ branch (when ‘p != -1’)...
liburing-2.13/test/poll.c:52:19: branch_false: ...to here
liburing-2.13/test/poll.c:52:19: branch_false: following ‘false’ branch (when ‘p != 0’)...
liburing-2.13/test/poll.c:52:19: branch_false: ...to here
liburing-2.13/test/poll.c:102:18: branch_false: following ‘false’ branch (when ‘ret != -1’)...
liburing-2.13/test/poll.c:104:12: branch_false: ...to here
liburing-2.13/test/poll.c:104:12: branch_false: following ‘false’ branch (when ‘ret == 3’)...
liburing-2.13/test/poll.c:108:9: branch_false: ...to here
liburing-2.13/test/poll.c:108:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/poll.c:108:9: danger: ‘pipe1[1]’ leaks here
#  106|   		return 1;
#  107|   	}
#  108|-> 	close(pipe1[0]);
#  109|   	close(pipe1[1]);
#  110|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def410]
liburing-2.13/test/poll.c:109:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/poll.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/poll.c:48:13: branch_false: ...to here
liburing-2.13/test/poll.c:49:12: branch_false: following ‘false’ branch (when ‘p != -1’)...
liburing-2.13/test/poll.c:52:19: branch_false: ...to here
liburing-2.13/test/poll.c:52:19: branch_false: following ‘false’ branch (when ‘p != 0’)...
liburing-2.13/test/poll.c:52:19: branch_false: ...to here
liburing-2.13/test/poll.c:102:18: branch_false: following ‘false’ branch (when ‘ret != -1’)...
liburing-2.13/test/poll.c:104:12: branch_false: ...to here
liburing-2.13/test/poll.c:104:12: branch_false: following ‘false’ branch (when ‘ret == 3’)...
liburing-2.13/test/poll.c:108:9: branch_false: ...to here
liburing-2.13/test/poll.c:109:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/poll.c:109:9: danger: ‘pipe1[1]’ leaks here
#  107|   	}
#  108|   	close(pipe1[0]);
#  109|-> 	close(pipe1[1]);
#  110|   	return 0;
#  111|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def411]
liburing-2.13/test/read-inc-file.c:85:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fname, 0)’
liburing-2.13/test/read-inc-file.c:60:5: enter_function: entry to ‘main’
liburing-2.13/test/read-inc-file.c:72:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/read-inc-file.c:75:9: branch_false: ...to here
liburing-2.13/test/read-inc-file.c:76:13: call_function: calling ‘create_test_file’ from ‘main’
liburing-2.13/test/read-inc-file.c:76:13: return_function: returning to ‘main’ from ‘create_test_file’
liburing-2.13/test/read-inc-file.c:76:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-inc-file.c:79:14: branch_false: ...to here
liburing-2.13/test/read-inc-file.c:79:14: acquire_resource: opened here
liburing-2.13/test/read-inc-file.c:80:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-inc-file.c:85:15: branch_false: ...to here
liburing-2.13/test/read-inc-file.c:85:15: throw: if ‘io_uring_queue_init_params’ throws an exception...
liburing-2.13/test/read-inc-file.c:85:15: danger: ‘open(&fname, 0)’ leaks here; was opened at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#   83|   	}
#   84|   
#   85|-> 	ret = io_uring_queue_init_params(64, &ring, &p);
#   86|   	if (ret) {
#   87|   		fprintf(stderr, "ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def412]
liburing-2.13/test/read-inc-file.c:86:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fname, 0)’
liburing-2.13/test/read-inc-file.c:60:5: enter_function: entry to ‘main’
liburing-2.13/test/read-inc-file.c:72:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/read-inc-file.c:75:9: branch_false: ...to here
liburing-2.13/test/read-inc-file.c:76:13: call_function: calling ‘create_test_file’ from ‘main’
liburing-2.13/test/read-inc-file.c:76:13: return_function: returning to ‘main’ from ‘create_test_file’
liburing-2.13/test/read-inc-file.c:76:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-inc-file.c:79:14: branch_false: ...to here
liburing-2.13/test/read-inc-file.c:79:14: acquire_resource: opened here
liburing-2.13/test/read-inc-file.c:80:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-inc-file.c:85:15: branch_false: ...to here
liburing-2.13/test/read-inc-file.c:86:12: danger: ‘open(&fname, 0)’ leaks here; was opened at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
#   84|   
#   85|   	ret = io_uring_queue_init_params(64, &ring, &p);
#   86|-> 	if (ret) {
#   87|   		fprintf(stderr, "ring setup failed: %d\n", ret);
#   88|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def413]
liburing-2.13/test/read-inc-file.c:91:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fname, 0)’
liburing-2.13/test/read-inc-file.c:60:5: enter_function: entry to ‘main’
liburing-2.13/test/read-inc-file.c:72:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/read-inc-file.c:75:9: branch_false: ...to here
liburing-2.13/test/read-inc-file.c:76:13: call_function: calling ‘create_test_file’ from ‘main’
liburing-2.13/test/read-inc-file.c:76:13: return_function: returning to ‘main’ from ‘create_test_file’
liburing-2.13/test/read-inc-file.c:76:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-inc-file.c:79:14: branch_false: ...to here
liburing-2.13/test/read-inc-file.c:79:14: acquire_resource: opened here
liburing-2.13/test/read-inc-file.c:80:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-inc-file.c:85:15: branch_false: ...to here
liburing-2.13/test/read-inc-file.c:86:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-inc-file.c:91:13: branch_false: ...to here
liburing-2.13/test/read-inc-file.c:91:13: danger: ‘open(&fname, 0)’ leaks here; was opened at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
#   89|   	}
#   90|   
#   91|-> 	if (posix_memalign((void **) &buf, 4096, 65536))
#   92|   		goto err;
#   93|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def414]
liburing-2.13/test/read-mshot-empty.c:82:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/read-mshot-empty.c:74:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/read-mshot-empty.c:77:13: branch_false: ...to here
liburing-2.13/test/read-mshot-empty.c:77:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot-empty.c:82:15: branch_false: ...to here
liburing-2.13/test/read-mshot-empty.c:82:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/read-mshot-empty.c:82:15: danger: ‘fds[0]’ leaks here
#   80|   	}
#   81|   
#   82|-> 	ret = io_uring_queue_init(8, &ring, 0);
#   83|   	if (ret) {
#   84|   		fprintf(stderr, "queue_init: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def415]
liburing-2.13/test/read-mshot-empty.c:82:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/read-mshot-empty.c:74:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/read-mshot-empty.c:77:13: branch_false: ...to here
liburing-2.13/test/read-mshot-empty.c:77:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot-empty.c:82:15: branch_false: ...to here
liburing-2.13/test/read-mshot-empty.c:82:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/read-mshot-empty.c:82:15: danger: ‘fds[1]’ leaks here
#   80|   	}
#   81|   
#   82|-> 	ret = io_uring_queue_init(8, &ring, 0);
#   83|   	if (ret) {
#   84|   		fprintf(stderr, "queue_init: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def416]
liburing-2.13/test/read-mshot-empty.c:88:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/read-mshot-empty.c:74:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/read-mshot-empty.c:77:13: branch_false: ...to here
liburing-2.13/test/read-mshot-empty.c:77:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot-empty.c:82:15: branch_false: ...to here
liburing-2.13/test/read-mshot-empty.c:83:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot-empty.c:88:14: branch_false: ...to here
liburing-2.13/test/read-mshot-empty.c:88:14: throw: if ‘io_uring_setup_buf_ring’ throws an exception...
liburing-2.13/test/read-mshot-empty.c:88:14: danger: ‘fds[0]’ leaks here
#   86|   	}
#   87|   
#   88|-> 	br = io_uring_setup_buf_ring(&ring, NR_BUFS, BGID, 0, &ret);
#   89|   	if (!br) {
#   90|   		if (ret == -EINVAL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def417]
liburing-2.13/test/read-mshot-empty.c:88:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/read-mshot-empty.c:74:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/read-mshot-empty.c:77:13: branch_false: ...to here
liburing-2.13/test/read-mshot-empty.c:77:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot-empty.c:82:15: branch_false: ...to here
liburing-2.13/test/read-mshot-empty.c:83:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot-empty.c:88:14: branch_false: ...to here
liburing-2.13/test/read-mshot-empty.c:88:14: throw: if ‘io_uring_setup_buf_ring’ throws an exception...
liburing-2.13/test/read-mshot-empty.c:88:14: danger: ‘fds[1]’ leaks here
#   86|   	}
#   87|   
#   88|-> 	br = io_uring_setup_buf_ring(&ring, NR_BUFS, BGID, 0, &ret);
#   89|   	if (!br) {
#   90|   		if (ret == -EINVAL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def418]
liburing-2.13/test/read-mshot.c:76:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/read-mshot.c:58:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:61:9: branch_false: ...to here
liburing-2.13/test/read-mshot.c:63:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:68:13: branch_false: ...to here
liburing-2.13/test/read-mshot.c:68:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:73:13: branch_false: ...to here
liburing-2.13/test/read-mshot.c:73:13: branch_true: following ‘true’ branch...
liburing-2.13/test/read-mshot.c:73:13: branch_true: ...to here
liburing-2.13/test/read-mshot.c:76:14: throw: if ‘io_uring_setup_buf_ring’ throws an exception...
liburing-2.13/test/read-mshot.c:76:14: danger: ‘fds[0]’ leaks here
#   74|   		return 1;
#   75|   
#   76|-> 	br = io_uring_setup_buf_ring(&ring, 32, BUF_BGID, IOU_PBUF_RING_INC, &ret);
#   77|   	if (!br) {
#   78|   		if (ret == -EINVAL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def419]
liburing-2.13/test/read-mshot.c:76:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/read-mshot.c:58:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:61:9: branch_false: ...to here
liburing-2.13/test/read-mshot.c:63:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:68:13: branch_false: ...to here
liburing-2.13/test/read-mshot.c:68:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:73:13: branch_false: ...to here
liburing-2.13/test/read-mshot.c:73:13: branch_true: following ‘true’ branch...
liburing-2.13/test/read-mshot.c:73:13: branch_true: ...to here
liburing-2.13/test/read-mshot.c:76:14: throw: if ‘io_uring_setup_buf_ring’ throws an exception...
liburing-2.13/test/read-mshot.c:76:14: danger: ‘fds[1]’ leaks here
#   74|   		return 1;
#   75|   
#   76|-> 	br = io_uring_setup_buf_ring(&ring, 32, BUF_BGID, IOU_PBUF_RING_INC, &ret);
#   77|   	if (!br) {
#   78|   		if (ret == -EINVAL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def420]
liburing-2.13/test/read-mshot.c:170:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/read-mshot.c:168:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:173:13: branch_false: ...to here
liburing-2.13/test/read-mshot.c:173:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:178:13: branch_false: ...to here
liburing-2.13/test/read-mshot.c:170:24: danger: ‘fds[0]’ leaks here
#  168|   	if (ret) {
#  169|   		fprintf(stderr, "ring setup failed: %d\n", ret);
#  170|-> 		return 1;
#  171|   	}
#  172|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def421]
liburing-2.13/test/read-mshot.c:170:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/read-mshot.c:168:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:173:13: branch_false: ...to here
liburing-2.13/test/read-mshot.c:173:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:178:13: branch_false: ...to here
liburing-2.13/test/read-mshot.c:170:24: danger: ‘fds[1]’ leaks here
#  168|   	if (ret) {
#  169|   		fprintf(stderr, "ring setup failed: %d\n", ret);
#  170|-> 		return 1;
#  171|   	}
#  172|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def422]
liburing-2.13/test/read-mshot.c:181:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/read-mshot.c:168:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:173:13: branch_false: ...to here
liburing-2.13/test/read-mshot.c:173:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:178:13: branch_false: ...to here
liburing-2.13/test/read-mshot.c:178:13: branch_true: following ‘true’ branch...
liburing-2.13/test/read-mshot.c:178:13: branch_true: ...to here
liburing-2.13/test/read-mshot.c:181:14: throw: if ‘io_uring_setup_buf_ring’ throws an exception...
liburing-2.13/test/read-mshot.c:181:14: danger: ‘fds[0]’ leaks here
#  179|   		return 1;
#  180|   
#  181|-> 	br = io_uring_setup_buf_ring(&ring, NR_BUFS, BUF_BGID, 0, &ret);
#  182|   	if (!br) {
#  183|   		if (ret == -EINVAL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def423]
liburing-2.13/test/read-mshot.c:181:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/read-mshot.c:168:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:173:13: branch_false: ...to here
liburing-2.13/test/read-mshot.c:173:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:178:13: branch_false: ...to here
liburing-2.13/test/read-mshot.c:178:13: branch_true: following ‘true’ branch...
liburing-2.13/test/read-mshot.c:178:13: branch_true: ...to here
liburing-2.13/test/read-mshot.c:181:14: throw: if ‘io_uring_setup_buf_ring’ throws an exception...
liburing-2.13/test/read-mshot.c:181:14: danger: ‘fds[1]’ leaks here
#  179|   		return 1;
#  180|   
#  181|-> 	br = io_uring_setup_buf_ring(&ring, NR_BUFS, BUF_BGID, 0, &ret);
#  182|   	if (!br) {
#  183|   		if (ret == -EINVAL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def424]
liburing-2.13/test/read-mshot.c:286:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/read-mshot.c:284:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:289:12: branch_false: ...to here
liburing-2.13/test/read-mshot.c:296:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:309:13: branch_false: ...to here
liburing-2.13/test/read-mshot.c:309:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:314:12: branch_false: ...to here
liburing-2.13/test/read-mshot.c:314:12: branch_true: following ‘true’ branch (when ‘incremental == 0’)...
liburing-2.13/test/read-mshot.c:314:12: branch_true: ...to here
liburing-2.13/test/read-mshot.c:315:29: branch_true: following ‘true’ branch (when ‘i != 64’)...
liburing-2.13/test/read-mshot.c:316:41: branch_true: ...to here
liburing-2.13/test/read-mshot.c:316:41: branch_true: following ‘true’ branch (when ‘i <= 1’)...
liburing-2.13/test/read-mshot.c:317:34: branch_true: ...to here
liburing-2.13/test/read-mshot.c:318:28: branch_true: following ‘true’ branch...
liburing-2.13/test/read-mshot.c:286:24: branch_true: ...to here
liburing-2.13/test/read-mshot.c:286:24: danger: ‘fds[0]’ leaks here
#  284|   	if (ret) {
#  285|   		fprintf(stderr, "ring setup failed: %d\n", ret);
#  286|-> 		return 1;
#  287|   	}
#  288|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def425]
liburing-2.13/test/read-mshot.c:286:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/read-mshot.c:284:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:289:12: branch_false: ...to here
liburing-2.13/test/read-mshot.c:296:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:309:13: branch_false: ...to here
liburing-2.13/test/read-mshot.c:309:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:314:12: branch_false: ...to here
liburing-2.13/test/read-mshot.c:314:12: branch_true: following ‘true’ branch (when ‘incremental == 0’)...
liburing-2.13/test/read-mshot.c:314:12: branch_true: ...to here
liburing-2.13/test/read-mshot.c:315:29: branch_true: following ‘true’ branch (when ‘i != 64’)...
liburing-2.13/test/read-mshot.c:316:41: branch_true: ...to here
liburing-2.13/test/read-mshot.c:316:41: branch_true: following ‘true’ branch (when ‘i <= 1’)...
liburing-2.13/test/read-mshot.c:317:34: branch_true: ...to here
liburing-2.13/test/read-mshot.c:318:28: branch_true: following ‘true’ branch...
liburing-2.13/test/read-mshot.c:286:24: branch_true: ...to here
liburing-2.13/test/read-mshot.c:286:24: danger: ‘fds[1]’ leaks here
#  284|   	if (ret) {
#  285|   		fprintf(stderr, "ring setup failed: %d\n", ret);
#  286|-> 		return 1;
#  287|   	}
#  288|   

Error: CPPCHECK_WARNING (CWE-476): [#def426]
liburing-2.13/test/read-mshot.c:326: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: inc_index
#  324|   	} else {
#  325|   		inc_index = ptr[0] = malloc(NR_BUFS * BUF_SIZE);
#  326|-> 		memset(inc_index, 0, NR_BUFS * BUF_SIZE);
#  327|   		io_uring_buf_ring_add(br, ptr[0], NR_BUFS * BUF_SIZE, 1, BR_MASK, 0);
#  328|   		io_uring_buf_ring_advance(br, 1);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def427]
liburing-2.13/test/read-mshot.c:326:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ptr[0]’ where non-null expected
liburing-2.13/test/read-mshot.c:284:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:289:12: branch_false: ...to here
liburing-2.13/test/read-mshot.c:290:20: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:295:14: branch_false: ...to here
liburing-2.13/test/read-mshot.c:296:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:309:13: branch_false: ...to here
liburing-2.13/test/read-mshot.c:309:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-mshot.c:314:12: branch_false: ...to here
liburing-2.13/test/read-mshot.c:314:12: branch_false: following ‘false’ branch (when ‘incremental != 0’)...
liburing-2.13/test/read-mshot.c:325:38: branch_false: ...to here
liburing-2.13/test/read-mshot.c:325:38: acquire_memory: this call could return NULL
liburing-2.13/test/read-mshot.c:326:17: danger: argument 1 (‘malloc(2048)’) from [(12)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/11) could be NULL where non-null expected
#  324|   	} else {
#  325|   		inc_index = ptr[0] = malloc(NR_BUFS * BUF_SIZE);
#  326|-> 		memset(inc_index, 0, NR_BUFS * BUF_SIZE);
#  327|   		io_uring_buf_ring_add(br, ptr[0], NR_BUFS * BUF_SIZE, 1, BR_MASK, 0);
#  328|   		io_uring_buf_ring_advance(br, 1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def428]
liburing-2.13/test/read-write.c:228:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/test/read-write.c:920:5: enter_function: entry to ‘main’
liburing-2.13/test/read-write.c:941:14: call_function: calling ‘has_nonvec_read’ from ‘main’
liburing-2.13/test/read-write.c:941:14: return_function: returning to ‘main’ from ‘has_nonvec_read’
liburing-2.13/test/read-write.c:943:21: branch_true: following ‘true’ branch (when ‘i < nr’)...
liburing-2.13/test/read-write.c:944:21: branch_true: ...to here
liburing-2.13/test/read-write.c:951:23: call_function: calling ‘test_io’ from ‘main’
#  226|   #endif
#  227|   	if (fd != -1)
#  228|-> 		close(fd);
#  229|   	return 1;
#  230|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def429]
liburing-2.13/test/read-write.c:767:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 1)’
liburing-2.13/test/read-write.c:759:14: acquire_resource: opened here
liburing-2.13/test/read-write.c:760:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-write.c:767:15: branch_false: ...to here
liburing-2.13/test/read-write.c:767:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/read-write.c:767:15: danger: ‘open(file, 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  765|   	}
#  766|   
#  767|-> 	ret = io_uring_queue_init(nr_sqes, &ring, 0);
#  768|   	if (ret) {
#  769|   		fprintf(stderr, "ring create failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def430]
liburing-2.13/test/read-write.c:769:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 1)’
liburing-2.13/test/read-write.c:759:14: acquire_resource: opened here
liburing-2.13/test/read-write.c:760:12: branch_false: following ‘false’ branch...
liburing-2.13/test/read-write.c:767:15: branch_false: ...to here
liburing-2.13/test/read-write.c:823:12: branch_true: following ‘true’ branch...
liburing-2.13/test/read-write.c:824:17: branch_true: ...to here
liburing-2.13/test/read-write.c:769:17: danger: ‘open(file, 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  767|   	ret = io_uring_queue_init(nr_sqes, &ring, 0);
#  768|   	if (ret) {
#  769|-> 		fprintf(stderr, "ring create failed: %d\n", ret);
#  770|   		goto err;
#  771|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def431]
liburing-2.13/test/recv-bundle-short-ooo.c:276:24: warning[-Wanalyzer-malloc-leak]: leak of ‘test_data’
liburing-2.13/test/recv-bundle-short-ooo.c:293:12: enter_function: entry to ‘test_recv_multi_large_packet_isolate_ring’
liburing-2.13/test/recv-bundle-short-ooo.c:301:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/recv-bundle-short-ooo.c:303:17: branch_false: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:303:17: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/recv-bundle-short-ooo.c:308:15: branch_false: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:308:15: call_function: calling ‘setup_buf_ring’ from ‘test_recv_multi_large_packet_isolate_ring’
liburing-2.13/test/recv-bundle-short-ooo.c:308:15: return_function: returning to ‘test_recv_multi_large_packet_isolate_ring’ from ‘setup_buf_ring’
liburing-2.13/test/recv-bundle-short-ooo.c:309:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-bundle-short-ooo.c:311:17: branch_false: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:311:17: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-bundle-short-ooo.c:316:15: branch_false: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:317:9: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-bundle-short-ooo.c:319:13: branch_true: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:323:30: acquire_memory: allocated here
liburing-2.13/test/recv-bundle-short-ooo.c:324:25: branch_true: following ‘true’ branch (when ‘i != 1048576’)...
liburing-2.13/test/recv-bundle-short-ooo.c:325:26: branch_true: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:324:25: branch_true: following ‘true’ branch (when ‘i != 1048576’)...
liburing-2.13/test/recv-bundle-short-ooo.c:325:26: branch_true: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:324:25: branch_false: following ‘false’ branch (when ‘i == 1048576’)...
liburing-2.13/test/recv-bundle-short-ooo.c:328:9: branch_false: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:328:9: call_function: calling ‘write_all’ from ‘test_recv_multi_large_packet_isolate_ring’
#  274|   		ssize_t sent;
#  275|   
#  276|-> 		sent = write(fd, buf + bytes_sent, size - bytes_sent);
#  277|   		assert(sent > 0);	/* Ensure write succeeded */
#  278|   		bytes_sent += sent;

Error: CPPCHECK_WARNING (CWE-476): [#def432]
liburing-2.13/test/recv-bundle-short-ooo.c:325: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: test_data
#  323|   	uint8_t *test_data = malloc(ONE_MB);
#  324|   	for (int i = 0; i < ONE_MB; i++)
#  325|-> 		test_data[i] = i % 256;	/* Create repeating pattern */
#  326|   
#  327|   	/* Send test data through the socket */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def433]
liburing-2.13/test/recv-bundle-short-ooo.c:325:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘test_data’
liburing-2.13/test/recv-bundle-short-ooo.c:293:12: enter_function: entry to ‘test_recv_multi_large_packet_isolate_ring’
liburing-2.13/test/recv-bundle-short-ooo.c:301:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/recv-bundle-short-ooo.c:303:17: branch_false: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:303:17: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/recv-bundle-short-ooo.c:308:15: branch_false: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:308:15: call_function: calling ‘setup_buf_ring’ from ‘test_recv_multi_large_packet_isolate_ring’
liburing-2.13/test/recv-bundle-short-ooo.c:308:15: return_function: returning to ‘test_recv_multi_large_packet_isolate_ring’ from ‘setup_buf_ring’
liburing-2.13/test/recv-bundle-short-ooo.c:309:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-bundle-short-ooo.c:311:17: branch_false: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:311:17: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-bundle-short-ooo.c:316:15: branch_false: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:317:9: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-bundle-short-ooo.c:319:13: branch_true: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:323:30: acquire_memory: this call could return NULL
liburing-2.13/test/recv-bundle-short-ooo.c:324:25: branch_true: following ‘true’ branch (when ‘i != 1048576’)...
liburing-2.13/test/recv-bundle-short-ooo.c:325:26: branch_true: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:325:17: danger: ‘test_data + (sizetype)i’ could be NULL: unchecked value from [(26)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/25)
#  323|   	uint8_t *test_data = malloc(ONE_MB);
#  324|   	for (int i = 0; i < ONE_MB; i++)
#  325|-> 		test_data[i] = i % 256;	/* Create repeating pattern */
#  326|   
#  327|   	/* Send test data through the socket */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def434]
liburing-2.13/test/recv-bundle-short-ooo.c:331:9: warning[-Wanalyzer-malloc-leak]: leak of ‘test_data’
liburing-2.13/test/recv-bundle-short-ooo.c:293:12: enter_function: entry to ‘test_recv_multi_large_packet_isolate_ring’
liburing-2.13/test/recv-bundle-short-ooo.c:301:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/recv-bundle-short-ooo.c:303:17: branch_false: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:303:17: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/recv-bundle-short-ooo.c:308:15: branch_false: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:308:15: call_function: calling ‘setup_buf_ring’ from ‘test_recv_multi_large_packet_isolate_ring’
liburing-2.13/test/recv-bundle-short-ooo.c:308:15: return_function: returning to ‘test_recv_multi_large_packet_isolate_ring’ from ‘setup_buf_ring’
liburing-2.13/test/recv-bundle-short-ooo.c:309:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-bundle-short-ooo.c:311:17: branch_false: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:311:17: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-bundle-short-ooo.c:316:15: branch_false: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:317:9: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-bundle-short-ooo.c:319:13: branch_true: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:323:30: acquire_memory: allocated here
liburing-2.13/test/recv-bundle-short-ooo.c:324:25: branch_true: following ‘true’ branch (when ‘i != 1048576’)...
liburing-2.13/test/recv-bundle-short-ooo.c:325:26: branch_true: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:324:25: branch_true: following ‘true’ branch (when ‘i != 1048576’)...
liburing-2.13/test/recv-bundle-short-ooo.c:325:26: branch_true: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:324:25: branch_false: following ‘false’ branch (when ‘i == 1048576’)...
liburing-2.13/test/recv-bundle-short-ooo.c:328:9: branch_false: ...to here
liburing-2.13/test/recv-bundle-short-ooo.c:328:9: call_function: calling ‘write_all’ from ‘test_recv_multi_large_packet_isolate_ring’
liburing-2.13/test/recv-bundle-short-ooo.c:328:9: return_function: returning to ‘test_recv_multi_large_packet_isolate_ring’ from ‘write_all’
liburing-2.13/test/recv-bundle-short-ooo.c:331:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/recv-bundle-short-ooo.c:331:9: danger: ‘test_data’ leaks here; was allocated at [(26)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/25)
#  329|   
#  330|   	/* Close sender side to signal EOF to receiver */
#  331|-> 	close(sender_fd);
#  332|   
#  333|   	/* Initialize pointer to track our position in expected data */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def435]
liburing-2.13/test/recv-inc-ooo.c:181:9: warning[-Wanalyzer-malloc-leak]: leak of ‘current_expect’
liburing-2.13/test/recv-inc-ooo.c:253:12: enter_function: entry to ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:261:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/recv-inc-ooo.c:263:17: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:263:17: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/recv-inc-ooo.c:268:15: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:268:15: call_function: calling ‘setup_buf_ring’ from ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:268:15: return_function: returning to ‘test_recv_incr’ from ‘setup_buf_ring’
liburing-2.13/test/recv-inc-ooo.c:269:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-inc-ooo.c:271:17: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:271:17: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-inc-ooo.c:276:15: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:277:9: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-inc-ooo.c:279:13: branch_true: ...to here
liburing-2.13/test/recv-inc-ooo.c:285:36: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:285:36: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:296:30: acquire_memory: allocated here
liburing-2.13/test/recv-inc-ooo.c:297:25: branch_true: following ‘true’ branch (when ‘i != 2048’)...
liburing-2.13/test/recv-inc-ooo.c:298:26: branch_true: ...to here
liburing-2.13/test/recv-inc-ooo.c:297:25: branch_true: following ‘true’ branch (when ‘i != 2048’)...
liburing-2.13/test/recv-inc-ooo.c:298:26: branch_true: ...to here
liburing-2.13/test/recv-inc-ooo.c:310:28: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/test/recv-inc-ooo.c:311:24: branch_true: ...to here
liburing-2.13/test/recv-inc-ooo.c:317:17: call_function: calling ‘write_all’ from ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:317:17: return_function: returning to ‘test_recv_incr’ from ‘write_all’
liburing-2.13/test/recv-inc-ooo.c:323:24: branch_true: following ‘true’ branch (when ‘remaining_chunk_len != 0’)...
liburing-2.13/test/recv-inc-ooo.c:325:31: branch_true: ...to here
liburing-2.13/test/recv-inc-ooo.c:325:31: call_function: calling ‘io_uring_wait_cqe’ from ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:325:31: return_function: returning to ‘test_recv_incr’ from ‘io_uring_wait_cqe’
liburing-2.13/test/recv-inc-ooo.c:326:28: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-inc-ooo.c:333:59: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:335:29: call_function: calling ‘process_completion’ from ‘test_recv_incr’
#  179|   			      uint8_t **current_expect)
#  180|   {
#  181|-> 	usleep(1);
#  182|   
#  183|   	if (cqe->res <= 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def436]
liburing-2.13/test/recv-inc-ooo.c:236:24: warning[-Wanalyzer-malloc-leak]: leak of ‘test_data’
liburing-2.13/test/recv-inc-ooo.c:253:12: enter_function: entry to ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:261:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/recv-inc-ooo.c:263:17: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:263:17: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/recv-inc-ooo.c:268:15: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:268:15: call_function: calling ‘setup_buf_ring’ from ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:268:15: return_function: returning to ‘test_recv_incr’ from ‘setup_buf_ring’
liburing-2.13/test/recv-inc-ooo.c:269:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-inc-ooo.c:271:17: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:271:17: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-inc-ooo.c:276:15: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:277:9: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-inc-ooo.c:279:13: branch_true: ...to here
liburing-2.13/test/recv-inc-ooo.c:285:36: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:285:36: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:296:30: acquire_memory: allocated here
liburing-2.13/test/recv-inc-ooo.c:297:25: branch_true: following ‘true’ branch (when ‘i != 2048’)...
liburing-2.13/test/recv-inc-ooo.c:298:26: branch_true: ...to here
liburing-2.13/test/recv-inc-ooo.c:297:25: branch_true: following ‘true’ branch (when ‘i != 2048’)...
liburing-2.13/test/recv-inc-ooo.c:298:26: branch_true: ...to here
liburing-2.13/test/recv-inc-ooo.c:310:28: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/test/recv-inc-ooo.c:311:24: branch_true: ...to here
liburing-2.13/test/recv-inc-ooo.c:317:17: call_function: calling ‘write_all’ from ‘test_recv_incr’
#  234|   		ssize_t sent;
#  235|   
#  236|-> 		sent = write(fd, buf + bytes_sent, size - bytes_sent);
#  237|   		assert(sent > 0);	/* Ensure write succeeded */
#  238|   		bytes_sent += sent;

Error: CPPCHECK_WARNING (CWE-476): [#def437]
liburing-2.13/test/recv-inc-ooo.c:298: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: test_data
#  296|   	uint8_t *test_data = malloc(total_bytes);
#  297|   	for (int i = 0; i < total_bytes; i++)
#  298|-> 		test_data[i] = i % 256;	/* Create repeating pattern */
#  299|   
#  300|   	/* Send data in chunks to test buffer boundary handling, intentionally misaligned with buffer size */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def438]
liburing-2.13/test/recv-inc-ooo.c:298:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘test_data’
liburing-2.13/test/recv-inc-ooo.c:253:12: enter_function: entry to ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:261:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/recv-inc-ooo.c:263:17: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:263:17: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/recv-inc-ooo.c:268:15: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:268:15: call_function: calling ‘setup_buf_ring’ from ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:268:15: return_function: returning to ‘test_recv_incr’ from ‘setup_buf_ring’
liburing-2.13/test/recv-inc-ooo.c:269:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-inc-ooo.c:271:17: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:271:17: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-inc-ooo.c:276:15: branch_false: ...to here
liburing-2.13/test/recv-inc-ooo.c:277:9: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-inc-ooo.c:279:13: branch_true: ...to here
liburing-2.13/test/recv-inc-ooo.c:285:36: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:285:36: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_recv_incr’
liburing-2.13/test/recv-inc-ooo.c:296:30: acquire_memory: this call could return NULL
liburing-2.13/test/recv-inc-ooo.c:297:25: branch_true: following ‘true’ branch (when ‘i != 2048’)...
liburing-2.13/test/recv-inc-ooo.c:298:26: branch_true: ...to here
liburing-2.13/test/recv-inc-ooo.c:298:17: danger: ‘test_data + (long unsigned int)i’ could be NULL: unchecked value from [(31)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/30)
#  296|   	uint8_t *test_data = malloc(total_bytes);
#  297|   	for (int i = 0; i < total_bytes; i++)
#  298|-> 		test_data[i] = i % 256;	/* Create repeating pattern */
#  299|   
#  300|   	/* Send data in chunks to test buffer boundary handling, intentionally misaligned with buffer size */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def439]
liburing-2.13/test/recv-msgall-stream.c:57:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/recv-msgall-stream.c:250:14: enter_function: entry to ‘recv_fn’
liburing-2.13/test/recv-msgall-stream.c:254:12: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-msgall-stream.c:255:45: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:255:45: call_function: calling ‘recv_sync’ from ‘recv_fn’
#   55|   	ret = listen(sockfd, 16);
#   56|   	if (ret < 0) {
#   57|-> 		perror("listen");
#   58|   		goto err;
#   59|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def440]
liburing-2.13/test/recv-msgall-stream.c:58:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/recv-msgall-stream.c:250:14: enter_function: entry to ‘recv_fn’
liburing-2.13/test/recv-msgall-stream.c:254:12: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-msgall-stream.c:255:45: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:255:45: call_function: calling ‘recv_sync’ from ‘recv_fn’
#   56|   	if (ret < 0) {
#   57|   		perror("listen");
#   58|-> 		goto err;
#   59|   	}
#   60|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def441]
liburing-2.13/test/recv-msgall-stream.c:63:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/recv-msgall-stream.c:250:14: enter_function: entry to ‘recv_fn’
liburing-2.13/test/recv-msgall-stream.c:254:12: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-msgall-stream.c:255:45: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:255:45: call_function: calling ‘recv_sync’ from ‘recv_fn’
#   61|   	pthread_mutex_unlock(&rd->mutex);
#   62|   
#   63|-> 	ret = accept(sockfd, NULL, NULL);
#   64|   	if (ret < 0) {
#   65|   		perror("accept");

Error: CPPCHECK_WARNING (CWE-476): [#def442]
liburing-2.13/test/recv-msgall-stream.c:278: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  276|   	buf = malloc(MAX_MSG * sizeof(int));
#  277|   	for (i = 0; i < MAX_MSG; i++)
#  278|-> 		buf[i] = i;
#  279|   
#  280|   	sockfd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, IPPROTO_TCP);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def443]
liburing-2.13/test/recv-msgall-stream.c:278:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
liburing-2.13/test/recv-msgall-stream.c:271:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-msgall-stream.c:276:15: branch_false: ...to here
liburing-2.13/test/recv-msgall-stream.c:276:15: acquire_memory: this call could return NULL
liburing-2.13/test/recv-msgall-stream.c:277:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall-stream.c:278:20: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:278:17: danger: ‘buf + (long unsigned int)i * 4’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  276|   	buf = malloc(MAX_MSG * sizeof(int));
#  277|   	for (i = 0; i < MAX_MSG; i++)
#  278|-> 		buf[i] = i;
#  279|   
#  280|   	sockfd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, IPPROTO_TCP);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def444]
liburing-2.13/test/recv-msgall-stream.c:282:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/recv-msgall-stream.c:271:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-msgall-stream.c:276:15: branch_false: ...to here
liburing-2.13/test/recv-msgall-stream.c:276:15: acquire_memory: allocated here
liburing-2.13/test/recv-msgall-stream.c:277:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall-stream.c:278:20: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:277:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall-stream.c:278:20: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:281:12: branch_true: following ‘true’ branch (when ‘sockfd < 0’)...
liburing-2.13/test/recv-msgall-stream.c:282:17: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:282:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/recv-msgall-stream.c:282:17: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  280|   	sockfd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, IPPROTO_TCP);
#  281|   	if (sockfd < 0) {
#  282|-> 		perror("socket");
#  283|   		return 1;
#  284|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def445]
liburing-2.13/test/recv-msgall-stream.c:293:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/recv-msgall-stream.c:271:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-msgall-stream.c:276:15: branch_false: ...to here
liburing-2.13/test/recv-msgall-stream.c:277:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall-stream.c:278:20: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:277:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall-stream.c:278:20: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:280:18: acquire_resource: socket created here
liburing-2.13/test/recv-msgall-stream.c:281:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-msgall-stream.c:286:9: branch_false: ...to here
liburing-2.13/test/recv-msgall-stream.c:287:9: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-msgall-stream.c:288:9: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:293:15: throw: if ‘connect’ throws an exception...
liburing-2.13/test/recv-msgall-stream.c:293:15: danger: ‘sockfd’ leaks here
#  291|   	inet_pton(AF_INET, "127.0.0.1", &saddr.sin_addr);
#  292|   
#  293|-> 	ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr));
#  294|   	if (ret < 0) {
#  295|   		perror("connect");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def446]
liburing-2.13/test/recv-msgall-stream.c:293:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/recv-msgall-stream.c:271:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-msgall-stream.c:276:15: branch_false: ...to here
liburing-2.13/test/recv-msgall-stream.c:276:15: acquire_memory: allocated here
liburing-2.13/test/recv-msgall-stream.c:277:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall-stream.c:278:20: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:277:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall-stream.c:278:20: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:281:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-msgall-stream.c:286:9: branch_false: ...to here
liburing-2.13/test/recv-msgall-stream.c:287:9: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-msgall-stream.c:288:9: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:293:15: throw: if ‘connect’ throws an exception...
liburing-2.13/test/recv-msgall-stream.c:293:15: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  291|   	inet_pton(AF_INET, "127.0.0.1", &saddr.sin_addr);
#  292|   
#  293|-> 	ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr));
#  294|   	if (ret < 0) {
#  295|   		perror("connect");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def447]
liburing-2.13/test/recv-msgall-stream.c:295:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/recv-msgall-stream.c:271:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-msgall-stream.c:276:15: branch_false: ...to here
liburing-2.13/test/recv-msgall-stream.c:276:15: acquire_memory: allocated here
liburing-2.13/test/recv-msgall-stream.c:277:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall-stream.c:278:20: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:277:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall-stream.c:278:20: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:281:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-msgall-stream.c:286:9: branch_false: ...to here
liburing-2.13/test/recv-msgall-stream.c:287:9: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-msgall-stream.c:288:9: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:294:12: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-msgall-stream.c:295:17: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:295:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/recv-msgall-stream.c:295:17: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  293|   	ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr));
#  294|   	if (ret < 0) {
#  295|-> 		perror("connect");
#  296|   		return 1;
#  297|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def448]
liburing-2.13/test/recv-msgall-stream.c:339:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/recv-msgall-stream.c:271:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-msgall-stream.c:276:15: branch_false: ...to here
liburing-2.13/test/recv-msgall-stream.c:276:15: acquire_memory: allocated here
liburing-2.13/test/recv-msgall-stream.c:277:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall-stream.c:278:20: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:277:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall-stream.c:278:20: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:281:12: branch_true: following ‘true’ branch (when ‘sockfd < 0’)...
liburing-2.13/test/recv-msgall-stream.c:282:17: branch_true: ...to here
liburing-2.13/test/recv-msgall-stream.c:339:1: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  337|   	free(buf);
#  338|   	return 1;
#  339|-> }
#  340|   
#  341|   static int test(int use_recvmsg, int use_sync)

Error: CPPCHECK_WARNING (CWE-476): [#def449]
liburing-2.13/test/recv-msgall.c:164: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  162|   	buf = malloc(MAX_MSG * sizeof(int));
#  163|   	for (i = 0; i < MAX_MSG; i++)
#  164|-> 		buf[i] = i;
#  165|   
#  166|   	memset(&saddr, 0, sizeof(saddr));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def450]
liburing-2.13/test/recv-msgall.c:164:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
liburing-2.13/test/recv-msgall.c:157:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-msgall.c:162:15: branch_false: ...to here
liburing-2.13/test/recv-msgall.c:162:15: acquire_memory: this call could return NULL
liburing-2.13/test/recv-msgall.c:163:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall.c:164:20: branch_true: ...to here
liburing-2.13/test/recv-msgall.c:164:17: danger: ‘buf + (long unsigned int)i * 4’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  162|   	buf = malloc(MAX_MSG * sizeof(int));
#  163|   	for (i = 0; i < MAX_MSG; i++)
#  164|-> 		buf[i] = i;
#  165|   
#  166|   	memset(&saddr, 0, sizeof(saddr));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def451]
liburing-2.13/test/recv-msgall.c:173:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/recv-msgall.c:157:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-msgall.c:162:15: branch_false: ...to here
liburing-2.13/test/recv-msgall.c:162:15: acquire_memory: allocated here
liburing-2.13/test/recv-msgall.c:163:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall.c:164:20: branch_true: ...to here
liburing-2.13/test/recv-msgall.c:163:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall.c:164:20: branch_true: ...to here
liburing-2.13/test/recv-msgall.c:172:12: branch_true: following ‘true’ branch (when ‘sockfd < 0’)...
liburing-2.13/test/recv-msgall.c:173:17: branch_true: ...to here
liburing-2.13/test/recv-msgall.c:173:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/recv-msgall.c:173:17: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  171|   	sockfd = socket(AF_INET, SOCK_DGRAM, 0);
#  172|   	if (sockfd < 0) {
#  173|-> 		perror("socket");
#  174|   		free(buf);
#  175|   		return 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def452]
liburing-2.13/test/recv-msgall.c:178:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/recv-msgall.c:157:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-msgall.c:162:15: branch_false: ...to here
liburing-2.13/test/recv-msgall.c:163:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall.c:164:20: branch_true: ...to here
liburing-2.13/test/recv-msgall.c:163:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall.c:164:20: branch_true: ...to here
liburing-2.13/test/recv-msgall.c:171:18: acquire_resource: datagram socket created here
liburing-2.13/test/recv-msgall.c:172:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-msgall.c:178:15: branch_false: ...to here
liburing-2.13/test/recv-msgall.c:178:15: throw: if ‘connect’ throws an exception...
liburing-2.13/test/recv-msgall.c:178:15: danger: ‘sockfd’ leaks here
#  176|   	}
#  177|   
#  178|-> 	ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr));
#  179|   	if (ret < 0) {
#  180|   		perror("connect");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def453]
liburing-2.13/test/recv-msgall.c:178:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/recv-msgall.c:157:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-msgall.c:162:15: branch_false: ...to here
liburing-2.13/test/recv-msgall.c:162:15: acquire_memory: allocated here
liburing-2.13/test/recv-msgall.c:163:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall.c:164:20: branch_true: ...to here
liburing-2.13/test/recv-msgall.c:163:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall.c:164:20: branch_true: ...to here
liburing-2.13/test/recv-msgall.c:172:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-msgall.c:178:15: branch_false: ...to here
liburing-2.13/test/recv-msgall.c:178:15: throw: if ‘connect’ throws an exception...
liburing-2.13/test/recv-msgall.c:178:15: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  176|   	}
#  177|   
#  178|-> 	ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr));
#  179|   	if (ret < 0) {
#  180|   		perror("connect");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def454]
liburing-2.13/test/recv-msgall.c:180:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/recv-msgall.c:157:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-msgall.c:162:15: branch_false: ...to here
liburing-2.13/test/recv-msgall.c:162:15: acquire_memory: allocated here
liburing-2.13/test/recv-msgall.c:163:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall.c:164:20: branch_true: ...to here
liburing-2.13/test/recv-msgall.c:163:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/recv-msgall.c:164:20: branch_true: ...to here
liburing-2.13/test/recv-msgall.c:172:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-msgall.c:178:15: branch_false: ...to here
liburing-2.13/test/recv-msgall.c:179:12: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-msgall.c:180:17: branch_true: ...to here
liburing-2.13/test/recv-msgall.c:180:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/recv-msgall.c:180:17: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  178|   	ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr));
#  179|   	if (ret < 0) {
#  180|-> 		perror("connect");
#  181|   		free(buf);
#  182|   		return 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def455]
liburing-2.13/test/recv-mshot-fair.c:109:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/recv-mshot-fair.c:92:18: acquire_resource: stream socket created here
liburing-2.13/test/recv-mshot-fair.c:93:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-mshot-fair.c:98:9: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:102:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/recv-mshot-fair.c:107:15: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:108:12: branch_true: following ‘true’ branch (when ‘ret < 0’)...
liburing-2.13/test/recv-mshot-fair.c:109:17: branch_true: ...to here
liburing-2.13/test/recv-mshot-fair.c:109:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/recv-mshot-fair.c:109:17: danger: ‘sockfd’ leaks here
#  107|   	ret = listen(sockfd, 1);
#  108|   	if (ret < 0) {
#  109|-> 		perror("listen");
#  110|   		goto err;
#  111|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def456]
liburing-2.13/test/recv-mshot-fair.c:116:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/recv-mshot-fair.c:92:18: acquire_resource: stream socket created here
liburing-2.13/test/recv-mshot-fair.c:93:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-mshot-fair.c:98:9: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:102:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/recv-mshot-fair.c:107:15: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:108:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/recv-mshot-fair.c:113:9: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:116:18: throw: if ‘accept’ throws an exception...
liburing-2.13/test/recv-mshot-fair.c:116:18: danger: ‘sockfd’ leaks here
#  114|   
#  115|   	socklen = sizeof(saddr);
#  116|-> 	use_fd = accept(sockfd, (struct sockaddr *)&saddr, &socklen);
#  117|   	if (use_fd < 0) {
#  118|   		perror("accept");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def457]
liburing-2.13/test/recv-mshot-fair.c:131:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/recv-mshot-fair.c:92:18: acquire_resource: stream socket created here
liburing-2.13/test/recv-mshot-fair.c:93:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-mshot-fair.c:98:9: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:102:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/recv-mshot-fair.c:107:15: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:108:12: branch_true: following ‘true’ branch (when ‘ret < 0’)...
liburing-2.13/test/recv-mshot-fair.c:109:17: branch_true: ...to here
liburing-2.13/test/recv-mshot-fair.c:131:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/recv-mshot-fair.c:131:9: danger: ‘sockfd’ leaks here
#  129|   	return 0;
#  130|   err:
#  131|-> 	close(sockfd);
#  132|   	return 1;
#  133|   }

Error: CPPCHECK_WARNING (CWE-476): [#def458]
liburing-2.13/test/recv-mshot-fair.c:344: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  342|   
#  343|   	buf = malloc(4096);
#  344|-> 	memset(buf, 0xa5, 4096);
#  345|   
#  346|   	saddr.sin_family = AF_INET;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def459]
liburing-2.13/test/recv-mshot-fair.c:344:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘buf’ where non-null expected
liburing-2.13/test/recv-mshot-fair.c:343:15: acquire_memory: this call could return NULL
liburing-2.13/test/recv-mshot-fair.c:344:9: danger: argument 1 (‘buf’) from [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#  342|   
#  343|   	buf = malloc(4096);
#  344|-> 	memset(buf, 0xa5, 4096);
#  345|   
#  346|   	saddr.sin_family = AF_INET;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def460]
liburing-2.13/test/recv-mshot-fair.c:352:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/recv-mshot-fair.c:343:15: acquire_memory: allocated here
liburing-2.13/test/recv-mshot-fair.c:351:12: branch_true: following ‘true’ branch (when ‘sockfd < 0’)...
liburing-2.13/test/recv-mshot-fair.c:352:17: branch_true: ...to here
liburing-2.13/test/recv-mshot-fair.c:352:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/recv-mshot-fair.c:352:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  350|   	sockfd = socket(AF_INET, SOCK_STREAM, 0);
#  351|   	if (sockfd < 0) {
#  352|-> 		perror("socket");
#  353|   		goto err2;
#  354|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def461]
liburing-2.13/test/recv-mshot-fair.c:358:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/recv-mshot-fair.c:350:18: acquire_resource: stream socket created here
liburing-2.13/test/recv-mshot-fair.c:351:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-mshot-fair.c:356:9: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:358:15: throw: if ‘connect’ throws an exception...
liburing-2.13/test/recv-mshot-fair.c:358:15: danger: ‘sockfd’ leaks here
#  356|   	pthread_barrier_wait(&rd->connect);
#  357|   
#  358|-> 	ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr));
#  359|   	if (ret < 0) {
#  360|   		perror("connect");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def462]
liburing-2.13/test/recv-mshot-fair.c:358:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/recv-mshot-fair.c:343:15: acquire_memory: allocated here
liburing-2.13/test/recv-mshot-fair.c:351:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-mshot-fair.c:356:9: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:358:15: throw: if ‘connect’ throws an exception...
liburing-2.13/test/recv-mshot-fair.c:358:15: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  356|   	pthread_barrier_wait(&rd->connect);
#  357|   
#  358|-> 	ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr));
#  359|   	if (ret < 0) {
#  360|   		perror("connect");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def463]
liburing-2.13/test/recv-mshot-fair.c:360:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/recv-mshot-fair.c:343:15: acquire_memory: allocated here
liburing-2.13/test/recv-mshot-fair.c:351:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-mshot-fair.c:356:9: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:359:12: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-mshot-fair.c:360:17: branch_true: ...to here
liburing-2.13/test/recv-mshot-fair.c:360:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/recv-mshot-fair.c:360:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  358|   	ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr));
#  359|   	if (ret < 0) {
#  360|-> 		perror("connect");
#  361|   		goto err;
#  362|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def464]
liburing-2.13/test/recv-mshot-fair.c:367:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/recv-mshot-fair.c:343:15: acquire_memory: allocated here
liburing-2.13/test/recv-mshot-fair.c:351:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-mshot-fair.c:356:9: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:359:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-mshot-fair.c:364:9: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:366:21: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-mshot-fair.c:367:23: branch_true: ...to here
liburing-2.13/test/recv-mshot-fair.c:367:23: throw: if ‘send’ throws an exception...
liburing-2.13/test/recv-mshot-fair.c:367:23: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  365|   
#  366|   	for (i = 0; i < rd->max_sends; i++) {
#  367|-> 		ret = send(sockfd, buf, 4096, 0);
#  368|   		if (ret < 0) {
#  369|   			perror("send");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def465]
liburing-2.13/test/recv-mshot-fair.c:369:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/recv-mshot-fair.c:343:15: acquire_memory: allocated here
liburing-2.13/test/recv-mshot-fair.c:351:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-mshot-fair.c:356:9: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:359:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-mshot-fair.c:364:9: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:366:21: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-mshot-fair.c:367:23: branch_true: ...to here
liburing-2.13/test/recv-mshot-fair.c:369:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/recv-mshot-fair.c:369:25: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  367|   		ret = send(sockfd, buf, 4096, 0);
#  368|   		if (ret < 0) {
#  369|-> 			perror("send");
#  370|   			return 1;
#  371|   		} else if (ret != 4096) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def466]
liburing-2.13/test/recv-mshot-fair.c:378:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/recv-mshot-fair.c:343:15: acquire_memory: allocated here
liburing-2.13/test/recv-mshot-fair.c:351:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-mshot-fair.c:356:9: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:359:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-mshot-fair.c:364:9: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:378:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/recv-mshot-fair.c:378:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  376|   
#  377|   	pthread_barrier_wait(&rd->barrier);
#  378|-> 	close(sockfd);
#  379|   	free(buf);
#  380|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def467]
liburing-2.13/test/recv-mshot-fair.c:382:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/recv-mshot-fair.c:343:15: acquire_memory: allocated here
liburing-2.13/test/recv-mshot-fair.c:351:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-mshot-fair.c:356:9: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:382:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/recv-mshot-fair.c:382:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
#  380|   	return 0;
#  381|   err:
#  382|-> 	close(sockfd);
#  383|   err2:
#  384|   	free(buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def468]
liburing-2.13/test/recv-mshot-fair.c:386:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/recv-mshot-fair.c:343:15: acquire_memory: allocated here
liburing-2.13/test/recv-mshot-fair.c:351:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/recv-mshot-fair.c:356:9: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:359:12: branch_false: following ‘false’ branch...
liburing-2.13/test/recv-mshot-fair.c:364:9: branch_false: ...to here
liburing-2.13/test/recv-mshot-fair.c:366:21: branch_true: following ‘true’ branch...
liburing-2.13/test/recv-mshot-fair.c:367:23: branch_true: ...to here
liburing-2.13/test/recv-mshot-fair.c:386:1: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  384|   	free(buf);
#  385|   	return 1;
#  386|-> }
#  387|   
#  388|   struct res {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def469]
liburing-2.13/test/recvsend_bundle-inc.c:438:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/recvsend_bundle-inc.c:631:12: enter_function: entry to ‘test_tcp’
liburing-2.13/test/recvsend_bundle-inc.c:635:15: call_function: calling ‘run_tests’ from ‘test_tcp’
#  436|   	pthread_barrier_wait(&rd->connect);
#  437|   
#  438|-> 	ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr));
#  439|   	if (ret < 0) {
#  440|   		perror("connect");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def470]
liburing-2.13/test/recvsend_bundle.c:500:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/recvsend_bundle.c:618:12: enter_function: entry to ‘run_tests’
liburing-2.13/test/recvsend_bundle.c:634:15: call_function: calling ‘test’ from ‘run_tests’
#  498|   	pthread_barrier_wait(&rd->connect);
#  499|   
#  500|-> 	ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr));
#  501|   	if (ret < 0) {
#  502|   		perror("connect");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def471]
liburing-2.13/test/regbuf-clone.c:34:14: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/regbuf-clone.c:31:15: acquire_memory: allocated here
liburing-2.13/test/regbuf-clone.c:34:14: throw: if ‘open’ throws an exception...
liburing-2.13/test/regbuf-clone.c:34:14: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   32|   
#   33|   	sprintf(fd_name, "/proc/self/fdinfo/%d", ring->ring_fd);
#   34|-> 	fd = open(fd_name, O_RDONLY);
#   35|   	if (fd < 0) {
#   36|   		perror("open");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def472]
liburing-2.13/test/regbuf-clone.c:36:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/regbuf-clone.c:31:15: acquire_memory: allocated here
liburing-2.13/test/regbuf-clone.c:35:12: branch_true: following ‘true’ branch...
liburing-2.13/test/regbuf-clone.c:36:17: branch_true: ...to here
liburing-2.13/test/regbuf-clone.c:36:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/regbuf-clone.c:36:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   34|   	fd = open(fd_name, O_RDONLY);
#   35|   	if (fd < 0) {
#   36|-> 		perror("open");
#   37|   		return;
#   38|   	}

Error: CPPCHECK_WARNING (CWE-401): [#def473]
liburing-2.13/test/regbuf-clone.c:37: error[memleak]: Memory leak: buf
#   35|   	if (fd < 0) {
#   36|   		perror("open");
#   37|-> 		return;
#   38|   	}
#   39|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def474]
liburing-2.13/test/regbuf-clone.c:44:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fd_name, 0)’
liburing-2.13/test/regbuf-clone.c:34:14: acquire_resource: opened here
liburing-2.13/test/regbuf-clone.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/test/regbuf-clone.c:35:12: branch_false: ...to here
liburing-2.13/test/regbuf-clone.c:44:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/regbuf-clone.c:44:25: danger: ‘open(&fd_name, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#   42|   
#   43|   		if (ret < 0) {
#   44|-> 			perror("fdinfo read");
#   45|   			break;
#   46|   		} else if (ret == 4096) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def475]
liburing-2.13/test/regbuf-clone.c:44:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/regbuf-clone.c:31:15: acquire_memory: allocated here
liburing-2.13/test/regbuf-clone.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/test/regbuf-clone.c:35:12: branch_false: ...to here
liburing-2.13/test/regbuf-clone.c:44:25: throw: if ‘perror’ throws an exception...
liburing-2.13/test/regbuf-clone.c:44:25: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#   42|   
#   43|   		if (ret < 0) {
#   44|-> 			perror("fdinfo read");
#   45|   			break;
#   46|   		} else if (ret == 4096) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def476]
liburing-2.13/test/regbuf-clone.c:52:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fd_name, 0)’
liburing-2.13/test/regbuf-clone.c:34:14: acquire_resource: opened here
liburing-2.13/test/regbuf-clone.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/test/regbuf-clone.c:35:12: branch_false: ...to here
liburing-2.13/test/regbuf-clone.c:52:9: danger: ‘open(&fd_name, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#   50|   	} while (1);
#   51|   
#   52|-> 	close(fd);
#   53|   	free(buf);
#   54|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def477]
liburing-2.13/test/regbuf-clone.c:52:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/regbuf-clone.c:31:15: acquire_memory: allocated here
liburing-2.13/test/regbuf-clone.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/test/regbuf-clone.c:35:12: branch_false: ...to here
liburing-2.13/test/regbuf-clone.c:52:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/regbuf-clone.c:52:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#   50|   	} while (1);
#   51|   
#   52|-> 	close(fd);
#   53|   	free(buf);
#   54|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def478]
liburing-2.13/test/regbuf-clone.c:54:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
liburing-2.13/test/regbuf-clone.c:31:15: acquire_memory: allocated here
liburing-2.13/test/regbuf-clone.c:35:12: branch_true: following ‘true’ branch...
liburing-2.13/test/regbuf-clone.c:36:17: branch_true: ...to here
liburing-2.13/test/regbuf-clone.c:54:1: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#   52|   	close(fd);
#   53|   	free(buf);
#   54|-> }
#   55|   
#   56|   static int use_buf(struct io_uring *ring, void *addr, int index)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def479]
liburing-2.13/test/register-restrictions.c:34:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:563:5: enter_function: entry to ‘main’
liburing-2.13/test/register-restrictions.c:567:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/register-restrictions.c:570:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:570:15: call_function: calling ‘test_restrictions_sqe_op’ from ‘main’
#   32|   	if (pipe(pipe1) != 0) {
#   33|   		perror("pipe");
#   34|-> 		return T_EXIT_FAIL;
#   35|   	}
#   36|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def480]
liburing-2.13/test/register-restrictions.c:34:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:563:5: enter_function: entry to ‘main’
liburing-2.13/test/register-restrictions.c:567:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/register-restrictions.c:570:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:570:15: call_function: calling ‘test_restrictions_sqe_op’ from ‘main’
#   32|   	if (pipe(pipe1) != 0) {
#   33|   		perror("pipe");
#   34|-> 		return T_EXIT_FAIL;
#   35|   	}
#   36|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def481]
liburing-2.13/test/register-restrictions.c:37:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:32:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:37:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:37:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/register-restrictions.c:37:15: danger: ‘pipe1[0]’ leaks here
#   35|   	}
#   36|   
#   37|-> 	ret = io_uring_queue_init(8, &ring, IORING_SETUP_R_DISABLED);
#   38|   	if (ret) {
#   39|   		if (ret == -EINVAL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def482]
liburing-2.13/test/register-restrictions.c:37:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:32:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:37:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:37:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/register-restrictions.c:37:15: danger: ‘pipe1[1]’ leaks here
#   35|   	}
#   36|   
#   37|-> 	ret = io_uring_queue_init(8, &ring, IORING_SETUP_R_DISABLED);
#   38|   	if (ret) {
#   39|   		if (ret == -EINVAL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def483]
liburing-2.13/test/register-restrictions.c:51:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:32:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:37:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:38:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:45:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:51:15: throw: if ‘io_uring_register_restrictions’ throws an exception...
liburing-2.13/test/register-restrictions.c:51:15: danger: ‘pipe1[0]’ leaks here
#   49|   	res[1].sqe_op = IORING_OP_WRITE;
#   50|   
#   51|-> 	ret = io_uring_register_restrictions(&ring, res, 2);
#   52|   	if (ret) {
#   53|   		if (ret == -EINVAL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def484]
liburing-2.13/test/register-restrictions.c:51:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:32:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:37:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:38:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:45:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:51:15: throw: if ‘io_uring_register_restrictions’ throws an exception...
liburing-2.13/test/register-restrictions.c:51:15: danger: ‘pipe1[1]’ leaks here
#   49|   	res[1].sqe_op = IORING_OP_WRITE;
#   50|   
#   51|-> 	ret = io_uring_register_restrictions(&ring, res, 2);
#   52|   	if (ret) {
#   53|   		if (ret == -EINVAL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def485]
liburing-2.13/test/register-restrictions.c:60:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:32:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:37:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:38:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:45:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:52:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:60:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:60:15: throw: if ‘io_uring_enable_rings’ throws an exception...
liburing-2.13/test/register-restrictions.c:60:15: danger: ‘pipe1[0]’ leaks here
#   58|   	}
#   59|   
#   60|-> 	ret = io_uring_enable_rings(&ring);
#   61|   	if (ret) {
#   62|   		fprintf(stderr, "ring enabling failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def486]
liburing-2.13/test/register-restrictions.c:60:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:32:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:37:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:38:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:45:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:52:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:60:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:60:15: throw: if ‘io_uring_enable_rings’ throws an exception...
liburing-2.13/test/register-restrictions.c:60:15: danger: ‘pipe1[1]’ leaks here
#   58|   	}
#   59|   
#   60|-> 	ret = io_uring_enable_rings(&ring);
#   61|   	if (ret) {
#   62|   		fprintf(stderr, "ring enabling failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def487]
liburing-2.13/test/register-restrictions.c:123:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:121:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:126:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:123:24: danger: ‘pipe1[0]’ leaks here
#  121|   	if (pipe(pipe1) != 0) {
#  122|   		perror("pipe");
#  123|-> 		return T_EXIT_FAIL;
#  124|   	}
#  125|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def488]
liburing-2.13/test/register-restrictions.c:123:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:121:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:126:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:123:24: danger: ‘pipe1[1]’ leaks here
#  121|   	if (pipe(pipe1) != 0) {
#  122|   		perror("pipe");
#  123|-> 		return T_EXIT_FAIL;
#  124|   	}
#  125|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def489]
liburing-2.13/test/register-restrictions.c:126:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:121:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:126:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:126:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/register-restrictions.c:126:15: danger: ‘pipe1[0]’ leaks here
#  124|   	}
#  125|   
#  126|-> 	ret = io_uring_queue_init(8, &ring, IORING_SETUP_R_DISABLED);
#  127|   	if (ret) {
#  128|   		fprintf(stderr, "ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def490]
liburing-2.13/test/register-restrictions.c:126:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:121:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:126:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:126:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/register-restrictions.c:126:15: danger: ‘pipe1[1]’ leaks here
#  124|   	}
#  125|   
#  126|-> 	ret = io_uring_queue_init(8, &ring, IORING_SETUP_R_DISABLED);
#  127|   	if (ret) {
#  128|   		fprintf(stderr, "ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def491]
liburing-2.13/test/register-restrictions.c:135:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:121:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:126:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:127:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:132:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:135:15: throw: if ‘io_uring_register_restrictions’ throws an exception...
liburing-2.13/test/register-restrictions.c:135:15: danger: ‘pipe1[0]’ leaks here
#  133|   	res[0].register_op = IORING_REGISTER_BUFFERS;
#  134|   
#  135|-> 	ret = io_uring_register_restrictions(&ring, res, 1);
#  136|   	if (ret) {
#  137|   		if (ret == -EINVAL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def492]
liburing-2.13/test/register-restrictions.c:135:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:121:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:126:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:127:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:132:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:135:15: throw: if ‘io_uring_register_restrictions’ throws an exception...
liburing-2.13/test/register-restrictions.c:135:15: danger: ‘pipe1[1]’ leaks here
#  133|   	res[0].register_op = IORING_REGISTER_BUFFERS;
#  134|   
#  135|-> 	ret = io_uring_register_restrictions(&ring, res, 1);
#  136|   	if (ret) {
#  137|   		if (ret == -EINVAL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def493]
liburing-2.13/test/register-restrictions.c:144:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:121:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:126:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:127:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:132:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:136:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:144:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:144:15: throw: if ‘io_uring_enable_rings’ throws an exception...
liburing-2.13/test/register-restrictions.c:144:15: danger: ‘pipe1[0]’ leaks here
#  142|   	}
#  143|   
#  144|-> 	ret = io_uring_enable_rings(&ring);
#  145|   	if (ret) {
#  146|   		fprintf(stderr, "ring enabling failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def494]
liburing-2.13/test/register-restrictions.c:144:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:121:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:126:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:127:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:132:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:136:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:144:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:144:15: throw: if ‘io_uring_enable_rings’ throws an exception...
liburing-2.13/test/register-restrictions.c:144:15: danger: ‘pipe1[1]’ leaks here
#  142|   	}
#  143|   
#  144|-> 	ret = io_uring_enable_rings(&ring);
#  145|   	if (ret) {
#  146|   		fprintf(stderr, "ring enabling failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def495]
liburing-2.13/test/register-restrictions.c:150:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:121:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:126:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:127:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:132:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:136:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:144:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:145:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:150:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:150:15: throw: if ‘io_uring_register_buffers’ throws an exception...
liburing-2.13/test/register-restrictions.c:150:15: danger: ‘pipe1[0]’ leaks here
#  148|   	}
#  149|   
#  150|-> 	ret = io_uring_register_buffers(&ring, &vec, 1);
#  151|   	if (ret) {
#  152|   		fprintf(stderr, "io_uring_register_buffers failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def496]
liburing-2.13/test/register-restrictions.c:150:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:121:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:126:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:127:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:132:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:136:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:144:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:145:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:150:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:150:15: throw: if ‘io_uring_register_buffers’ throws an exception...
liburing-2.13/test/register-restrictions.c:150:15: danger: ‘pipe1[1]’ leaks here
#  148|   	}
#  149|   
#  150|-> 	ret = io_uring_register_buffers(&ring, &vec, 1);
#  151|   	if (ret) {
#  152|   		fprintf(stderr, "io_uring_register_buffers failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def497]
liburing-2.13/test/register-restrictions.c:156:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:121:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:126:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:127:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:132:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:136:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:144:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:145:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:150:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:151:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:156:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:156:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/register-restrictions.c:156:15: danger: ‘pipe1[0]’ leaks here
#  154|   	}
#  155|   
#  156|-> 	ret = io_uring_register_files(&ring, pipe1, 2);
#  157|   	if (ret != -EACCES) {
#  158|   		fprintf(stderr, "io_uring_register_files ret: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def498]
liburing-2.13/test/register-restrictions.c:156:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:121:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:126:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:127:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:132:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:136:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:144:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:145:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:150:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:151:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:156:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:156:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/register-restrictions.c:156:15: danger: ‘pipe1[1]’ leaks here
#  154|   	}
#  155|   
#  156|-> 	ret = io_uring_register_files(&ring, pipe1, 2);
#  157|   	if (ret != -EACCES) {
#  158|   		fprintf(stderr, "io_uring_register_files ret: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def499]
liburing-2.13/test/register-restrictions.c:182:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:180:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:185:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:182:24: danger: ‘pipe1[0]’ leaks here
#  180|   	if (pipe(pipe1) != 0) {
#  181|   		perror("pipe");
#  182|-> 		return T_EXIT_FAIL;
#  183|   	}
#  184|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def500]
liburing-2.13/test/register-restrictions.c:182:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:180:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:185:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:182:24: danger: ‘pipe1[1]’ leaks here
#  180|   	if (pipe(pipe1) != 0) {
#  181|   		perror("pipe");
#  182|-> 		return T_EXIT_FAIL;
#  183|   	}
#  184|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def501]
liburing-2.13/test/register-restrictions.c:185:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:180:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:185:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:185:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/register-restrictions.c:185:15: danger: ‘pipe1[0]’ leaks here
#  183|   	}
#  184|   
#  185|-> 	ret = io_uring_queue_init(8, &ring, IORING_SETUP_R_DISABLED);
#  186|   	if (ret) {
#  187|   		fprintf(stderr, "ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def502]
liburing-2.13/test/register-restrictions.c:185:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:180:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:185:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:185:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/register-restrictions.c:185:15: danger: ‘pipe1[1]’ leaks here
#  183|   	}
#  184|   
#  185|-> 	ret = io_uring_queue_init(8, &ring, IORING_SETUP_R_DISABLED);
#  186|   	if (ret) {
#  187|   		fprintf(stderr, "ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def503]
liburing-2.13/test/register-restrictions.c:203:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:180:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:185:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:186:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:191:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:203:15: throw: if ‘io_uring_register_restrictions’ throws an exception...
liburing-2.13/test/register-restrictions.c:203:15: danger: ‘pipe1[0]’ leaks here
#  201|   	res[3].register_op = IORING_REGISTER_FILES;
#  202|   
#  203|-> 	ret = io_uring_register_restrictions(&ring, res, 4);
#  204|   	if (ret) {
#  205|   		if (ret == -EINVAL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def504]
liburing-2.13/test/register-restrictions.c:203:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:180:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:185:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:186:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:191:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:203:15: throw: if ‘io_uring_register_restrictions’ throws an exception...
liburing-2.13/test/register-restrictions.c:203:15: danger: ‘pipe1[1]’ leaks here
#  201|   	res[3].register_op = IORING_REGISTER_FILES;
#  202|   
#  203|-> 	ret = io_uring_register_restrictions(&ring, res, 4);
#  204|   	if (ret) {
#  205|   		if (ret == -EINVAL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def505]
liburing-2.13/test/register-restrictions.c:212:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:180:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:185:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:186:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:191:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:204:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:212:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:212:15: throw: if ‘io_uring_enable_rings’ throws an exception...
liburing-2.13/test/register-restrictions.c:212:15: danger: ‘pipe1[0]’ leaks here
#  210|   	}
#  211|   
#  212|-> 	ret = io_uring_enable_rings(&ring);
#  213|   	if (ret) {
#  214|   		fprintf(stderr, "ring enabling failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def506]
liburing-2.13/test/register-restrictions.c:212:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:180:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:185:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:186:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:191:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:204:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:212:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:212:15: throw: if ‘io_uring_enable_rings’ throws an exception...
liburing-2.13/test/register-restrictions.c:212:15: danger: ‘pipe1[1]’ leaks here
#  210|   	}
#  211|   
#  212|-> 	ret = io_uring_enable_rings(&ring);
#  213|   	if (ret) {
#  214|   		fprintf(stderr, "ring enabling failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def507]
liburing-2.13/test/register-restrictions.c:218:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:180:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:185:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:186:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:191:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:204:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:212:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:213:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:218:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:218:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/register-restrictions.c:218:15: danger: ‘pipe1[0]’ leaks here
#  216|   	}
#  217|   
#  218|-> 	ret = io_uring_register_files(&ring, pipe1, 2);
#  219|   	if (ret) {
#  220|   		fprintf(stderr, "io_uring_register_files ret: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def508]
liburing-2.13/test/register-restrictions.c:218:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:180:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:185:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:186:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:191:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:204:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:212:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:213:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:218:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:218:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/register-restrictions.c:218:15: danger: ‘pipe1[1]’ leaks here
#  216|   	}
#  217|   
#  218|-> 	ret = io_uring_register_files(&ring, pipe1, 2);
#  219|   	if (ret) {
#  220|   		fprintf(stderr, "io_uring_register_files ret: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def509]
liburing-2.13/test/register-restrictions.c:295:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:293:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:298:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:295:24: danger: ‘pipe1[0]’ leaks here
#  293|   	if (pipe(pipe1) != 0) {
#  294|   		perror("pipe");
#  295|-> 		return T_EXIT_FAIL;
#  296|   	}
#  297|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def510]
liburing-2.13/test/register-restrictions.c:295:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:293:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:298:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:295:24: danger: ‘pipe1[1]’ leaks here
#  293|   	if (pipe(pipe1) != 0) {
#  294|   		perror("pipe");
#  295|-> 		return T_EXIT_FAIL;
#  296|   	}
#  297|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def511]
liburing-2.13/test/register-restrictions.c:298:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:293:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:298:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:298:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/register-restrictions.c:298:15: danger: ‘pipe1[0]’ leaks here
#  296|   	}
#  297|   
#  298|-> 	ret = io_uring_queue_init(8, &ring, IORING_SETUP_R_DISABLED);
#  299|   	if (ret) {
#  300|   		fprintf(stderr, "ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def512]
liburing-2.13/test/register-restrictions.c:298:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:293:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:298:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:298:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/register-restrictions.c:298:15: danger: ‘pipe1[1]’ leaks here
#  296|   	}
#  297|   
#  298|-> 	ret = io_uring_queue_init(8, &ring, IORING_SETUP_R_DISABLED);
#  299|   	if (ret) {
#  300|   		fprintf(stderr, "ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def513]
liburing-2.13/test/register-restrictions.c:313:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:293:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:298:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:299:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:304:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:313:15: throw: if ‘io_uring_register_restrictions’ throws an exception...
liburing-2.13/test/register-restrictions.c:313:15: danger: ‘pipe1[0]’ leaks here
#  311|   	res[2].sqe_flags = IOSQE_FIXED_FILE;
#  312|   
#  313|-> 	ret = io_uring_register_restrictions(&ring, res, 3);
#  314|   	if (ret) {
#  315|   		if (ret == -EINVAL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def514]
liburing-2.13/test/register-restrictions.c:313:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:293:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:298:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:299:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:304:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:313:15: throw: if ‘io_uring_register_restrictions’ throws an exception...
liburing-2.13/test/register-restrictions.c:313:15: danger: ‘pipe1[1]’ leaks here
#  311|   	res[2].sqe_flags = IOSQE_FIXED_FILE;
#  312|   
#  313|-> 	ret = io_uring_register_restrictions(&ring, res, 3);
#  314|   	if (ret) {
#  315|   		if (ret == -EINVAL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def515]
liburing-2.13/test/register-restrictions.c:322:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:293:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:298:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:299:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:304:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:314:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:322:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:322:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/register-restrictions.c:322:15: danger: ‘pipe1[0]’ leaks here
#  320|   	}
#  321|   
#  322|-> 	ret = io_uring_register_files(&ring, pipe1, 2);
#  323|   	if (ret) {
#  324|   		fprintf(stderr, "io_uring_register_files ret: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def516]
liburing-2.13/test/register-restrictions.c:322:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:293:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:298:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:299:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:304:9: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:314:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:322:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:322:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/register-restrictions.c:322:15: danger: ‘pipe1[1]’ leaks here
#  320|   	}
#  321|   
#  322|-> 	ret = io_uring_register_files(&ring, pipe1, 2);
#  323|   	if (ret) {
#  324|   		fprintf(stderr, "io_uring_register_files ret: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def517]
liburing-2.13/test/register-restrictions.c:450:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:448:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:453:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:450:24: danger: ‘pipe1[0]’ leaks here
#  448|   	if (pipe(pipe1) != 0) {
#  449|   		perror("pipe");
#  450|-> 		return T_EXIT_FAIL;
#  451|   	}
#  452|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def518]
liburing-2.13/test/register-restrictions.c:450:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:448:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:453:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:450:24: danger: ‘pipe1[1]’ leaks here
#  448|   	if (pipe(pipe1) != 0) {
#  449|   		perror("pipe");
#  450|-> 		return T_EXIT_FAIL;
#  451|   	}
#  452|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def519]
liburing-2.13/test/register-restrictions.c:453:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:448:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:453:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:453:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/register-restrictions.c:453:15: danger: ‘pipe1[0]’ leaks here
#  451|   	}
#  452|   
#  453|-> 	ret = io_uring_queue_init(8, &ring, IORING_SETUP_R_DISABLED);
#  454|   	if (ret) {
#  455|   		fprintf(stderr, "ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def520]
liburing-2.13/test/register-restrictions.c:453:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:448:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:453:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:453:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/register-restrictions.c:453:15: danger: ‘pipe1[1]’ leaks here
#  451|   	}
#  452|   
#  453|-> 	ret = io_uring_queue_init(8, &ring, IORING_SETUP_R_DISABLED);
#  454|   	if (ret) {
#  455|   		fprintf(stderr, "ring setup failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def521]
liburing-2.13/test/register-restrictions.c:459:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:448:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:453:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:454:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:459:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:459:15: throw: if ‘io_uring_register_restrictions’ throws an exception...
liburing-2.13/test/register-restrictions.c:459:15: danger: ‘pipe1[0]’ leaks here
#  457|   	}
#  458|   
#  459|-> 	ret = io_uring_register_restrictions(&ring, res, 0);
#  460|   	if (ret) {
#  461|   		if (ret == -EINVAL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def522]
liburing-2.13/test/register-restrictions.c:459:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:448:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:453:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:454:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:459:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:459:15: throw: if ‘io_uring_register_restrictions’ throws an exception...
liburing-2.13/test/register-restrictions.c:459:15: danger: ‘pipe1[1]’ leaks here
#  457|   	}
#  458|   
#  459|-> 	ret = io_uring_register_restrictions(&ring, res, 0);
#  460|   	if (ret) {
#  461|   		if (ret == -EINVAL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def523]
liburing-2.13/test/register-restrictions.c:468:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:448:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:453:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:454:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:459:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:460:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:468:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:468:15: throw: if ‘io_uring_enable_rings’ throws an exception...
liburing-2.13/test/register-restrictions.c:468:15: danger: ‘pipe1[0]’ leaks here
#  466|   	}
#  467|   
#  468|-> 	ret = io_uring_enable_rings(&ring);
#  469|   	if (ret) {
#  470|   		fprintf(stderr, "ring enabling failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def524]
liburing-2.13/test/register-restrictions.c:468:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:448:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:453:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:454:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:459:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:460:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:468:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:468:15: throw: if ‘io_uring_enable_rings’ throws an exception...
liburing-2.13/test/register-restrictions.c:468:15: danger: ‘pipe1[1]’ leaks here
#  466|   	}
#  467|   
#  468|-> 	ret = io_uring_enable_rings(&ring);
#  469|   	if (ret) {
#  470|   		fprintf(stderr, "ring enabling failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def525]
liburing-2.13/test/register-restrictions.c:474:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:448:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:453:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:454:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:459:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:460:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:468:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:469:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:474:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:474:15: throw: if ‘io_uring_register_buffers’ throws an exception...
liburing-2.13/test/register-restrictions.c:474:15: danger: ‘pipe1[0]’ leaks here
#  472|   	}
#  473|   
#  474|-> 	ret = io_uring_register_buffers(&ring, &vec, 1);
#  475|   	if (ret != -EACCES) {
#  476|   		fprintf(stderr, "io_uring_register_buffers ret: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def526]
liburing-2.13/test/register-restrictions.c:474:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:448:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:453:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:454:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:459:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:460:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:468:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:469:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:474:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:474:15: throw: if ‘io_uring_register_buffers’ throws an exception...
liburing-2.13/test/register-restrictions.c:474:15: danger: ‘pipe1[1]’ leaks here
#  472|   	}
#  473|   
#  474|-> 	ret = io_uring_register_buffers(&ring, &vec, 1);
#  475|   	if (ret != -EACCES) {
#  476|   		fprintf(stderr, "io_uring_register_buffers ret: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def527]
liburing-2.13/test/register-restrictions.c:480:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/register-restrictions.c:448:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:453:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:454:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:459:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:460:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:468:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:469:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:474:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:475:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:480:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:480:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/register-restrictions.c:480:15: danger: ‘pipe1[0]’ leaks here
#  478|   	}
#  479|   
#  480|-> 	ret = io_uring_register_files(&ring, pipe1, 2);
#  481|   	if (ret != -EACCES) {
#  482|   		fprintf(stderr, "io_uring_register_files ret: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def528]
liburing-2.13/test/register-restrictions.c:480:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/register-restrictions.c:448:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:453:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:454:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:459:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:460:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:468:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:469:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:474:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:475:12: branch_false: following ‘false’ branch...
liburing-2.13/test/register-restrictions.c:480:15: branch_false: ...to here
liburing-2.13/test/register-restrictions.c:480:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/register-restrictions.c:480:15: danger: ‘pipe1[1]’ leaks here
#  478|   	}
#  479|   
#  480|-> 	ret = io_uring_register_files(&ring, pipe1, 2);
#  481|   	if (ret != -EACCES) {
#  482|   		fprintf(stderr, "io_uring_register_files ret: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def529]
liburing-2.13/test/ring-leak.c:73:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/ring-leak.c:156:12: enter_function: entry to ‘test_scm_cycles’
liburing-2.13/test/ring-leak.c:163:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:167:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:168:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:172:13: branch_false: ...to here
liburing-2.13/test/ring-leak.c:172:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:176:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:176:15: call_function: calling ‘send_fd’ from ‘test_scm_cycles’
#   71|   	msg.msg_controllen = CMSG_SPACE(sizeof(fd));
#   72|   
#   73|-> 	if (sendmsg(socket, &msg, 0) < 0) {
#   74|   		if (errno == EINVAL)
#   75|   			return T_EXIT_SKIP;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def530]
liburing-2.13/test/ring-leak.c:73:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/ring-leak.c:156:12: enter_function: entry to ‘test_scm_cycles’
liburing-2.13/test/ring-leak.c:163:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:167:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:168:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:172:13: branch_false: ...to here
liburing-2.13/test/ring-leak.c:172:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:176:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:176:15: call_function: calling ‘send_fd’ from ‘test_scm_cycles’
#   71|   	msg.msg_controllen = CMSG_SPACE(sizeof(fd));
#   72|   
#   73|-> 	if (sendmsg(socket, &msg, 0) < 0) {
#   74|   		if (errno == EINVAL)
#   75|   			return T_EXIT_SKIP;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def531]
liburing-2.13/test/ring-leak.c:76:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/ring-leak.c:156:12: enter_function: entry to ‘test_scm_cycles’
liburing-2.13/test/ring-leak.c:163:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:167:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:168:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:172:13: branch_false: ...to here
liburing-2.13/test/ring-leak.c:172:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:176:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:176:15: call_function: calling ‘send_fd’ from ‘test_scm_cycles’
#   74|   		if (errno == EINVAL)
#   75|   			return T_EXIT_SKIP;
#   76|-> 		perror("sendmsg");
#   77|   		return T_EXIT_FAIL;
#   78|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def532]
liburing-2.13/test/ring-leak.c:76:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/ring-leak.c:156:12: enter_function: entry to ‘test_scm_cycles’
liburing-2.13/test/ring-leak.c:163:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:167:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:168:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:172:13: branch_false: ...to here
liburing-2.13/test/ring-leak.c:172:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:176:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:176:15: call_function: calling ‘send_fd’ from ‘test_scm_cycles’
#   74|   		if (errno == EINVAL)
#   75|   			return T_EXIT_SKIP;
#   76|-> 		perror("sendmsg");
#   77|   		return T_EXIT_FAIL;
#   78|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def533]
liburing-2.13/test/ring-leak.c:99:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/ring-leak.c:91:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:95:13: branch_false: ...to here
liburing-2.13/test/ring-leak.c:95:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:99:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:99:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/ring-leak.c:99:15: danger: ‘fds[0]’ leaks here
#   97|   		return -1;
#   98|   	}
#   99|-> 	ret = io_uring_register_files(&ring, fds, 2);
#  100|   	if (ret) {
#  101|   		fprintf(stderr, "file_register: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def534]
liburing-2.13/test/ring-leak.c:99:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/ring-leak.c:91:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:95:13: branch_false: ...to here
liburing-2.13/test/ring-leak.c:95:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:99:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:99:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/ring-leak.c:99:15: danger: ‘fds[1]’ leaks here
#   97|   		return -1;
#   98|   	}
#   99|-> 	ret = io_uring_register_files(&ring, fds, 2);
#  100|   	if (ret) {
#  101|   		fprintf(stderr, "file_register: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def535]
liburing-2.13/test/ring-leak.c:153:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
liburing-2.13/test/ring-leak.c:149:14: acquire_resource: datagram socket created here
liburing-2.13/test/ring-leak.c:150:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
liburing-2.13/test/ring-leak.c:153:17: branch_false: ...to here
liburing-2.13/test/ring-leak.c:153:17: throw: if ‘close’ throws an exception...
liburing-2.13/test/ring-leak.c:153:17: danger: ‘fd’ leaks here
#  151|   		perror("socket dgram");
#  152|   	else
#  153|-> 		close(fd);
#  154|   }
#  155|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def536]
liburing-2.13/test/ring-leak.c:165:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/ring-leak.c:163:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:167:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:168:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:172:13: branch_false: ...to here
liburing-2.13/test/ring-leak.c:172:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:176:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:165:24: danger: ‘fds[0]’ leaks here
#  163|   	if (socketpair(AF_UNIX, SOCK_DGRAM, 0, sp) != 0) {
#  164|   		perror("Failed to create Unix-domain socket pair\n");
#  165|-> 		return 1;
#  166|   	}
#  167|   	ret = io_uring_queue_init(8, &ring, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def537]
liburing-2.13/test/ring-leak.c:165:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/ring-leak.c:163:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:167:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:168:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:172:13: branch_false: ...to here
liburing-2.13/test/ring-leak.c:172:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:176:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:165:24: danger: ‘fds[1]’ leaks here
#  163|   	if (socketpair(AF_UNIX, SOCK_DGRAM, 0, sp) != 0) {
#  164|   		perror("Failed to create Unix-domain socket pair\n");
#  165|-> 		return 1;
#  166|   	}
#  167|   	ret = io_uring_queue_init(8, &ring, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def538]
liburing-2.13/test/ring-leak.c:184:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/ring-leak.c:163:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:167:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:168:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:172:13: branch_false: ...to here
liburing-2.13/test/ring-leak.c:172:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:176:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:177:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:181:12: branch_false: ...to here
liburing-2.13/test/ring-leak.c:181:12: branch_true: following ‘true’ branch (when ‘update != 0’)...
liburing-2.13/test/ring-leak.c:181:12: branch_true: ...to here
liburing-2.13/test/ring-leak.c:182:29: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/test/ring-leak.c:183:25: branch_true: ...to here
liburing-2.13/test/ring-leak.c:184:23: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/ring-leak.c:184:23: danger: ‘fds[0]’ leaks here
#  182|   		for (i = 0; i < 4; i++)
#  183|   			reg_fds[i] = -1;
#  184|-> 		ret = io_uring_register_files(&ring, reg_fds, 4);
#  185|   		if (ret) {
#  186|   			fprintf(stderr, "file_register: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def539]
liburing-2.13/test/ring-leak.c:184:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/ring-leak.c:163:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:167:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:168:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:172:13: branch_false: ...to here
liburing-2.13/test/ring-leak.c:172:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:176:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:177:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:181:12: branch_false: ...to here
liburing-2.13/test/ring-leak.c:181:12: branch_true: following ‘true’ branch (when ‘update != 0’)...
liburing-2.13/test/ring-leak.c:181:12: branch_true: ...to here
liburing-2.13/test/ring-leak.c:182:29: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/test/ring-leak.c:183:25: branch_true: ...to here
liburing-2.13/test/ring-leak.c:184:23: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/ring-leak.c:184:23: danger: ‘fds[1]’ leaks here
#  182|   		for (i = 0; i < 4; i++)
#  183|   			reg_fds[i] = -1;
#  184|-> 		ret = io_uring_register_files(&ring, reg_fds, 4);
#  185|   		if (ret) {
#  186|   			fprintf(stderr, "file_register: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def540]
liburing-2.13/test/ring-leak.c:196:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/ring-leak.c:163:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:167:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:168:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:172:13: branch_false: ...to here
liburing-2.13/test/ring-leak.c:172:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:176:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:177:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:181:12: branch_false: ...to here
liburing-2.13/test/ring-leak.c:182:29: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/test/ring-leak.c:183:25: branch_true: ...to here
liburing-2.13/test/ring-leak.c:185:20: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:191:22: branch_false: ...to here
liburing-2.13/test/ring-leak.c:195:12: branch_true: following ‘true’ branch (when ‘update != 0’)...
liburing-2.13/test/ring-leak.c:196:23: branch_true: ...to here
liburing-2.13/test/ring-leak.c:196:23: throw: if ‘io_uring_register_files_update’ throws an exception...
liburing-2.13/test/ring-leak.c:196:23: danger: ‘fds[0]’ leaks here
#  194|   	reg_fds[3] = sp[1];
#  195|   	if (update) {
#  196|-> 		ret = io_uring_register_files_update(&ring, 0, reg_fds, 4);
#  197|   		if (ret != 4) {
#  198|   			fprintf(stderr, "file_register: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def541]
liburing-2.13/test/ring-leak.c:196:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/ring-leak.c:163:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:167:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:168:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:172:13: branch_false: ...to here
liburing-2.13/test/ring-leak.c:172:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:176:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:177:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:181:12: branch_false: ...to here
liburing-2.13/test/ring-leak.c:182:29: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/test/ring-leak.c:183:25: branch_true: ...to here
liburing-2.13/test/ring-leak.c:185:20: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:191:22: branch_false: ...to here
liburing-2.13/test/ring-leak.c:195:12: branch_true: following ‘true’ branch (when ‘update != 0’)...
liburing-2.13/test/ring-leak.c:196:23: branch_true: ...to here
liburing-2.13/test/ring-leak.c:196:23: throw: if ‘io_uring_register_files_update’ throws an exception...
liburing-2.13/test/ring-leak.c:196:23: danger: ‘fds[1]’ leaks here
#  194|   	reg_fds[3] = sp[1];
#  195|   	if (update) {
#  196|-> 		ret = io_uring_register_files_update(&ring, 0, reg_fds, 4);
#  197|   		if (ret != 4) {
#  198|   			fprintf(stderr, "file_register: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def542]
liburing-2.13/test/ring-leak.c:202:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘reg_fds[0]’
liburing-2.13/test/ring-leak.c:163:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:167:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:168:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:172:13: branch_false: ...to here
liburing-2.13/test/ring-leak.c:172:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:176:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:177:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:181:12: branch_false: ...to here
liburing-2.13/test/ring-leak.c:195:12: branch_false: following ‘false’ branch (when ‘update == 0’)...
liburing-2.13/test/ring-leak.c:202:23: branch_false: ...to here
liburing-2.13/test/ring-leak.c:202:23: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/ring-leak.c:202:23: danger: ‘reg_fds[0]’ leaks here
#  200|   		}
#  201|   	} else {
#  202|-> 		ret = io_uring_register_files(&ring, reg_fds, 4);
#  203|   		if (ret) {
#  204|   			fprintf(stderr, "file_register: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def543]
liburing-2.13/test/ring-leak.c:202:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘reg_fds[1]’
liburing-2.13/test/ring-leak.c:163:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:167:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:168:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:172:13: branch_false: ...to here
liburing-2.13/test/ring-leak.c:172:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:176:15: branch_false: ...to here
liburing-2.13/test/ring-leak.c:177:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak.c:181:12: branch_false: ...to here
liburing-2.13/test/ring-leak.c:195:12: branch_false: following ‘false’ branch (when ‘update == 0’)...
liburing-2.13/test/ring-leak.c:202:23: branch_false: ...to here
liburing-2.13/test/ring-leak.c:202:23: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/ring-leak.c:202:23: danger: ‘reg_fds[1]’ leaks here
#  200|   		}
#  201|   	} else {
#  202|-> 		ret = io_uring_register_files(&ring, reg_fds, 4);
#  203|   		if (ret) {
#  204|   			fprintf(stderr, "file_register: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def544]
liburing-2.13/test/ring-leak2.c:54:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock_listen_fd’
liburing-2.13/test/ring-leak2.c:92:14: enter_function: entry to ‘server_thread’
liburing-2.13/test/ring-leak2.c:100:26: acquire_resource: socket created here
liburing-2.13/test/ring-leak2.c:111:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak2.c:115:13: branch_false: ...to here
liburing-2.13/test/ring-leak2.c:115:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak2.c:120:9: branch_false: ...to here
liburing-2.13/test/ring-leak2.c:120:9: call_function: calling ‘setup_io_uring’ from ‘server_thread’
#   52|   	int ret;
#   53|   
#   54|-> 	ret = io_uring_queue_init_params(8, ring, &p);
#   55|   	if (ret) {
#   56|   		fprintf(stderr, "Unable to setup io_uring: %s\n",

Error: GCC_ANALYZER_WARNING: [#def545]
liburing-2.13/test/ring-leak2.c:115:13: warning[-Wanalyzer-fd-use-without-check]: ‘listen’ on possibly invalid file descriptor ‘sock_listen_fd’
liburing-2.13/test/ring-leak2.c:111:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak2.c:115:13: branch_false: ...to here
liburing-2.13/test/ring-leak2.c:115:13: danger: ‘sock_listen_fd’ could be invalid
#  113|   		exit(1);
#  114|   	}
#  115|-> 	if (listen(sock_listen_fd, 1) < 0) {
#  116|   		perror("Error listening on socket...\n");
#  117|   		exit(1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def546]
liburing-2.13/test/ring-leak2.c:116:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock_listen_fd’
liburing-2.13/test/ring-leak2.c:100:26: acquire_resource: socket created here
liburing-2.13/test/ring-leak2.c:111:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ring-leak2.c:115:13: branch_false: ...to here
liburing-2.13/test/ring-leak2.c:115:12: branch_true: following ‘true’ branch...
liburing-2.13/test/ring-leak2.c:116:17: branch_true: ...to here
liburing-2.13/test/ring-leak2.c:116:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/ring-leak2.c:116:17: danger: ‘sock_listen_fd’ leaks here
#  114|   	}
#  115|   	if (listen(sock_listen_fd, 1) < 0) {
#  116|-> 		perror("Error listening on socket...\n");
#  117|   		exit(1);
#  118|   	}

Error: CPPCHECK_WARNING (CWE-457): [#def547]
liburing-2.13/test/ring-query.c:42: error[uninitvar]: Uninitialized variable: &op
#   40|   	struct io_uring_query_hdr hdr = {
#   41|   		.query_op = IO_URING_QUERY_OPCODES,
#   42|-> 		.query_data = uring_ptr_to_u64(&op),
#   43|   		.size = sizeof(op),
#   44|   	};

Error: CPPCHECK_WARNING (CWE-457): [#def548]
liburing-2.13/test/ring-query.c:82: error[uninitvar]: Uninitialized variable: &op
#   80|   	struct io_uring_query_hdr invalid_hdr = {
#   81|   		.query_op = -1U,
#   82|-> 		.query_data = uring_ptr_to_u64(&op),
#   83|   		.size = sizeof(struct io_uring_query_opcode),
#   84|   	};

Error: CPPCHECK_WARNING (CWE-457): [#def549]
liburing-2.13/test/ring-query.c:125: error[uninitvar]: Uninitialized variable: &op3
#  123|   	struct io_uring_query_hdr hdr3 = {
#  124|   		.query_op = IO_URING_QUERY_OPCODES,
#  125|-> 		.query_data = uring_ptr_to_u64(&op3),
#  126|   		.size = sizeof(struct io_uring_query_opcode),
#  127|   	};

Error: CPPCHECK_WARNING (CWE-457): [#def550]
liburing-2.13/test/ring-query.c:130: error[uninitvar]: Uninitialized variable: &op2
#  128|   	struct io_uring_query_hdr hdr2 = {
#  129|   		.query_op = IO_URING_QUERY_OPCODES,
#  130|-> 		.query_data = uring_ptr_to_u64(&op2),
#  131|   		.size = sizeof(struct io_uring_query_opcode),
#  132|   		.next_entry = uring_ptr_to_u64(&hdr3),

Error: CPPCHECK_WARNING (CWE-457): [#def551]
liburing-2.13/test/ring-query.c:136: error[uninitvar]: Uninitialized variable: &op1
#  134|   	struct io_uring_query_hdr hdr1 = {
#  135|   		.query_op = IO_URING_QUERY_OPCODES,
#  136|-> 		.query_data = uring_ptr_to_u64(&op1),
#  137|   		.size = sizeof(struct io_uring_query_opcode),
#  138|   		.next_entry = uring_ptr_to_u64(&hdr2),

Error: CPPCHECK_WARNING (CWE-457): [#def552]
liburing-2.13/test/ring-query.c:169: error[uninitvar]: Uninitialized variable: &op2
#  167|   	struct io_uring_query_hdr hdr2 = {
#  168|   		.query_op = IO_URING_QUERY_OPCODES,
#  169|-> 		.query_data = uring_ptr_to_u64(&op2),
#  170|   		.size = sizeof(struct io_uring_query_opcode),
#  171|   	};

Error: CPPCHECK_WARNING (CWE-457): [#def553]
liburing-2.13/test/ring-query.c:174: error[uninitvar]: Uninitialized variable: &op1
#  172|   	struct io_uring_query_hdr hdr1 = {
#  173|   		.query_op = IO_URING_QUERY_OPCODES,
#  174|-> 		.query_data = uring_ptr_to_u64(&op1),
#  175|   		.size = sizeof(struct io_uring_query_opcode),
#  176|   	};

Error: CPPCHECK_WARNING (CWE-457): [#def554]
liburing-2.13/test/ring-query.c:207: error[uninitvar]: Uninitialized variable: &op
#  205|   	struct io_uring_query_hdr hdr = {
#  206|   		.query_op = IO_URING_QUERY_OPCODES,
#  207|-> 		.query_data = uring_ptr_to_u64(&op),
#  208|   		.size = sizeof(op),
#  209|   	};

Error: CPPCHECK_WARNING (CWE-457): [#def555]
liburing-2.13/test/ring-query.c:240: error[uninitvar]: Uninitialized variable: &op
#  238|   	struct io_uring_query_hdr hdr = {
#  239|   		.query_op = IO_URING_QUERY_OPCODES,
#  240|-> 		.query_data = uring_ptr_to_u64(&op),
#  241|   		.size = sizeof(op),
#  242|   	};

Error: GCC_ANALYZER_WARNING (CWE-401): [#def556]
liburing-2.13/test/ringbuf-loop.c:66:15: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
liburing-2.13/test/ringbuf-loop.c:23:5: enter_function: entry to ‘main’
liburing-2.13/test/ringbuf-loop.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/ringbuf-loop.c:34:15: branch_false: ...to here
liburing-2.13/test/ringbuf-loop.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:42:14: branch_false: ...to here
liburing-2.13/test/ringbuf-loop.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:54:9: call_function: inlined call to ‘io_uring_buf_ring_add’ from ‘main’
liburing-2.13/test/ringbuf-loop.c:57:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:65:20: branch_false: ...to here
liburing-2.13/test/ringbuf-loop.c:65:20: acquire_memory: allocated here
liburing-2.13/test/ringbuf-loop.c:66:15: throw: if ‘send’ throws an exception...
liburing-2.13/test/ringbuf-loop.c:66:15: danger: ‘send_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
#   64|   	 */
#   65|   	send_buf = calloc(1, 32);
#   66|-> 	ret = send(fds[0], send_buf, 32, MSG_DONTWAIT);
#   67|   	if (ret < 0) {
#   68|   		perror("send");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def557]
liburing-2.13/test/ringbuf-loop.c:68:17: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
liburing-2.13/test/ringbuf-loop.c:23:5: enter_function: entry to ‘main’
liburing-2.13/test/ringbuf-loop.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/ringbuf-loop.c:34:15: branch_false: ...to here
liburing-2.13/test/ringbuf-loop.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:42:14: branch_false: ...to here
liburing-2.13/test/ringbuf-loop.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:54:9: call_function: inlined call to ‘io_uring_buf_ring_add’ from ‘main’
liburing-2.13/test/ringbuf-loop.c:57:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:65:20: branch_false: ...to here
liburing-2.13/test/ringbuf-loop.c:65:20: acquire_memory: allocated here
liburing-2.13/test/ringbuf-loop.c:67:12: branch_true: following ‘true’ branch...
liburing-2.13/test/ringbuf-loop.c:68:17: branch_true: ...to here
liburing-2.13/test/ringbuf-loop.c:68:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/ringbuf-loop.c:68:17: danger: ‘send_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#   66|   	ret = send(fds[0], send_buf, 32, MSG_DONTWAIT);
#   67|   	if (ret < 0) {
#   68|-> 		perror("send");
#   69|   		return T_EXIT_FAIL;
#   70|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def558]
liburing-2.13/test/ringbuf-loop.c:81:9: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
liburing-2.13/test/ringbuf-loop.c:23:5: enter_function: entry to ‘main’
liburing-2.13/test/ringbuf-loop.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/ringbuf-loop.c:34:15: branch_false: ...to here
liburing-2.13/test/ringbuf-loop.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:42:14: branch_false: ...to here
liburing-2.13/test/ringbuf-loop.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:54:9: call_function: inlined call to ‘io_uring_buf_ring_add’ from ‘main’
liburing-2.13/test/ringbuf-loop.c:57:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:65:20: branch_false: ...to here
liburing-2.13/test/ringbuf-loop.c:65:20: acquire_memory: allocated here
liburing-2.13/test/ringbuf-loop.c:67:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:77:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/ringbuf-loop.c:77:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/ringbuf-loop.c:81:9: throw: if ‘io_uring_submit_and_wait’ throws an exception...
liburing-2.13/test/ringbuf-loop.c:81:9: danger: ‘send_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
#   79|   	sqe->flags |= IOSQE_BUFFER_SELECT;
#   80|   	sqe->buf_index = BGID;
#   81|-> 	io_uring_submit_and_wait(&ring, 1);
#   82|   
#   83|   	io_uring_free_buf_ring(&ring, br, RENTRIES, BGID);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def559]
liburing-2.13/test/ringbuf-loop.c:83:9: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
liburing-2.13/test/ringbuf-loop.c:23:5: enter_function: entry to ‘main’
liburing-2.13/test/ringbuf-loop.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/ringbuf-loop.c:34:15: branch_false: ...to here
liburing-2.13/test/ringbuf-loop.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:42:14: branch_false: ...to here
liburing-2.13/test/ringbuf-loop.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:54:9: call_function: inlined call to ‘io_uring_buf_ring_add’ from ‘main’
liburing-2.13/test/ringbuf-loop.c:57:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:65:20: branch_false: ...to here
liburing-2.13/test/ringbuf-loop.c:65:20: acquire_memory: allocated here
liburing-2.13/test/ringbuf-loop.c:67:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:77:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/ringbuf-loop.c:77:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/ringbuf-loop.c:83:9: throw: if ‘io_uring_free_buf_ring’ throws an exception...
liburing-2.13/test/ringbuf-loop.c:83:9: danger: ‘send_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
#   81|   	io_uring_submit_and_wait(&ring, 1);
#   82|   
#   83|-> 	io_uring_free_buf_ring(&ring, br, RENTRIES, BGID);
#   84|   	io_uring_queue_exit(&ring);
#   85|   	free(send_buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def560]
liburing-2.13/test/ringbuf-loop.c:84:9: warning[-Wanalyzer-malloc-leak]: leak of ‘send_buf’
liburing-2.13/test/ringbuf-loop.c:23:5: enter_function: entry to ‘main’
liburing-2.13/test/ringbuf-loop.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/ringbuf-loop.c:34:15: branch_false: ...to here
liburing-2.13/test/ringbuf-loop.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:42:14: branch_false: ...to here
liburing-2.13/test/ringbuf-loop.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:54:9: call_function: inlined call to ‘io_uring_buf_ring_add’ from ‘main’
liburing-2.13/test/ringbuf-loop.c:57:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:65:20: branch_false: ...to here
liburing-2.13/test/ringbuf-loop.c:65:20: acquire_memory: allocated here
liburing-2.13/test/ringbuf-loop.c:67:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-loop.c:77:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/ringbuf-loop.c:77:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’
liburing-2.13/test/ringbuf-loop.c:84:9: throw: if ‘io_uring_queue_exit’ throws an exception...
liburing-2.13/test/ringbuf-loop.c:84:9: danger: ‘send_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/10)
#   82|   
#   83|   	io_uring_free_buf_ring(&ring, br, RENTRIES, BGID);
#   84|-> 	io_uring_queue_exit(&ring);
#   85|   	free(send_buf);
#   86|   	return T_EXIT_PASS;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def561]
liburing-2.13/test/ringbuf-read.c:156:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fname, 1)’
liburing-2.13/test/ringbuf-read.c:148:14: acquire_resource: opened here
liburing-2.13/test/ringbuf-read.c:149:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-read.c:149:12: branch_false: ...to here
liburing-2.13/test/ringbuf-read.c:155:21: branch_true: following ‘true’ branch (when ‘i != 128’)...
liburing-2.13/test/ringbuf-read.c:156:17: branch_true: ...to here
liburing-2.13/test/ringbuf-read.c:157:23: throw: if ‘write’ throws an exception...
liburing-2.13/test/ringbuf-read.c:156:17: danger: ‘open(&fname, 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  154|   	}
#  155|   	for (i = 0; i < NR_BUFS; i++) {
#  156|-> 		memset(buf, i + 1, BUF_SIZE);
#  157|   		ret = write(fd, buf, BUF_SIZE);
#  158|   		if (ret != BUF_SIZE) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def562]
liburing-2.13/test/ringbuf-status.c:97:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/ringbuf-status.c:95:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-status.c:100:13: branch_false: ...to here
liburing-2.13/test/ringbuf-status.c:100:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-status.c:105:13: branch_false: ...to here
liburing-2.13/test/ringbuf-status.c:97:24: danger: ‘fds[0]’ leaks here
#   95|   	if (ret) {
#   96|   		fprintf(stderr, "ring setup failed: %d\n", ret);
#   97|-> 		return 1;
#   98|   	}
#   99|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def563]
liburing-2.13/test/ringbuf-status.c:97:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/ringbuf-status.c:95:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-status.c:100:13: branch_false: ...to here
liburing-2.13/test/ringbuf-status.c:100:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-status.c:105:13: branch_false: ...to here
liburing-2.13/test/ringbuf-status.c:97:24: danger: ‘fds[1]’ leaks here
#   95|   	if (ret) {
#   96|   		fprintf(stderr, "ring setup failed: %d\n", ret);
#   97|-> 		return 1;
#   98|   	}
#   99|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def564]
liburing-2.13/test/ringbuf-status.c:108:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/ringbuf-status.c:95:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-status.c:100:13: branch_false: ...to here
liburing-2.13/test/ringbuf-status.c:100:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-status.c:105:13: branch_false: ...to here
liburing-2.13/test/ringbuf-status.c:105:13: branch_true: following ‘true’ branch...
liburing-2.13/test/ringbuf-status.c:105:13: branch_true: ...to here
liburing-2.13/test/ringbuf-status.c:108:14: throw: if ‘io_uring_setup_buf_ring’ throws an exception...
liburing-2.13/test/ringbuf-status.c:108:14: danger: ‘fds[0]’ leaks here
#  106|   		return 1;
#  107|   
#  108|-> 	br = io_uring_setup_buf_ring(&ring, NR_BUFS, BGID, 0, &ret);
#  109|   	if (!br) {
#  110|   		if (ret == -EINVAL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def565]
liburing-2.13/test/ringbuf-status.c:108:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/ringbuf-status.c:95:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-status.c:100:13: branch_false: ...to here
liburing-2.13/test/ringbuf-status.c:100:12: branch_false: following ‘false’ branch...
liburing-2.13/test/ringbuf-status.c:105:13: branch_false: ...to here
liburing-2.13/test/ringbuf-status.c:105:13: branch_true: following ‘true’ branch...
liburing-2.13/test/ringbuf-status.c:105:13: branch_true: ...to here
liburing-2.13/test/ringbuf-status.c:108:14: throw: if ‘io_uring_setup_buf_ring’ throws an exception...
liburing-2.13/test/ringbuf-status.c:108:14: danger: ‘fds[1]’ leaks here
#  106|   		return 1;
#  107|   
#  108|-> 	br = io_uring_setup_buf_ring(&ring, NR_BUFS, BGID, 0, &ret);
#  109|   	if (!br) {
#  110|   		if (ret == -EINVAL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def566]
liburing-2.13/test/ringbuf-status.c:108:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[invalid]’
liburing-2.13/test/ringbuf-status.c:221:5: enter_function: entry to ‘main’
liburing-2.13/test/ringbuf-status.c:225:15: call_function: calling ‘test’ from ‘main’
#  106|   		return 1;
#  107|   
#  108|-> 	br = io_uring_setup_buf_ring(&ring, NR_BUFS, BGID, 0, &ret);
#  109|   	if (!br) {
#  110|   		if (ret == -EINVAL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def567]
liburing-2.13/test/rsrc_tags.c:54:16: warning[-Wanalyzer-malloc-leak]: leak of ‘tags’
liburing-2.13/test/rsrc_tags.c:315:12: enter_function: entry to ‘test_files’
liburing-2.13/test/rsrc_tags.c:324:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/rsrc_tags.c:325:28: branch_true: ...to here
liburing-2.13/test/rsrc_tags.c:329:15: call_function: calling ‘test_tags_generic’ from ‘test_files’
#   52|   		reg_type = IORING_REGISTER_BUFFERS2;
#   53|   
#   54|-> 	return __sys_io_uring_register(ring->ring_fd, reg_type, &reg,
#   55|   				       sizeof(reg));
#   56|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def568]
liburing-2.13/test/rsrc_tags.c:108:15: warning[-Wanalyzer-malloc-leak]: leak of ‘tags’
liburing-2.13/test/rsrc_tags.c:315:12: enter_function: entry to ‘test_files’
liburing-2.13/test/rsrc_tags.c:324:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/rsrc_tags.c:325:28: branch_true: ...to here
liburing-2.13/test/rsrc_tags.c:329:15: call_function: calling ‘test_tags_generic’ from ‘test_files’
#  106|   	for (i = 0; i < nr; i++)
#  107|   		tags[i] = i + 1;
#  108|-> 	ret = io_uring_queue_init(1, &ring, 0);
#  109|   	if (ret) {
#  110|   		printf("ring setup failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def569]
liburing-2.13/test/rsrc_tags.c:145:1: warning[-Wanalyzer-malloc-leak]: leak of ‘tags’
liburing-2.13/test/rsrc_tags.c:315:12: enter_function: entry to ‘test_files’
liburing-2.13/test/rsrc_tags.c:324:21: branch_true: following ‘true’ branch (when ‘i != 50’)...
liburing-2.13/test/rsrc_tags.c:325:28: branch_true: ...to here
liburing-2.13/test/rsrc_tags.c:329:15: call_function: calling ‘test_tags_generic’ from ‘test_files’
#  143|   	io_uring_queue_exit(&ring);
#  144|   	return 0;
#  145|-> }
#  146|   
#  147|   static int test_buffers_update(void)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def570]
liburing-2.13/test/rw_merge_test.c:37:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/rw_merge_test.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/rw_merge_test.c:34:15: branch_false: ...to here
liburing-2.13/test/rw_merge_test.c:35:9: branch_true: following ‘true’ branch (when ‘ret == 0’)...
liburing-2.13/test/rw_merge_test.c:37:14: branch_true: ...to here
liburing-2.13/test/rw_merge_test.c:37:14: throw: if ‘open’ throws an exception...
liburing-2.13/test/rw_merge_test.c:37:14: danger: ‘pipe1[0]’ leaks here
#   35|   	assert(!ret);
#   36|   
#   37|-> 	fd = open("testfile", O_RDWR | O_CREAT, 0644);
#   38|   	assert(fd >= 0);
#   39|   	unlink("testfile");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def571]
liburing-2.13/test/rw_merge_test.c:37:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/rw_merge_test.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/rw_merge_test.c:34:15: branch_false: ...to here
liburing-2.13/test/rw_merge_test.c:35:9: branch_true: following ‘true’ branch (when ‘ret == 0’)...
liburing-2.13/test/rw_merge_test.c:37:14: branch_true: ...to here
liburing-2.13/test/rw_merge_test.c:37:14: throw: if ‘open’ throws an exception...
liburing-2.13/test/rw_merge_test.c:37:14: danger: ‘pipe1[1]’ leaks here
#   35|   	assert(!ret);
#   36|   
#   37|-> 	fd = open("testfile", O_RDWR | O_CREAT, 0644);
#   38|   	assert(fd >= 0);
#   39|   	unlink("testfile");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def572]
liburing-2.13/test/rw_merge_test.c:43:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/rw_merge_test.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/rw_merge_test.c:34:15: branch_false: ...to here
liburing-2.13/test/rw_merge_test.c:35:9: branch_true: following ‘true’ branch (when ‘ret == 0’)...
liburing-2.13/test/rw_merge_test.c:37:14: branch_true: ...to here
liburing-2.13/test/rw_merge_test.c:38:9: branch_true: following ‘true’ branch...
liburing-2.13/test/rw_merge_test.c:39:9: branch_true: ...to here
liburing-2.13/test/rw_merge_test.c:41:9: branch_true: following ‘true’ branch (when ‘ret == 0’)...
liburing-2.13/test/rw_merge_test.c:43:15: branch_true: ...to here
liburing-2.13/test/rw_merge_test.c:43:15: throw: if ‘t_create_ring’ throws an exception...
liburing-2.13/test/rw_merge_test.c:43:15: danger: ‘pipe1[0]’ leaks here
#   41|   	assert(!ret);
#   42|   
#   43|-> 	ret = t_create_ring(4, &ring, 0);
#   44|   	if (ret == T_SETUP_SKIP)
#   45|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def573]
liburing-2.13/test/rw_merge_test.c:43:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/rw_merge_test.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/rw_merge_test.c:34:15: branch_false: ...to here
liburing-2.13/test/rw_merge_test.c:35:9: branch_true: following ‘true’ branch (when ‘ret == 0’)...
liburing-2.13/test/rw_merge_test.c:37:14: branch_true: ...to here
liburing-2.13/test/rw_merge_test.c:38:9: branch_true: following ‘true’ branch...
liburing-2.13/test/rw_merge_test.c:39:9: branch_true: ...to here
liburing-2.13/test/rw_merge_test.c:41:9: branch_true: following ‘true’ branch (when ‘ret == 0’)...
liburing-2.13/test/rw_merge_test.c:43:15: branch_true: ...to here
liburing-2.13/test/rw_merge_test.c:43:15: throw: if ‘t_create_ring’ throws an exception...
liburing-2.13/test/rw_merge_test.c:43:15: danger: ‘pipe1[1]’ leaks here
#   41|   	assert(!ret);
#   42|   
#   43|-> 	ret = t_create_ring(4, &ring, 0);
#   44|   	if (ret == T_SETUP_SKIP)
#   45|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def574]
liburing-2.13/test/send_recv.c:218:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/send_recv.c:202:12: branch_false: following ‘false’ branch...
liburing-2.13/test/send_recv.c:207:9: branch_false: ...to here
liburing-2.13/test/send_recv.c:212:18: acquire_resource: datagram socket created here
liburing-2.13/test/send_recv.c:213:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/send_recv.c:218:15: branch_false: ...to here
liburing-2.13/test/send_recv.c:218:15: throw: if ‘connect’ throws an exception...
liburing-2.13/test/send_recv.c:218:15: danger: ‘sockfd’ leaks here
#  216|   	}
#  217|   
#  218|-> 	ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr));
#  219|   	if (ret < 0) {
#  220|   		perror("connect");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def575]
liburing-2.13/test/send_recvmsg.c:288:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/send_recvmsg.c:266:12: branch_false: following ‘false’ branch...
liburing-2.13/test/send_recvmsg.c:271:9: branch_false: ...to here
liburing-2.13/test/send_recvmsg.c:282:18: acquire_resource: datagram socket created here
liburing-2.13/test/send_recvmsg.c:283:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/send_recvmsg.c:288:9: branch_false: ...to here
liburing-2.13/test/send_recvmsg.c:288:9: throw: if ‘usleep’ throws an exception...
liburing-2.13/test/send_recvmsg.c:288:9: danger: ‘sockfd’ leaks here
#  286|   	}
#  287|   
#  288|-> 	usleep(10000);
#  289|   
#  290|   	sqe = io_uring_get_sqe(&ring);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def576]
liburing-2.13/test/sendmsg_iov_clean.c:49:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/sendmsg_iov_clean.c:43:18: acquire_resource: stream socket created here
liburing-2.13/test/sendmsg_iov_clean.c:44:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/sendmsg_iov_clean.c:49:15: branch_false: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:49:15: throw: if ‘connect’ throws an exception...
liburing-2.13/test/sendmsg_iov_clean.c:49:15: danger: ‘sockfd’ leaks here
#   47|   	}
#   48|   
#   49|-> 	ret = connect(sockfd, (struct sockaddr *) &saddr, sizeof(saddr));
#   50|   	if (ret < 0) {
#   51|   		perror("connect");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def577]
liburing-2.13/test/sendmsg_iov_clean.c:153:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/sendmsg_iov_clean.c:126:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/sendmsg_iov_clean.c:129:9: branch_false: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:134:18: acquire_resource: stream socket created here
liburing-2.13/test/sendmsg_iov_clean.c:135:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/sendmsg_iov_clean.c:140:9: branch_false: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:145:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/sendmsg_iov_clean.c:151:15: branch_false: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:152:12: branch_true: following ‘true’ branch (when ‘ret < 0’)...
liburing-2.13/test/sendmsg_iov_clean.c:153:17: branch_true: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:153:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/sendmsg_iov_clean.c:153:17: danger: ‘sockfd’ leaks here
#  151|   	ret = listen(sockfd, 1);
#  152|   	if (ret < 0) {
#  153|-> 		perror("listen");
#  154|   		close(sockfd);
#  155|   		return T_EXIT_FAIL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def578]
liburing-2.13/test/sendmsg_iov_clean.c:154:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/sendmsg_iov_clean.c:126:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/sendmsg_iov_clean.c:129:9: branch_false: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:134:18: acquire_resource: stream socket created here
liburing-2.13/test/sendmsg_iov_clean.c:135:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/sendmsg_iov_clean.c:140:9: branch_false: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:145:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/sendmsg_iov_clean.c:151:15: branch_false: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:152:12: branch_true: following ‘true’ branch (when ‘ret < 0’)...
liburing-2.13/test/sendmsg_iov_clean.c:153:17: branch_true: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:154:17: throw: if ‘close’ throws an exception...
liburing-2.13/test/sendmsg_iov_clean.c:154:17: danger: ‘sockfd’ leaks here
#  152|   	if (ret < 0) {
#  153|   		perror("listen");
#  154|-> 		close(sockfd);
#  155|   		return T_EXIT_FAIL;
#  156|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def579]
liburing-2.13/test/sendmsg_iov_clean.c:158:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/sendmsg_iov_clean.c:126:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/sendmsg_iov_clean.c:129:9: branch_false: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:134:18: acquire_resource: stream socket created here
liburing-2.13/test/sendmsg_iov_clean.c:135:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/sendmsg_iov_clean.c:140:9: branch_false: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:145:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/sendmsg_iov_clean.c:151:15: branch_false: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:152:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/sendmsg_iov_clean.c:158:15: branch_false: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:158:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/sendmsg_iov_clean.c:158:15: danger: ‘sockfd’ leaks here
#  156|   	}
#  157|   
#  158|-> 	ret = io_uring_queue_init(INFLIGHT, &ring, IORING_SETUP_SINGLE_ISSUER |
#  159|   					    IORING_SETUP_DEFER_TASKRUN);
#  160|   	if (ret == -EINVAL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def580]
liburing-2.13/test/sendmsg_iov_clean.c:161:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/sendmsg_iov_clean.c:126:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/sendmsg_iov_clean.c:129:9: branch_false: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:134:18: acquire_resource: stream socket created here
liburing-2.13/test/sendmsg_iov_clean.c:135:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/sendmsg_iov_clean.c:140:9: branch_false: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:145:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/sendmsg_iov_clean.c:151:15: branch_false: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:152:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/sendmsg_iov_clean.c:158:15: branch_false: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:160:12: branch_true: following ‘true’ branch...
liburing-2.13/test/sendmsg_iov_clean.c:161:17: branch_true: ...to here
liburing-2.13/test/sendmsg_iov_clean.c:161:17: throw: if ‘close’ throws an exception...
liburing-2.13/test/sendmsg_iov_clean.c:161:17: danger: ‘sockfd’ leaks here
#  159|   					    IORING_SETUP_DEFER_TASKRUN);
#  160|   	if (ret == -EINVAL) {
#  161|-> 		close(sockfd);
#  162|   		return T_EXIT_SKIP;
#  163|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def581]
liburing-2.13/test/short-read.c:43:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(".short-read", 0)’
liburing-2.13/test/short-read.c:26:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/short-read.c:29:24: branch_false: ...to here
liburing-2.13/test/short-read.c:34:14: acquire_resource: opened here
liburing-2.13/test/short-read.c:38:12: branch_false: following ‘false’ branch...
liburing-2.13/test/short-read.c:43:15: branch_false: ...to here
liburing-2.13/test/short-read.c:43:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/short-read.c:43:15: danger: ‘open(".short-read", 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   41|   	}
#   42|   
#   43|-> 	ret = io_uring_queue_init(32, &ring, 0);
#   44|   	if (ret) {
#   45|   		fprintf(stderr, "queue init failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def582]
liburing-2.13/test/short-read.c:44:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(".short-read", 0)’
liburing-2.13/test/short-read.c:26:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/short-read.c:29:24: branch_false: ...to here
liburing-2.13/test/short-read.c:34:14: acquire_resource: opened here
liburing-2.13/test/short-read.c:38:12: branch_false: following ‘false’ branch...
liburing-2.13/test/short-read.c:43:15: branch_false: ...to here
liburing-2.13/test/short-read.c:44:12: danger: ‘open(".short-read", 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#   42|   
#   43|   	ret = io_uring_queue_init(32, &ring, 0);
#   44|-> 	if (ret) {
#   45|   		fprintf(stderr, "queue init failed: %d\n", ret);
#   46|   		return ret;

Error: GCC_ANALYZER_WARNING: [#def583]
liburing-2.13/test/shutdown.c:52:15: warning[-Wanalyzer-fd-use-without-check]: ‘listen’ on possibly invalid file descriptor ‘recv_s0’
liburing-2.13/test/shutdown.c:35:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/shutdown.c:38:15: branch_false: ...to here
liburing-2.13/test/shutdown.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:44:15: branch_true: ...to here
liburing-2.13/test/shutdown.c:45:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:47:9: branch_true: ...to here
liburing-2.13/test/shutdown.c:51:9: branch_true: following ‘true’ branch...
liburing-2.13/test/shutdown.c:52:15: branch_true: ...to here
liburing-2.13/test/shutdown.c:52:15: danger: ‘recv_s0’ could be invalid
#   50|   	ret = t_bind_ephemeral_port(recv_s0, &addr);
#   51|   	assert(!ret);
#   52|-> 	ret = listen(recv_s0, 128);
#   53|   	assert(ret != -1);
#   54|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def584]
liburing-2.13/test/shutdown.c:61:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/shutdown.c:35:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/shutdown.c:38:15: branch_false: ...to here
liburing-2.13/test/shutdown.c:40:19: acquire_resource: socket created here
liburing-2.13/test/shutdown.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:44:15: branch_true: ...to here
liburing-2.13/test/shutdown.c:45:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:47:9: branch_true: ...to here
liburing-2.13/test/shutdown.c:51:9: branch_true: following ‘true’ branch...
liburing-2.13/test/shutdown.c:52:15: branch_true: ...to here
liburing-2.13/test/shutdown.c:53:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:55:19: branch_true: ...to here
liburing-2.13/test/shutdown.c:59:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:61:9: branch_true: ...to here
liburing-2.13/test/shutdown.c:61:9: throw: if ‘t_set_nonblock’ throws an exception...
liburing-2.13/test/shutdown.c:61:9: danger: ‘recv_s0’ leaks here
#   59|   	assert(ret != -1);
#   60|   
#   61|-> 	t_set_nonblock(p_fd[1]);
#   62|   
#   63|   	ret = connect(p_fd[1], (struct sockaddr*)&addr, sizeof(addr));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def585]
liburing-2.13/test/shutdown.c:63:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/shutdown.c:35:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/shutdown.c:38:15: branch_false: ...to here
liburing-2.13/test/shutdown.c:40:19: acquire_resource: socket created here
liburing-2.13/test/shutdown.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:44:15: branch_true: ...to here
liburing-2.13/test/shutdown.c:45:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:47:9: branch_true: ...to here
liburing-2.13/test/shutdown.c:51:9: branch_true: following ‘true’ branch...
liburing-2.13/test/shutdown.c:52:15: branch_true: ...to here
liburing-2.13/test/shutdown.c:53:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:55:19: branch_true: ...to here
liburing-2.13/test/shutdown.c:59:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:61:9: branch_true: ...to here
liburing-2.13/test/shutdown.c:63:15: throw: if ‘connect’ throws an exception...
liburing-2.13/test/shutdown.c:63:15: danger: ‘recv_s0’ leaks here
#   61|   	t_set_nonblock(p_fd[1]);
#   62|   
#   63|-> 	ret = connect(p_fd[1], (struct sockaddr*)&addr, sizeof(addr));
#   64|   	assert(ret == -1);
#   65|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def586]
liburing-2.13/test/shutdown.c:66:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/shutdown.c:35:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/shutdown.c:38:15: branch_false: ...to here
liburing-2.13/test/shutdown.c:40:19: acquire_resource: socket created here
liburing-2.13/test/shutdown.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:44:15: branch_true: ...to here
liburing-2.13/test/shutdown.c:45:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:47:9: branch_true: ...to here
liburing-2.13/test/shutdown.c:51:9: branch_true: following ‘true’ branch...
liburing-2.13/test/shutdown.c:52:15: branch_true: ...to here
liburing-2.13/test/shutdown.c:53:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:55:19: branch_true: ...to here
liburing-2.13/test/shutdown.c:59:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:61:9: branch_true: ...to here
liburing-2.13/test/shutdown.c:64:9: branch_true: following ‘true’ branch...
liburing-2.13/test/shutdown.c:66:9: branch_true: ...to here
liburing-2.13/test/shutdown.c:66:9: throw: if ‘t_clear_nonblock’ throws an exception...
liburing-2.13/test/shutdown.c:66:9: danger: ‘recv_s0’ leaks here
#   64|   	assert(ret == -1);
#   65|   
#   66|-> 	t_clear_nonblock(p_fd[1]);
#   67|   
#   68|   	p_fd[0] = accept(recv_s0, NULL, NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def587]
liburing-2.13/test/shutdown.c:68:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/shutdown.c:35:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/shutdown.c:38:15: branch_false: ...to here
liburing-2.13/test/shutdown.c:40:19: acquire_resource: socket created here
liburing-2.13/test/shutdown.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:44:15: branch_true: ...to here
liburing-2.13/test/shutdown.c:45:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:47:9: branch_true: ...to here
liburing-2.13/test/shutdown.c:51:9: branch_true: following ‘true’ branch...
liburing-2.13/test/shutdown.c:52:15: branch_true: ...to here
liburing-2.13/test/shutdown.c:53:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:55:19: branch_true: ...to here
liburing-2.13/test/shutdown.c:59:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/shutdown.c:61:9: branch_true: ...to here
liburing-2.13/test/shutdown.c:64:9: branch_true: following ‘true’ branch...
liburing-2.13/test/shutdown.c:66:9: branch_true: ...to here
liburing-2.13/test/shutdown.c:68:19: throw: if ‘accept’ throws an exception...
liburing-2.13/test/shutdown.c:68:19: danger: ‘recv_s0’ leaks here
#   66|   	t_clear_nonblock(p_fd[1]);
#   67|   
#   68|-> 	p_fd[0] = accept(recv_s0, NULL, NULL);
#   69|   	assert(p_fd[0] != -1);
#   70|   

Error: GCC_ANALYZER_WARNING: [#def588]
liburing-2.13/test/socket-nb.c:45:15: warning[-Wanalyzer-fd-use-without-check]: ‘listen’ on possibly invalid file descriptor ‘recv_s0’
liburing-2.13/test/socket-nb.c:37:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-nb.c:38:15: branch_true: ...to here
liburing-2.13/test/socket-nb.c:39:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-nb.c:41:9: branch_true: ...to here
liburing-2.13/test/socket-nb.c:44:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-nb.c:45:15: branch_true: ...to here
liburing-2.13/test/socket-nb.c:45:15: danger: ‘recv_s0’ could be invalid
#   43|   	ret = t_bind_ephemeral_port(recv_s0, &addr);
#   44|   	assert(!ret);
#   45|-> 	ret = listen(recv_s0, 128);
#   46|   	assert(ret != -1);
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def589]
liburing-2.13/test/socket-nb.c:54:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/socket-nb.c:33:19: acquire_resource: socket created here
liburing-2.13/test/socket-nb.c:37:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-nb.c:38:15: branch_true: ...to here
liburing-2.13/test/socket-nb.c:39:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-nb.c:41:9: branch_true: ...to here
liburing-2.13/test/socket-nb.c:44:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-nb.c:45:15: branch_true: ...to here
liburing-2.13/test/socket-nb.c:46:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-nb.c:48:19: branch_true: ...to here
liburing-2.13/test/socket-nb.c:52:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-nb.c:54:9: branch_true: ...to here
liburing-2.13/test/socket-nb.c:54:9: throw: if ‘t_set_nonblock’ throws an exception...
liburing-2.13/test/socket-nb.c:54:9: danger: ‘recv_s0’ leaks here
#   52|   	assert(ret != -1);
#   53|   
#   54|-> 	t_set_nonblock(p_fd[1]);
#   55|   
#   56|   	ret = connect(p_fd[1], (struct sockaddr *) &addr, sizeof(addr));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def590]
liburing-2.13/test/socket-nb.c:56:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/socket-nb.c:33:19: acquire_resource: socket created here
liburing-2.13/test/socket-nb.c:37:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-nb.c:38:15: branch_true: ...to here
liburing-2.13/test/socket-nb.c:39:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-nb.c:41:9: branch_true: ...to here
liburing-2.13/test/socket-nb.c:44:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-nb.c:45:15: branch_true: ...to here
liburing-2.13/test/socket-nb.c:46:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-nb.c:48:19: branch_true: ...to here
liburing-2.13/test/socket-nb.c:52:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-nb.c:54:9: branch_true: ...to here
liburing-2.13/test/socket-nb.c:56:15: throw: if ‘connect’ throws an exception...
liburing-2.13/test/socket-nb.c:56:15: danger: ‘recv_s0’ leaks here
#   54|   	t_set_nonblock(p_fd[1]);
#   55|   
#   56|-> 	ret = connect(p_fd[1], (struct sockaddr *) &addr, sizeof(addr));
#   57|   	assert(ret == -1);
#   58|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def591]
liburing-2.13/test/socket-nb.c:59:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/socket-nb.c:33:19: acquire_resource: socket created here
liburing-2.13/test/socket-nb.c:37:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-nb.c:38:15: branch_true: ...to here
liburing-2.13/test/socket-nb.c:39:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-nb.c:41:9: branch_true: ...to here
liburing-2.13/test/socket-nb.c:44:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-nb.c:45:15: branch_true: ...to here
liburing-2.13/test/socket-nb.c:46:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-nb.c:48:19: branch_true: ...to here
liburing-2.13/test/socket-nb.c:52:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-nb.c:54:9: branch_true: ...to here
liburing-2.13/test/socket-nb.c:57:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-nb.c:59:19: branch_true: ...to here
liburing-2.13/test/socket-nb.c:59:19: throw: if ‘accept’ throws an exception...
liburing-2.13/test/socket-nb.c:59:19: danger: ‘recv_s0’ leaks here
#   57|   	assert(ret == -1);
#   58|   
#   59|-> 	p_fd[0] = accept(recv_s0, NULL, NULL);
#   60|   	assert(p_fd[0] != -1);
#   61|   

Error: GCC_ANALYZER_WARNING: [#def592]
liburing-2.13/test/socket-rw-eagain.c:47:15: warning[-Wanalyzer-fd-use-without-check]: ‘listen’ on possibly invalid file descriptor ‘recv_s0’
liburing-2.13/test/socket-rw-eagain.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/socket-rw-eagain.c:34:15: branch_false: ...to here
liburing-2.13/test/socket-rw-eagain.c:39:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-eagain.c:40:15: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-eagain.c:43:9: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:46:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw-eagain.c:47:15: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:47:15: danger: ‘recv_s0’ could be invalid
#   45|   	ret = t_bind_ephemeral_port(recv_s0, &addr);
#   46|   	assert(!ret);
#   47|-> 	ret = listen(recv_s0, 128);
#   48|   	assert(ret != -1);
#   49|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def593]
liburing-2.13/test/socket-rw-eagain.c:56:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/socket-rw-eagain.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/socket-rw-eagain.c:34:15: branch_false: ...to here
liburing-2.13/test/socket-rw-eagain.c:36:19: acquire_resource: socket created here
liburing-2.13/test/socket-rw-eagain.c:39:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-eagain.c:40:15: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-eagain.c:43:9: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:46:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw-eagain.c:47:15: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:48:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-eagain.c:50:19: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:54:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-eagain.c:56:9: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:56:9: throw: if ‘t_set_nonblock’ throws an exception...
liburing-2.13/test/socket-rw-eagain.c:56:9: danger: ‘recv_s0’ leaks here
#   54|   	assert(ret != -1);
#   55|   
#   56|-> 	t_set_nonblock(p_fd[1]);
#   57|   
#   58|   	ret = connect(p_fd[1], (struct sockaddr*)&addr, sizeof(addr));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def594]
liburing-2.13/test/socket-rw-eagain.c:58:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/socket-rw-eagain.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/socket-rw-eagain.c:34:15: branch_false: ...to here
liburing-2.13/test/socket-rw-eagain.c:36:19: acquire_resource: socket created here
liburing-2.13/test/socket-rw-eagain.c:39:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-eagain.c:40:15: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-eagain.c:43:9: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:46:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw-eagain.c:47:15: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:48:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-eagain.c:50:19: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:54:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-eagain.c:56:9: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:58:15: throw: if ‘connect’ throws an exception...
liburing-2.13/test/socket-rw-eagain.c:58:15: danger: ‘recv_s0’ leaks here
#   56|   	t_set_nonblock(p_fd[1]);
#   57|   
#   58|-> 	ret = connect(p_fd[1], (struct sockaddr*)&addr, sizeof(addr));
#   59|   	assert(ret == -1);
#   60|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def595]
liburing-2.13/test/socket-rw-eagain.c:61:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/socket-rw-eagain.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/socket-rw-eagain.c:34:15: branch_false: ...to here
liburing-2.13/test/socket-rw-eagain.c:36:19: acquire_resource: socket created here
liburing-2.13/test/socket-rw-eagain.c:39:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-eagain.c:40:15: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-eagain.c:43:9: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:46:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw-eagain.c:47:15: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:48:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-eagain.c:50:19: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:54:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-eagain.c:56:9: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:59:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw-eagain.c:61:19: branch_true: ...to here
liburing-2.13/test/socket-rw-eagain.c:61:19: throw: if ‘accept’ throws an exception...
liburing-2.13/test/socket-rw-eagain.c:61:19: danger: ‘recv_s0’ leaks here
#   59|   	assert(ret == -1);
#   60|   
#   61|-> 	p_fd[0] = accept(recv_s0, NULL, NULL);
#   62|   	assert(p_fd[0] != -1);
#   63|   

Error: GCC_ANALYZER_WARNING: [#def596]
liburing-2.13/test/socket-rw-offset.c:49:15: warning[-Wanalyzer-fd-use-without-check]: ‘listen’ on possibly invalid file descriptor ‘recv_s0’
liburing-2.13/test/socket-rw-offset.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/socket-rw-offset.c:36:15: branch_false: ...to here
liburing-2.13/test/socket-rw-offset.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:42:15: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:45:9: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:48:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw-offset.c:49:15: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:49:15: danger: ‘recv_s0’ could be invalid
#   47|   	ret = t_bind_ephemeral_port(recv_s0, &addr);
#   48|   	assert(!ret);
#   49|-> 	ret = listen(recv_s0, 128);
#   50|   	assert(ret != -1);
#   51|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def597]
liburing-2.13/test/socket-rw-offset.c:59:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/socket-rw-offset.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/socket-rw-offset.c:36:15: branch_false: ...to here
liburing-2.13/test/socket-rw-offset.c:38:19: acquire_resource: socket created here
liburing-2.13/test/socket-rw-offset.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:42:15: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:45:9: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:48:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw-offset.c:49:15: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:53:19: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:59:9: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:59:9: throw: if ‘t_set_nonblock’ throws an exception...
liburing-2.13/test/socket-rw-offset.c:59:9: danger: ‘recv_s0’ leaks here
#   57|   	assert(ret != -1);
#   58|   
#   59|-> 	t_set_nonblock(p_fd[1]);
#   60|   
#   61|   	ret = connect(p_fd[1], (struct sockaddr*)&addr, sizeof(addr));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def598]
liburing-2.13/test/socket-rw-offset.c:61:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/socket-rw-offset.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/socket-rw-offset.c:36:15: branch_false: ...to here
liburing-2.13/test/socket-rw-offset.c:38:19: acquire_resource: socket created here
liburing-2.13/test/socket-rw-offset.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:42:15: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:45:9: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:48:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw-offset.c:49:15: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:53:19: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:59:9: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:61:15: throw: if ‘connect’ throws an exception...
liburing-2.13/test/socket-rw-offset.c:61:15: danger: ‘recv_s0’ leaks here
#   59|   	t_set_nonblock(p_fd[1]);
#   60|   
#   61|-> 	ret = connect(p_fd[1], (struct sockaddr*)&addr, sizeof(addr));
#   62|   	assert(ret == -1);
#   63|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def599]
liburing-2.13/test/socket-rw-offset.c:64:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/socket-rw-offset.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/socket-rw-offset.c:36:15: branch_false: ...to here
liburing-2.13/test/socket-rw-offset.c:38:19: acquire_resource: socket created here
liburing-2.13/test/socket-rw-offset.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:42:15: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:45:9: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:48:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw-offset.c:49:15: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:53:19: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:59:9: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:62:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw-offset.c:64:9: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:64:9: throw: if ‘t_clear_nonblock’ throws an exception...
liburing-2.13/test/socket-rw-offset.c:64:9: danger: ‘recv_s0’ leaks here
#   62|   	assert(ret == -1);
#   63|   
#   64|-> 	t_clear_nonblock(p_fd[1]);
#   65|   
#   66|   	p_fd[0] = accept(recv_s0, NULL, NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def600]
liburing-2.13/test/socket-rw-offset.c:66:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/socket-rw-offset.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/socket-rw-offset.c:36:15: branch_false: ...to here
liburing-2.13/test/socket-rw-offset.c:38:19: acquire_resource: socket created here
liburing-2.13/test/socket-rw-offset.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:42:15: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:45:9: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:48:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw-offset.c:49:15: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:53:19: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw-offset.c:59:9: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:62:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw-offset.c:64:9: branch_true: ...to here
liburing-2.13/test/socket-rw-offset.c:66:19: throw: if ‘accept’ throws an exception...
liburing-2.13/test/socket-rw-offset.c:66:19: danger: ‘recv_s0’ leaks here
#   64|   	t_clear_nonblock(p_fd[1]);
#   65|   
#   66|-> 	p_fd[0] = accept(recv_s0, NULL, NULL);
#   67|   	assert(p_fd[0] != -1);
#   68|   

Error: GCC_ANALYZER_WARNING: [#def601]
liburing-2.13/test/socket-rw.c:49:15: warning[-Wanalyzer-fd-use-without-check]: ‘listen’ on possibly invalid file descriptor ‘recv_s0’
liburing-2.13/test/socket-rw.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/socket-rw.c:36:15: branch_false: ...to here
liburing-2.13/test/socket-rw.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:42:15: branch_true: ...to here
liburing-2.13/test/socket-rw.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:45:9: branch_true: ...to here
liburing-2.13/test/socket-rw.c:48:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw.c:49:15: branch_true: ...to here
liburing-2.13/test/socket-rw.c:49:15: danger: ‘recv_s0’ could be invalid
#   47|   	ret = t_bind_ephemeral_port(recv_s0, &addr);
#   48|   	assert(!ret);
#   49|-> 	ret = listen(recv_s0, 128);
#   50|   	assert(ret != -1);
#   51|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def602]
liburing-2.13/test/socket-rw.c:59:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/socket-rw.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/socket-rw.c:36:15: branch_false: ...to here
liburing-2.13/test/socket-rw.c:38:19: acquire_resource: socket created here
liburing-2.13/test/socket-rw.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:42:15: branch_true: ...to here
liburing-2.13/test/socket-rw.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:45:9: branch_true: ...to here
liburing-2.13/test/socket-rw.c:48:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw.c:49:15: branch_true: ...to here
liburing-2.13/test/socket-rw.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:53:19: branch_true: ...to here
liburing-2.13/test/socket-rw.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:59:9: branch_true: ...to here
liburing-2.13/test/socket-rw.c:59:9: throw: if ‘t_set_nonblock’ throws an exception...
liburing-2.13/test/socket-rw.c:59:9: danger: ‘recv_s0’ leaks here
#   57|   	assert(ret != -1);
#   58|   
#   59|-> 	t_set_nonblock(p_fd[1]);
#   60|   
#   61|   	ret = connect(p_fd[1], (struct sockaddr*)&addr, sizeof(addr));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def603]
liburing-2.13/test/socket-rw.c:61:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/socket-rw.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/socket-rw.c:36:15: branch_false: ...to here
liburing-2.13/test/socket-rw.c:38:19: acquire_resource: socket created here
liburing-2.13/test/socket-rw.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:42:15: branch_true: ...to here
liburing-2.13/test/socket-rw.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:45:9: branch_true: ...to here
liburing-2.13/test/socket-rw.c:48:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw.c:49:15: branch_true: ...to here
liburing-2.13/test/socket-rw.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:53:19: branch_true: ...to here
liburing-2.13/test/socket-rw.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:59:9: branch_true: ...to here
liburing-2.13/test/socket-rw.c:61:15: throw: if ‘connect’ throws an exception...
liburing-2.13/test/socket-rw.c:61:15: danger: ‘recv_s0’ leaks here
#   59|   	t_set_nonblock(p_fd[1]);
#   60|   
#   61|-> 	ret = connect(p_fd[1], (struct sockaddr*)&addr, sizeof(addr));
#   62|   	assert(ret == -1);
#   63|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def604]
liburing-2.13/test/socket-rw.c:64:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/socket-rw.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/socket-rw.c:36:15: branch_false: ...to here
liburing-2.13/test/socket-rw.c:38:19: acquire_resource: socket created here
liburing-2.13/test/socket-rw.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:42:15: branch_true: ...to here
liburing-2.13/test/socket-rw.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:45:9: branch_true: ...to here
liburing-2.13/test/socket-rw.c:48:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw.c:49:15: branch_true: ...to here
liburing-2.13/test/socket-rw.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:53:19: branch_true: ...to here
liburing-2.13/test/socket-rw.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:59:9: branch_true: ...to here
liburing-2.13/test/socket-rw.c:62:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw.c:64:9: branch_true: ...to here
liburing-2.13/test/socket-rw.c:64:9: throw: if ‘t_clear_nonblock’ throws an exception...
liburing-2.13/test/socket-rw.c:64:9: danger: ‘recv_s0’ leaks here
#   62|   	assert(ret == -1);
#   63|   
#   64|-> 	t_clear_nonblock(p_fd[1]);
#   65|   
#   66|   	p_fd[0] = accept(recv_s0, NULL, NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def605]
liburing-2.13/test/socket-rw.c:66:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’
liburing-2.13/test/socket-rw.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/socket-rw.c:36:15: branch_false: ...to here
liburing-2.13/test/socket-rw.c:38:19: acquire_resource: socket created here
liburing-2.13/test/socket-rw.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:42:15: branch_true: ...to here
liburing-2.13/test/socket-rw.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:45:9: branch_true: ...to here
liburing-2.13/test/socket-rw.c:48:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw.c:49:15: branch_true: ...to here
liburing-2.13/test/socket-rw.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:53:19: branch_true: ...to here
liburing-2.13/test/socket-rw.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)...
liburing-2.13/test/socket-rw.c:59:9: branch_true: ...to here
liburing-2.13/test/socket-rw.c:62:9: branch_true: following ‘true’ branch...
liburing-2.13/test/socket-rw.c:64:9: branch_true: ...to here
liburing-2.13/test/socket-rw.c:66:19: throw: if ‘accept’ throws an exception...
liburing-2.13/test/socket-rw.c:66:19: danger: ‘recv_s0’ leaks here
#   64|   	t_clear_nonblock(p_fd[1]);
#   65|   
#   66|-> 	p_fd[0] = accept(recv_s0, NULL, NULL);
#   67|   	assert(p_fd[0] != -1);
#   68|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def606]
liburing-2.13/test/splice.c:111:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
liburing-2.13/test/splice.c:444:5: enter_function: entry to ‘main’
liburing-2.13/test/splice.c:452:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/splice.c:455:15: branch_false: ...to here
liburing-2.13/test/splice.c:456:12: branch_false: following ‘false’ branch...
liburing-2.13/test/splice.c:460:15: branch_false: ...to here
liburing-2.13/test/splice.c:460:12: branch_false: following ‘false’ branch...
liburing-2.13/test/splice.c:465:15: branch_false: ...to here
liburing-2.13/test/splice.c:465:15: call_function: calling ‘init_splice_ctx’ from ‘main’
#  109|   		return 1;
#  110|   
#  111|-> 	ret = read_buf(rnd_fd, ctx->buf_in, BUF_SIZE);
#  112|   	if (ret != 0)
#  113|   		return 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def607]
liburing-2.13/test/sq-poll-dup.c:186:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname, 16384)’
liburing-2.13/test/sq-poll-dup.c:159:5: enter_function: entry to ‘main’
liburing-2.13/test/sq-poll-dup.c:173:14: acquire_resource: opened here
liburing-2.13/test/sq-poll-dup.c:174:12: branch_false: following ‘false’ branch...
liburing-2.13/test/sq-poll-dup.c:186:22: branch_false: ...to here
liburing-2.13/test/sq-poll-dup.c:189:15: call_function: calling ‘test’ from ‘main’
#  184|   	}
#  185|   
#  186|-> 	if (fname != argv[1])
#  187|   		unlink(fname);
#  188|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def608]
liburing-2.13/test/sq-poll-kthread.c:52:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/sq-poll-kthread.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/sq-poll-kthread.c:48:9: branch_false: ...to here
liburing-2.13/test/sq-poll-kthread.c:52:15: throw: if ‘t_create_ring_params’ throws an exception...
liburing-2.13/test/sq-poll-kthread.c:52:15: danger: ‘pipe1[0]’ leaks here
#   50|   	param.sq_thread_idle = SQ_THREAD_IDLE;
#   51|   
#   52|-> 	ret = t_create_ring_params(16, &ring, &param);
#   53|   	if (ret == T_SETUP_SKIP) {
#   54|   		ret = TEST_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def609]
liburing-2.13/test/sq-poll-kthread.c:52:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/sq-poll-kthread.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/sq-poll-kthread.c:48:9: branch_false: ...to here
liburing-2.13/test/sq-poll-kthread.c:52:15: throw: if ‘t_create_ring_params’ throws an exception...
liburing-2.13/test/sq-poll-kthread.c:52:15: danger: ‘pipe1[1]’ leaks here
#   50|   	param.sq_thread_idle = SQ_THREAD_IDLE;
#   51|   
#   52|-> 	ret = t_create_ring_params(16, &ring, &param);
#   53|   	if (ret == T_SETUP_SKIP) {
#   54|   		ret = TEST_FAILED;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def610]
liburing-2.13/test/sq-poll-kthread.c:62:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/sq-poll-kthread.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/sq-poll-kthread.c:48:9: branch_false: ...to here
liburing-2.13/test/sq-poll-kthread.c:53:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/sq-poll-kthread.c:56:19: branch_false: ...to here
liburing-2.13/test/sq-poll-kthread.c:56:19: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/sq-poll-kthread.c:62:15: branch_false: ...to here
liburing-2.13/test/sq-poll-kthread.c:62:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/sq-poll-kthread.c:62:15: danger: ‘pipe1[0]’ leaks here
#   60|   	}
#   61|   
#   62|-> 	ret = io_uring_register_files(&ring, &pipe1[1], 1);
#   63|   	if (ret) {
#   64|   		fprintf(stderr, "file reg failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def611]
liburing-2.13/test/sq-poll-kthread.c:62:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/sq-poll-kthread.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/sq-poll-kthread.c:48:9: branch_false: ...to here
liburing-2.13/test/sq-poll-kthread.c:53:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/sq-poll-kthread.c:56:19: branch_false: ...to here
liburing-2.13/test/sq-poll-kthread.c:56:19: branch_false: following ‘false’ branch (when ‘ret == 0’)...
liburing-2.13/test/sq-poll-kthread.c:62:15: branch_false: ...to here
liburing-2.13/test/sq-poll-kthread.c:62:15: throw: if ‘io_uring_register_files’ throws an exception...
liburing-2.13/test/sq-poll-kthread.c:62:15: danger: ‘pipe1[1]’ leaks here
#   60|   	}
#   61|   
#   62|-> 	ret = io_uring_register_files(&ring, &pipe1[1], 1);
#   63|   	if (ret) {
#   64|   		fprintf(stderr, "file reg failed: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def612]
liburing-2.13/test/sq-poll-kthread.c:114:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[0]’
liburing-2.13/test/sq-poll-kthread.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/sq-poll-kthread.c:48:9: branch_false: ...to here
liburing-2.13/test/sq-poll-kthread.c:114:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/sq-poll-kthread.c:114:9: danger: ‘pipe1[0]’ leaks here
#  112|   		io_uring_queue_exit(&ring);
#  113|   err_pipe:
#  114|-> 	close(pipe1[0]);
#  115|   	close(pipe1[1]);
#  116|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def613]
liburing-2.13/test/sq-poll-kthread.c:114:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/sq-poll-kthread.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/sq-poll-kthread.c:48:9: branch_false: ...to here
liburing-2.13/test/sq-poll-kthread.c:114:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/sq-poll-kthread.c:114:9: danger: ‘pipe1[1]’ leaks here
#  112|   		io_uring_queue_exit(&ring);
#  113|   err_pipe:
#  114|-> 	close(pipe1[0]);
#  115|   	close(pipe1[1]);
#  116|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def614]
liburing-2.13/test/sq-poll-kthread.c:115:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe1[1]’
liburing-2.13/test/sq-poll-kthread.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/sq-poll-kthread.c:48:9: branch_false: ...to here
liburing-2.13/test/sq-poll-kthread.c:115:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/sq-poll-kthread.c:115:9: danger: ‘pipe1[1]’ leaks here
#  113|   err_pipe:
#  114|   	close(pipe1[0]);
#  115|-> 	close(pipe1[1]);
#  116|   
#  117|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def615]
liburing-2.13/test/sq-poll-share.c:99:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname, 16384)’
liburing-2.13/test/sq-poll-share.c:91:14: acquire_resource: opened here
liburing-2.13/test/sq-poll-share.c:92:12: branch_false: following ‘false’ branch...
liburing-2.13/test/sq-poll-share.c:99:22: branch_false: ...to here
liburing-2.13/test/sq-poll-share.c:102:21: branch_true: following ‘true’ branch (when ‘i != 4’)...
liburing-2.13/test/sq-poll-share.c:103:40: branch_true: ...to here
liburing-2.13/test/sq-poll-share.c:106:20: branch_false: following ‘false’ branch (when ‘i == 0’)...
liburing-2.13/test/sq-poll-share.c:110:23: branch_false: ...to here
liburing-2.13/test/sq-poll-share.c:110:23: throw: if ‘io_uring_queue_init_params’ throws an exception...
liburing-2.13/test/sq-poll-share.c:99:22: danger: ‘open(fname, 16384)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   97|   	}
#   98|   
#   99|-> 	if (fname != argv[1])
#  100|   		unlink(fname);
#  101|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def616]
liburing-2.13/test/sqpoll-disable-exit.c:54:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 524289)’
liburing-2.13/test/sqpoll-disable-exit.c:51:12: acquire_resource: opened here
liburing-2.13/test/sqpoll-disable-exit.c:52:6: branch_false: following ‘false’ branch...
liburing-2.13/test/sqpoll-disable-exit.c:54:7: branch_false: ...to here
liburing-2.13/test/sqpoll-disable-exit.c:54:7: throw: if ‘write’ throws an exception...
liburing-2.13/test/sqpoll-disable-exit.c:54:7: danger: ‘open(file, 524289)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   52|     if (fd == -1)
#   53|       return false;
#   54|->   if (write(fd, buf, len) != len) {
#   55|       int err = errno;
#   56|       close(fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def617]
liburing-2.13/test/sqpoll-disable-exit.c:118:28: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/sys/fs/fuse/connections")’
liburing-2.13/test/sqpoll-disable-exit.c:110:19: branch_true: following ‘true’ branch (when ‘i != 100’)...
liburing-2.13/test/sqpoll-disable-exit.c:111:9: branch_true: ...to here
liburing-2.13/test/sqpoll-disable-exit.c:111:8: branch_false: following ‘false’ branch...
liburing-2.13/test/sqpoll-disable-exit.c:113:5: branch_false: ...to here
liburing-2.13/test/sqpoll-disable-exit.c:111:8: branch_false: following ‘false’ branch...
liburing-2.13/test/sqpoll-disable-exit.c:113:5: branch_false: ...to here
liburing-2.13/test/sqpoll-disable-exit.c:115:14: acquire_memory: allocated here
liburing-2.13/test/sqpoll-disable-exit.c:116:6: branch_true: following ‘true’ branch...
liburing-2.13/test/sqpoll-disable-exit.c:116:6: branch_true: ...to here
liburing-2.13/test/sqpoll-disable-exit.c:118:28: throw: if ‘readdir’ throws an exception...
liburing-2.13/test/sqpoll-disable-exit.c:118:28: danger: ‘opendir("/sys/fs/fuse/connections")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  116|     if (dir) {
#  117|       for (;;) {
#  118|->       struct dirent* ent = readdir(dir);
#  119|         if (!ent)
#  120|           break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def618]
liburing-2.13/test/sqpoll-disable-exit.c:130:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&abort, 1)’
liburing-2.13/test/sqpoll-disable-exit.c:110:19: branch_true: following ‘true’ branch (when ‘i != 100’)...
liburing-2.13/test/sqpoll-disable-exit.c:111:9: branch_true: ...to here
liburing-2.13/test/sqpoll-disable-exit.c:111:8: branch_false: following ‘false’ branch...
liburing-2.13/test/sqpoll-disable-exit.c:113:5: branch_false: ...to here
liburing-2.13/test/sqpoll-disable-exit.c:111:8: branch_false: following ‘false’ branch...
liburing-2.13/test/sqpoll-disable-exit.c:113:5: branch_false: ...to here
liburing-2.13/test/sqpoll-disable-exit.c:116:6: branch_true: following ‘true’ branch...
liburing-2.13/test/sqpoll-disable-exit.c:116:6: branch_true: ...to here
liburing-2.13/test/sqpoll-disable-exit.c:119:10: branch_false: following ‘false’ branch...
liburing-2.13/test/sqpoll-disable-exit.c:121:18: branch_false: ...to here
liburing-2.13/test/sqpoll-disable-exit.c:126:16: acquire_resource: opened here
liburing-2.13/test/sqpoll-disable-exit.c:130:11: throw: if ‘write’ throws an exception...
liburing-2.13/test/sqpoll-disable-exit.c:130:11: danger: ‘open(&abort, 1)’ leaks here; was opened at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
#  128|           continue;
#  129|         }
#  130|->       if (write(fd, abort, 1) < 0) {
#  131|         }
#  132|         close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def619]
liburing-2.13/test/sqpoll-disable-exit.c:132:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&abort, 1)’
liburing-2.13/test/sqpoll-disable-exit.c:110:19: branch_true: following ‘true’ branch (when ‘i != 100’)...
liburing-2.13/test/sqpoll-disable-exit.c:111:9: branch_true: ...to here
liburing-2.13/test/sqpoll-disable-exit.c:111:8: branch_false: following ‘false’ branch...
liburing-2.13/test/sqpoll-disable-exit.c:113:5: branch_false: ...to here
liburing-2.13/test/sqpoll-disable-exit.c:111:8: branch_false: following ‘false’ branch...
liburing-2.13/test/sqpoll-disable-exit.c:113:5: branch_false: ...to here
liburing-2.13/test/sqpoll-disable-exit.c:116:6: branch_true: following ‘true’ branch...
liburing-2.13/test/sqpoll-disable-exit.c:116:6: branch_true: ...to here
liburing-2.13/test/sqpoll-disable-exit.c:119:10: branch_false: following ‘false’ branch...
liburing-2.13/test/sqpoll-disable-exit.c:121:18: branch_false: ...to here
liburing-2.13/test/sqpoll-disable-exit.c:126:16: acquire_resource: opened here
liburing-2.13/test/sqpoll-disable-exit.c:132:7: danger: ‘open(&abort, 1)’ leaks here; was opened at [(11)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/10)
#  130|         if (write(fd, abort, 1) < 0) {
#  131|         }
#  132|->       close(fd);
#  133|       }
#  134|       closedir(dir);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def620]
liburing-2.13/test/stdout.c:33:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/stdout.c:28:12: branch_false: following ‘false’ branch...
liburing-2.13/test/stdout.c:33:15: branch_false: ...to here
liburing-2.13/test/stdout.c:33:15: throw: if ‘io_uring_register_buffers’ throws an exception...
liburing-2.13/test/stdout.c:33:15: danger: ‘fds[0]’ leaks here
#   31|   	}
#   32|   
#   33|-> 	ret = io_uring_register_buffers(ring, vecs, 1);
#   34|   	if (ret) {
#   35|   		fprintf(stderr, "Failed to register buffers: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def621]
liburing-2.13/test/stdout.c:33:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/stdout.c:28:12: branch_false: following ‘false’ branch...
liburing-2.13/test/stdout.c:33:15: branch_false: ...to here
liburing-2.13/test/stdout.c:33:15: throw: if ‘io_uring_register_buffers’ throws an exception...
liburing-2.13/test/stdout.c:33:15: danger: ‘fds[1]’ leaks here
#   31|   	}
#   32|   
#   33|-> 	ret = io_uring_register_buffers(ring, vecs, 1);
#   34|   	if (ret) {
#   35|   		fprintf(stderr, "Failed to register buffers: %d\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def622]
liburing-2.13/test/submit-link-fail.c:71:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/submit-link-fail.c:34:9: branch_true: following ‘true’ branch (when ‘link_size > fail_idx’)...
liburing-2.13/test/submit-link-fail.c:35:9: branch_true: ...to here
liburing-2.13/test/submit-link-fail.c:35:9: branch_true: following ‘true’ branch (when ‘link_size <= 39’)...
liburing-2.13/test/submit-link-fail.c:38:15: branch_true: ...to here
liburing-2.13/test/submit-link-fail.c:39:12: branch_false: following ‘false’ branch...
liburing-2.13/test/submit-link-fail.c:43:13: branch_false: ...to here
liburing-2.13/test/submit-link-fail.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/submit-link-fail.c:48:12: branch_false: ...to here
liburing-2.13/test/submit-link-fail.c:48:12: branch_false: following ‘false’ branch (when ‘drain == 0’)...
liburing-2.13/test/submit-link-fail.c:57:9: branch_false: ...to here
liburing-2.13/test/submit-link-fail.c:57:21: branch_false: following ‘false’ branch (when ‘i >= link_size’)...
liburing-2.13/test/submit-link-fail.c:71:15: branch_false: ...to here
liburing-2.13/test/submit-link-fail.c:71:15: throw: if ‘io_uring_submit’ throws an exception...
liburing-2.13/test/submit-link-fail.c:71:15: danger: ‘fds[0]’ leaks here
#   69|   	}
#   70|   
#   71|-> 	ret = io_uring_submit(&ring);
#   72|   	if (ret != total_submit) {
#   73|   		/* Old behaviour, failed early and under-submitted */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def623]
liburing-2.13/test/submit-link-fail.c:71:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/submit-link-fail.c:34:9: branch_true: following ‘true’ branch (when ‘link_size > fail_idx’)...
liburing-2.13/test/submit-link-fail.c:35:9: branch_true: ...to here
liburing-2.13/test/submit-link-fail.c:35:9: branch_true: following ‘true’ branch (when ‘link_size <= 39’)...
liburing-2.13/test/submit-link-fail.c:38:15: branch_true: ...to here
liburing-2.13/test/submit-link-fail.c:39:12: branch_false: following ‘false’ branch...
liburing-2.13/test/submit-link-fail.c:43:13: branch_false: ...to here
liburing-2.13/test/submit-link-fail.c:43:12: branch_false: following ‘false’ branch...
liburing-2.13/test/submit-link-fail.c:48:12: branch_false: ...to here
liburing-2.13/test/submit-link-fail.c:48:12: branch_false: following ‘false’ branch (when ‘drain == 0’)...
liburing-2.13/test/submit-link-fail.c:57:9: branch_false: ...to here
liburing-2.13/test/submit-link-fail.c:57:21: branch_false: following ‘false’ branch (when ‘i >= link_size’)...
liburing-2.13/test/submit-link-fail.c:71:15: branch_false: ...to here
liburing-2.13/test/submit-link-fail.c:71:15: throw: if ‘io_uring_submit’ throws an exception...
liburing-2.13/test/submit-link-fail.c:71:15: danger: ‘fds[1]’ leaks here
#   69|   	}
#   70|   
#   71|-> 	ret = io_uring_submit(&ring);
#   72|   	if (ret != total_submit) {
#   73|   		/* Old behaviour, failed early and under-submitted */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def624]
liburing-2.13/test/submit-reuse.c:146:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname1, 0)’
liburing-2.13/test/submit-reuse.c:117:12: branch_false: following ‘false’ branch...
liburing-2.13/test/submit-reuse.c:122:15: branch_false: ...to here
liburing-2.13/test/submit-reuse.c:122:12: branch_false: following ‘false’ branch...
liburing-2.13/test/submit-reuse.c:129:12: branch_false: ...to here
liburing-2.13/test/submit-reuse.c:136:15: acquire_resource: opened here
liburing-2.13/test/submit-reuse.c:139:12: branch_false: following ‘false’ branch...
liburing-2.13/test/submit-reuse.c:146:9: branch_false: ...to here
liburing-2.13/test/submit-reuse.c:146:9: throw: if ‘t_create_file’ throws an exception...
liburing-2.13/test/submit-reuse.c:146:9: danger: ‘open(fname1, 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  144|   	}
#  145|   
#  146|-> 	t_create_file(".reuse.2", FILE_SIZE);
#  147|   	fd2 = open(".reuse.2", O_RDONLY);
#  148|   	unlink(".reuse.2");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def625]
liburing-2.13/test/submit-reuse.c:147:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname1, 0)’
liburing-2.13/test/submit-reuse.c:117:12: branch_false: following ‘false’ branch...
liburing-2.13/test/submit-reuse.c:122:15: branch_false: ...to here
liburing-2.13/test/submit-reuse.c:122:12: branch_false: following ‘false’ branch...
liburing-2.13/test/submit-reuse.c:129:12: branch_false: ...to here
liburing-2.13/test/submit-reuse.c:136:15: acquire_resource: opened here
liburing-2.13/test/submit-reuse.c:139:12: branch_false: following ‘false’ branch...
liburing-2.13/test/submit-reuse.c:146:9: branch_false: ...to here
liburing-2.13/test/submit-reuse.c:147:15: throw: if ‘open’ throws an exception...
liburing-2.13/test/submit-reuse.c:147:15: danger: ‘open(fname1, 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  145|   
#  146|   	t_create_file(".reuse.2", FILE_SIZE);
#  147|-> 	fd2 = open(".reuse.2", O_RDONLY);
#  148|   	unlink(".reuse.2");
#  149|   	if (fd2 < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def626]
liburing-2.13/test/submit-reuse.c:149:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname1, 0)’
liburing-2.13/test/submit-reuse.c:117:12: branch_false: following ‘false’ branch...
liburing-2.13/test/submit-reuse.c:122:15: branch_false: ...to here
liburing-2.13/test/submit-reuse.c:122:12: branch_false: following ‘false’ branch...
liburing-2.13/test/submit-reuse.c:129:12: branch_false: ...to here
liburing-2.13/test/submit-reuse.c:136:15: acquire_resource: opened here
liburing-2.13/test/submit-reuse.c:139:12: branch_false: following ‘false’ branch...
liburing-2.13/test/submit-reuse.c:146:9: branch_false: ...to here
liburing-2.13/test/submit-reuse.c:149:12: danger: ‘open(fname1, 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  147|   	fd2 = open(".reuse.2", O_RDONLY);
#  148|   	unlink(".reuse.2");
#  149|-> 	if (fd2 < 0) {
#  150|   		perror("open .reuse.2");
#  151|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def627]
liburing-2.13/test/thread-exit.c:86:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/thread-exit.c:81:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:86:15: branch_false: ...to here
liburing-2.13/test/thread-exit.c:86:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/thread-exit.c:86:15: danger: ‘fds[0]’ leaks here
#   84|   	}
#   85|   
#   86|-> 	ret = io_uring_queue_init(32, &ring, 0);
#   87|   	if (ret) {
#   88|   		fprintf(stderr, "ring setup failed\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def628]
liburing-2.13/test/thread-exit.c:86:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/thread-exit.c:81:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:86:15: branch_false: ...to here
liburing-2.13/test/thread-exit.c:86:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/thread-exit.c:86:15: danger: ‘fds[1]’ leaks here
#   84|   	}
#   85|   
#   86|-> 	ret = io_uring_queue_init(32, &ring, 0);
#   87|   	if (ret) {
#   88|   		fprintf(stderr, "ring setup failed\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def629]
liburing-2.13/test/thread-exit.c:98:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/thread-exit.c:81:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:86:15: branch_false: ...to here
liburing-2.13/test/thread-exit.c:87:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:92:12: branch_false: ...to here
liburing-2.13/test/thread-exit.c:92:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/thread-exit.c:98:17: branch_false: ...to here
liburing-2.13/test/thread-exit.c:98:17: throw: if ‘t_create_file’ throws an exception...
liburing-2.13/test/thread-exit.c:98:17: danger: ‘fds[0]’ leaks here
#   96|   		fname = ".thread.exit";
#   97|   		do_unlink = 1;
#   98|-> 		t_create_file(fname, 4096);
#   99|   	}
#  100|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def630]
liburing-2.13/test/thread-exit.c:98:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/thread-exit.c:81:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:86:15: branch_false: ...to here
liburing-2.13/test/thread-exit.c:87:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:92:12: branch_false: ...to here
liburing-2.13/test/thread-exit.c:92:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/thread-exit.c:98:17: branch_false: ...to here
liburing-2.13/test/thread-exit.c:98:17: throw: if ‘t_create_file’ throws an exception...
liburing-2.13/test/thread-exit.c:98:17: danger: ‘fds[1]’ leaks here
#   96|   		fname = ".thread.exit";
#   97|   		do_unlink = 1;
#   98|-> 		t_create_file(fname, 4096);
#   99|   	}
#  100|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def631]
liburing-2.13/test/thread-exit.c:101:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/thread-exit.c:81:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:86:15: branch_false: ...to here
liburing-2.13/test/thread-exit.c:87:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:92:12: branch_false: ...to here
liburing-2.13/test/thread-exit.c:101:14: throw: if ‘open’ throws an exception...
liburing-2.13/test/thread-exit.c:101:14: danger: ‘fds[0]’ leaks here
#   99|   	}
#  100|   
#  101|-> 	fd = open(fname, O_WRONLY);
#  102|   	if (do_unlink)
#  103|   		unlink(fname);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def632]
liburing-2.13/test/thread-exit.c:101:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/thread-exit.c:81:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:86:15: branch_false: ...to here
liburing-2.13/test/thread-exit.c:87:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:92:12: branch_false: ...to here
liburing-2.13/test/thread-exit.c:101:14: throw: if ‘open’ throws an exception...
liburing-2.13/test/thread-exit.c:101:14: danger: ‘fds[1]’ leaks here
#   99|   	}
#  100|   
#  101|-> 	fd = open(fname, O_WRONLY);
#  102|   	if (do_unlink)
#  103|   		unlink(fname);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def633]
liburing-2.13/test/thread-exit.c:107:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/thread-exit.c:81:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:86:15: branch_false: ...to here
liburing-2.13/test/thread-exit.c:87:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:92:12: branch_false: ...to here
liburing-2.13/test/thread-exit.c:104:12: branch_true: following ‘true’ branch...
liburing-2.13/test/thread-exit.c:105:21: branch_true: ...to here
liburing-2.13/test/thread-exit.c:105:20: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:107:17: branch_false: ...to here
liburing-2.13/test/thread-exit.c:107:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/thread-exit.c:107:17: danger: ‘fds[0]’ leaks here
#  105|   		if (errno == EPERM || errno == EACCES)
#  106|   			goto skip;
#  107|-> 		perror("open");
#  108|   		return 1;
#  109|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def634]
liburing-2.13/test/thread-exit.c:107:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/thread-exit.c:81:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:86:15: branch_false: ...to here
liburing-2.13/test/thread-exit.c:87:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:92:12: branch_false: ...to here
liburing-2.13/test/thread-exit.c:104:12: branch_true: following ‘true’ branch...
liburing-2.13/test/thread-exit.c:105:21: branch_true: ...to here
liburing-2.13/test/thread-exit.c:105:20: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:107:17: branch_false: ...to here
liburing-2.13/test/thread-exit.c:107:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/thread-exit.c:107:17: danger: ‘fds[1]’ leaks here
#  105|   		if (errno == EPERM || errno == EACCES)
#  106|   			goto skip;
#  107|-> 		perror("open");
#  108|   		return 1;
#  109|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def635]
liburing-2.13/test/thread-exit.c:120:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/thread-exit.c:81:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:86:15: branch_false: ...to here
liburing-2.13/test/thread-exit.c:87:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:92:12: branch_false: ...to here
liburing-2.13/test/thread-exit.c:104:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:111:9: branch_false: ...to here
liburing-2.13/test/thread-exit.c:116:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/thread-exit.c:117:17: branch_true: ...to here
liburing-2.13/test/thread-exit.c:120:17: throw: if ‘pthread_join’ throws an exception...
liburing-2.13/test/thread-exit.c:120:17: danger: ‘fds[1]’ leaks here
#  118|   		memset(&thread, 0, sizeof(thread));
#  119|   		pthread_create(&thread, NULL, do_io, &d);
#  120|-> 		pthread_join(thread, NULL);
#  121|   		d.off += WSIZE;
#  122|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def636]
liburing-2.13/test/thread-exit.c:120:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[i]’
liburing-2.13/test/thread-exit.c:81:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:86:15: branch_false: ...to here
liburing-2.13/test/thread-exit.c:87:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:92:12: branch_false: ...to here
liburing-2.13/test/thread-exit.c:104:12: branch_false: following ‘false’ branch...
liburing-2.13/test/thread-exit.c:111:9: branch_false: ...to here
liburing-2.13/test/thread-exit.c:116:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/thread-exit.c:117:17: branch_true: ...to here
liburing-2.13/test/thread-exit.c:116:21: branch_true: following ‘true’ branch (when ‘i != 8’)...
liburing-2.13/test/thread-exit.c:117:17: branch_true: ...to here
liburing-2.13/test/thread-exit.c:120:17: throw: if ‘pthread_join’ throws an exception...
liburing-2.13/test/thread-exit.c:120:17: danger: ‘fds[i]’ leaks here
#  118|   		memset(&thread, 0, sizeof(thread));
#  119|   		pthread_create(&thread, NULL, do_io, &d);
#  120|-> 		pthread_join(thread, NULL);
#  121|   		d.off += WSIZE;
#  122|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def637]
liburing-2.13/test/tty-write-dpoll.c:38:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/ttyS0", 2050)’
liburing-2.13/test/tty-write-dpoll.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/tty-write-dpoll.c:34:14: branch_false: ...to here
liburing-2.13/test/tty-write-dpoll.c:34:14: acquire_resource: opened here
liburing-2.13/test/tty-write-dpoll.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/test/tty-write-dpoll.c:38:15: branch_false: ...to here
liburing-2.13/test/tty-write-dpoll.c:38:15: throw: if ‘t_create_ring’ throws an exception...
liburing-2.13/test/tty-write-dpoll.c:38:15: danger: ‘open("/dev/ttyS0", 2050)’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   36|   		return 0;
#   37|   
#   38|-> 	ret = t_create_ring(SQES, &ring, 0);
#   39|   	if (ret == T_SETUP_SKIP)
#   40|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def638]
liburing-2.13/test/tty-write-dpoll.c:39:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/ttyS0", 2050)’
liburing-2.13/test/tty-write-dpoll.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/tty-write-dpoll.c:34:14: branch_false: ...to here
liburing-2.13/test/tty-write-dpoll.c:34:14: acquire_resource: opened here
liburing-2.13/test/tty-write-dpoll.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/test/tty-write-dpoll.c:38:15: branch_false: ...to here
liburing-2.13/test/tty-write-dpoll.c:39:12: danger: ‘open("/dev/ttyS0", 2050)’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   37|   
#   38|   	ret = t_create_ring(SQES, &ring, 0);
#   39|-> 	if (ret == T_SETUP_SKIP)
#   40|   		return 0;
#   41|   	else if (ret < 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def639]
liburing-2.13/test/tty-write-dpoll.c:41:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/ttyS0", 2050)’
liburing-2.13/test/tty-write-dpoll.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/tty-write-dpoll.c:34:14: branch_false: ...to here
liburing-2.13/test/tty-write-dpoll.c:34:14: acquire_resource: opened here
liburing-2.13/test/tty-write-dpoll.c:35:12: branch_false: following ‘false’ branch...
liburing-2.13/test/tty-write-dpoll.c:38:15: branch_false: ...to here
liburing-2.13/test/tty-write-dpoll.c:39:12: branch_false: following ‘false’ branch (when ‘ret != 1’)...
liburing-2.13/test/tty-write-dpoll.c:41:17: branch_false: ...to here
liburing-2.13/test/tty-write-dpoll.c:41:17: danger: ‘open("/dev/ttyS0", 2050)’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#   39|   	if (ret == T_SETUP_SKIP)
#   40|   		return 0;
#   41|-> 	else if (ret < 0)
#   42|   		return 1;
#   43|   

Error: CPPCHECK_WARNING (CWE-664): [#def640]
liburing-2.13/test/uring_cmd_ublk.c:163: error[va_end_missing]: va_list 'ap' was opened but not closed by va_end().
#  161|   	va_start(ap, fmt);
#  162|   	vfprintf(stderr, fmt, ap);
#  163|-> }
#  164|   
#  165|   static void ublk_dbg(int level, const char *fmt, ...)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def641]
liburing-2.13/test/uring_cmd_ublk.c:163:1: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
liburing-2.13/test/uring_cmd_ublk.c:1217:5: enter_function: entry to ‘main’
liburing-2.13/test/uring_cmd_ublk.c:1224:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/uring_cmd_ublk.c:1227:15: branch_false: ...to here
liburing-2.13/test/uring_cmd_ublk.c:1227:15: call_function: calling ‘ublk_ctrl_init’ from ‘main’
#  161|   	va_start(ap, fmt);
#  162|   	vfprintf(stderr, fmt, ap);
#  163|-> }
#  164|   
#  165|   static void ublk_dbg(int level, const char *fmt, ...)

Error: CPPCHECK_WARNING (CWE-664): [#def642]
liburing-2.13/test/uring_cmd_ublk.c:171: error[va_end_missing]: va_list 'ap' was opened but not closed by va_end().
#  169|   		va_start(ap, fmt);
#  170|   		vfprintf(stdout, fmt, ap);
#  171|->         }
#  172|   }
#  173|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def643]
liburing-2.13/test/uring_cmd_ublk.c:210:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor
liburing-2.13/test/uring_cmd_ublk.c:1217:5: enter_function: entry to ‘main’
liburing-2.13/test/uring_cmd_ublk.c:1224:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/uring_cmd_ublk.c:1227:15: branch_false: ...to here
liburing-2.13/test/uring_cmd_ublk.c:1227:15: call_function: calling ‘ublk_ctrl_init’ from ‘main’
#  208|   	p.cq_entries = cq_depth;
#  209|   
#  210|-> 	return io_uring_queue_init_params(depth, r, &p);
#  211|   }
#  212|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def644]
liburing-2.13/test/uring_cmd_ublk.c:210:16: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
liburing-2.13/test/uring_cmd_ublk.c:1217:5: enter_function: entry to ‘main’
liburing-2.13/test/uring_cmd_ublk.c:1224:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/uring_cmd_ublk.c:1227:15: branch_false: ...to here
liburing-2.13/test/uring_cmd_ublk.c:1227:15: call_function: calling ‘ublk_ctrl_init’ from ‘main’
#  208|   	p.cq_entries = cq_depth;
#  209|   
#  210|-> 	return io_uring_queue_init_params(depth, r, &p);
#  211|   }
#  212|   

Error: CPPCHECK_WARNING (CWE-476): [#def645]
liburing-2.13/test/uring_cmd_ublk.c:356: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dev
#  354|   	int ret;
#  355|   
#  356|-> 	dev->ctrl_fd = open(CTRL_DEV, O_RDWR);
#  357|   	if (dev->ctrl_fd < 0) {
#  358|   		free(dev);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def646]
liburing-2.13/test/uring_cmd_ublk.c:356:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘dev’
liburing-2.13/test/uring_cmd_ublk.c:1217:5: enter_function: entry to ‘main’
liburing-2.13/test/uring_cmd_ublk.c:1224:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/uring_cmd_ublk.c:1227:15: branch_false: ...to here
liburing-2.13/test/uring_cmd_ublk.c:1227:15: call_function: calling ‘ublk_ctrl_init’ from ‘main’
#  354|   	int ret;
#  355|   
#  356|-> 	dev->ctrl_fd = open(CTRL_DEV, O_RDWR);
#  357|   	if (dev->ctrl_fd < 0) {
#  358|   		free(dev);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def647]
liburing-2.13/test/uring_cmd_ublk.c:356:24: warning[-Wanalyzer-malloc-leak]: leak of ‘dev’
liburing-2.13/test/uring_cmd_ublk.c:1217:5: enter_function: entry to ‘main’
liburing-2.13/test/uring_cmd_ublk.c:1224:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/uring_cmd_ublk.c:1227:15: branch_false: ...to here
liburing-2.13/test/uring_cmd_ublk.c:1227:15: call_function: calling ‘ublk_ctrl_init’ from ‘main’
#  354|   	int ret;
#  355|   
#  356|-> 	dev->ctrl_fd = open(CTRL_DEV, O_RDWR);
#  357|   	if (dev->ctrl_fd < 0) {
#  358|   		free(dev);

Error: CPPCHECK_WARNING (CWE-476): [#def648]
liburing-2.13/test/uring_cmd_ublk.c:357: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dev
#  355|   
#  356|   	dev->ctrl_fd = open(CTRL_DEV, O_RDWR);
#  357|-> 	if (dev->ctrl_fd < 0) {
#  358|   		free(dev);
#  359|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def649]
liburing-2.13/test/vec-regbuf.c:96:15: warning[-Wanalyzer-malloc-leak]: leak of ‘bd.buf_rd’
liburing-2.13/test/vec-regbuf.c:576:5: enter_function: entry to ‘main’
liburing-2.13/test/vec-regbuf.c:581:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)...
liburing-2.13/test/vec-regbuf.c:584:19: branch_false: ...to here
liburing-2.13/test/vec-regbuf.c:586:9: call_function: calling ‘probe_support’ from ‘main’
liburing-2.13/test/vec-regbuf.c:586:9: return_function: returning to ‘main’ from ‘probe_support’
liburing-2.13/test/vec-regbuf.c:587:12: branch_true: following ‘true’ branch...
liburing-2.13/test/vec-regbuf.c:592:27: branch_true: ...to here
liburing-2.13/test/vec-regbuf.c:592:9: call_function: calling ‘init_buffers’ from ‘main’
liburing-2.13/test/vec-regbuf.c:592:9: return_function: returning to ‘main’ from ‘init_buffers’
liburing-2.13/test/vec-regbuf.c:595:21: branch_true: following ‘true’ branch (when ‘i != 2’)...
liburing-2.13/test/vec-regbuf.c:596:22: branch_true: ...to here
liburing-2.13/test/vec-regbuf.c:600:17: call_function: calling ‘test_basic’ from ‘main’
#   94|   	}
#   95|   
#   96|-> 	ret = io_uring_queue_init(32, ring, 0);
#   97|   	if (ret) {
#   98|   		fprintf(stderr, "ring init error %i\n", ret);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def650]
liburing-2.13/test/wakeup-hang.c:71:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/wakeup-hang.c:68:12: branch_false: following ‘false’ branch...
liburing-2.13/test/wakeup-hang.c:71:15: branch_false: ...to here
liburing-2.13/test/wakeup-hang.c:71:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/wakeup-hang.c:71:15: danger: ‘fds[0]’ leaks here
#   69|   		error_exit("eventfd");
#   70|   
#   71|-> 	ret = io_uring_queue_init(8, &ring, 0);
#   72|   	if (ret) {
#   73|   		fprintf(stderr, "Unable to setup io_uring: %s\n", strerror(-ret));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def651]
liburing-2.13/test/wakeup-hang.c:71:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/wakeup-hang.c:68:12: branch_false: following ‘false’ branch...
liburing-2.13/test/wakeup-hang.c:71:15: branch_false: ...to here
liburing-2.13/test/wakeup-hang.c:71:15: throw: if ‘io_uring_queue_init’ throws an exception...
liburing-2.13/test/wakeup-hang.c:71:15: danger: ‘fds[1]’ leaks here
#   69|   		error_exit("eventfd");
#   70|   
#   71|-> 	ret = io_uring_queue_init(8, &ring, 0);
#   72|   	if (ret) {
#   73|   		fprintf(stderr, "Unable to setup io_uring: %s\n", strerror(-ret));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def652]
liburing-2.13/test/wakeup-hang.c:74:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
liburing-2.13/test/wakeup-hang.c:68:12: branch_false: following ‘false’ branch...
liburing-2.13/test/wakeup-hang.c:71:15: branch_false: ...to here
liburing-2.13/test/wakeup-hang.c:72:12: branch_true: following ‘true’ branch...
liburing-2.13/test/wakeup-hang.c:73:17: branch_true: ...to here
liburing-2.13/test/wakeup-hang.c:74:24: danger: ‘fds[0]’ leaks here
#   72|   	if (ret) {
#   73|   		fprintf(stderr, "Unable to setup io_uring: %s\n", strerror(-ret));
#   74|-> 		return 1;
#   75|   	}
#   76|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def653]
liburing-2.13/test/wakeup-hang.c:74:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
liburing-2.13/test/wakeup-hang.c:68:12: branch_false: following ‘false’ branch...
liburing-2.13/test/wakeup-hang.c:71:15: branch_false: ...to here
liburing-2.13/test/wakeup-hang.c:72:12: branch_true: following ‘true’ branch...
liburing-2.13/test/wakeup-hang.c:73:17: branch_true: ...to here
liburing-2.13/test/wakeup-hang.c:74:24: danger: ‘fds[1]’ leaks here
#   72|   	if (ret) {
#   73|   		fprintf(stderr, "Unable to setup io_uring: %s\n", strerror(-ret));
#   74|-> 		return 1;
#   75|   	}
#   76|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def654]
liburing-2.13/test/wq-aff.c:32:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&comm, 0)’
liburing-2.13/test/wq-aff.c:24:14: acquire_resource: opened here
liburing-2.13/test/wq-aff.c:25:12: branch_false: following ‘false’ branch...
liburing-2.13/test/wq-aff.c:30:15: branch_false: ...to here
liburing-2.13/test/wq-aff.c:31:12: branch_true: following ‘true’ branch (when ‘ret < 0’)...
liburing-2.13/test/wq-aff.c:32:17: branch_true: ...to here
liburing-2.13/test/wq-aff.c:32:17: danger: ‘open(&comm, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   30|   	ret = read(fd, buf, sizeof(buf));
#   31|   	if (ret < 0) {
#   32|-> 		close(fd);
#   33|   		return T_EXIT_SKIP;
#   34|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def655]
liburing-2.13/test/wq-aff.c:36:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&comm, 0)’
liburing-2.13/test/wq-aff.c:24:14: acquire_resource: opened here
liburing-2.13/test/wq-aff.c:25:12: branch_false: following ‘false’ branch...
liburing-2.13/test/wq-aff.c:30:15: branch_false: ...to here
liburing-2.13/test/wq-aff.c:31:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/wq-aff.c:36:32: branch_false: ...to here
liburing-2.13/test/wq-aff.c:36:12: branch_true: following ‘true’ branch...
liburing-2.13/test/wq-aff.c:37:17: branch_true: ...to here
liburing-2.13/test/wq-aff.c:36:13: danger: ‘open(&comm, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   34|   	}
#   35|   
#   36|-> 	if (strncmp(buf, name, strlen(name) - 1)) {
#   37|   		close(fd);
#   38|   		return T_EXIT_SKIP;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def656]
liburing-2.13/test/zcrx.c:514:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/zcrx.c:497:18: acquire_resource: stream socket created here
liburing-2.13/test/zcrx.c:498:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/zcrx.c:503:9: branch_false: ...to here
liburing-2.13/test/zcrx.c:507:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/zcrx.c:512:15: branch_false: ...to here
liburing-2.13/test/zcrx.c:513:12: branch_true: following ‘true’ branch (when ‘ret < 0’)...
liburing-2.13/test/zcrx.c:514:17: branch_true: ...to here
liburing-2.13/test/zcrx.c:514:17: throw: if ‘perror’ throws an exception...
liburing-2.13/test/zcrx.c:514:17: danger: ‘sockfd’ leaks here
#  512|   	ret = listen(sockfd, 1);
#  513|   	if (ret < 0) {
#  514|-> 		perror("listen");
#  515|   		goto err;
#  516|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def657]
liburing-2.13/test/zcrx.c:521:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/zcrx.c:497:18: acquire_resource: stream socket created here
liburing-2.13/test/zcrx.c:498:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/zcrx.c:503:9: branch_false: ...to here
liburing-2.13/test/zcrx.c:507:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/zcrx.c:512:15: branch_false: ...to here
liburing-2.13/test/zcrx.c:513:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/zcrx.c:518:9: branch_false: ...to here
liburing-2.13/test/zcrx.c:521:18: throw: if ‘accept’ throws an exception...
liburing-2.13/test/zcrx.c:521:18: danger: ‘sockfd’ leaks here
#  519|   
#  520|   	socklen = sizeof(saddr);
#  521|-> 	use_fd = accept(sockfd, (struct sockaddr *)&saddr, &socklen);
#  522|   	if (use_fd < 0) {
#  523|   		perror("accept");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def658]
liburing-2.13/test/zcrx.c:546:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/zcrx.c:497:18: acquire_resource: stream socket created here
liburing-2.13/test/zcrx.c:498:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/zcrx.c:503:9: branch_false: ...to here
liburing-2.13/test/zcrx.c:507:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)...
liburing-2.13/test/zcrx.c:512:15: branch_false: ...to here
liburing-2.13/test/zcrx.c:513:12: branch_true: following ‘true’ branch (when ‘ret < 0’)...
liburing-2.13/test/zcrx.c:514:17: branch_true: ...to here
liburing-2.13/test/zcrx.c:546:9: throw: if ‘close’ throws an exception...
liburing-2.13/test/zcrx.c:546:9: danger: ‘sockfd’ leaks here
#  544|   	return 0;
#  545|   err:
#  546|-> 	close(sockfd);
#  547|   	return 1;
#  548|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def659]
liburing-2.13/test/zcrx.c:746:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’
liburing-2.13/test/zcrx.c:728:12: branch_false: following ‘false’ branch...
liburing-2.13/test/zcrx.c:733:9: branch_false: ...to here
liburing-2.13/test/zcrx.c:738:18: acquire_resource: stream socket created here
liburing-2.13/test/zcrx.c:739:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)...
liburing-2.13/test/zcrx.c:744:9: branch_false: ...to here
liburing-2.13/test/zcrx.c:746:15: throw: if ‘connect’ throws an exception...
liburing-2.13/test/zcrx.c:746:15: danger: ‘sockfd’ leaks here
#  744|   	pthread_barrier_wait(&rd->connect);
#  745|   
#  746|-> 	ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr));
#  747|   	if (ret < 0) {
#  748|   		perror("connect");

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-54.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameliburing-2.13-1.fc44
store-results-to/tmp/tmpeajeqw92/liburing-2.13-1.fc44.tar.xz
time-created2026-01-08 19:23:37
time-finished2026-01-08 19:25:33
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpeajeqw92/liburing-2.13-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpeajeqw92/liburing-2.13-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9