<86>Jan 7 03:08:13 userdel[1798160]: delete user 'rooter' <86>Jan 7 03:08:13 userdel[1798160]: removed group 'rooter' owned by 'rooter' <86>Jan 7 03:08:13 userdel[1798160]: removed shadow group 'rooter' owned by 'rooter' <86>Jan 7 03:08:13 groupadd[1798172]: group added to /etc/group: name=rooter, GID=1847 <86>Jan 7 03:08:13 groupadd[1798172]: group added to /etc/gshadow: name=rooter <86>Jan 7 03:08:13 groupadd[1798172]: new group: name=rooter, GID=1847 <86>Jan 7 03:08:13 useradd[1798184]: new user: name=rooter, UID=1847, GID=1847, home=/root, shell=/bin/bash <86>Jan 7 03:08:13 userdel[1798193]: delete user 'builder' <86>Jan 7 03:08:13 userdel[1798193]: removed group 'builder' owned by 'builder' <86>Jan 7 03:08:13 userdel[1798193]: removed shadow group 'builder' owned by 'builder' <86>Jan 7 03:08:13 groupadd[1798204]: group added to /etc/group: name=builder, GID=1848 <86>Jan 7 03:08:13 groupadd[1798204]: group added to /etc/gshadow: name=builder <86>Jan 7 03:08:13 groupadd[1798204]: new group: name=builder, GID=1848 <86>Jan 7 03:08:13 useradd[1798210]: new user: name=builder, UID=1848, GID=1848, home=/usr/src, shell=/bin/bash <13>Jan 7 03:08:16 rpmi: gcc-c++-common-1.4.27-alt1 sisyphus+278099.1300.1.1 1626028636 installed <13>Jan 7 03:08:16 rpmi: libstdc++10-devel-10.3.1-alt2 sisyphus+277353.100.2.1 1625525890 installed <13>Jan 7 03:08:16 rpmi: gcc10-c++-10.3.1-alt2 sisyphus+277353.100.2.1 1625525890 installed <13>Jan 7 03:08:16 rpmi: gcc-c++-10-alt1 sisyphus+263054.200.3.1 1607517515 installed Building target platforms: x86_64 Building for target x86_64 Wrote: /usr/src/in/nosrpm/liburing-2.2-alt1.nosrc.rpm (w1.gzdio) Installing liburing-2.2-alt1.src.rpm Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.10625 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf liburing-2.2 + echo 'Source #0 (liburing-2.2.tar):' Source #0 (liburing-2.2.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/liburing-2.2.tar + cd liburing-2.2 + /bin/chmod -c -Rf u+rwX,go-w . + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.10625 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd liburing-2.2 + ./configure --prefix=/usr --includedir=/usr/include --libdir=/usr/lib64 --libdevdir=/usr/lib64 --mandir=/usr/share/man prefix /usr includedir /usr/include libdir /usr/lib64 libdevdir /usr/lib64 relativelibdir mandir /usr/share/man datadir /usr/share stringop_overflow yes array_bounds yes __kernel_rwf_t yes __kernel_timespec yes open_how yes statx yes glibc_statx yes C++ yes has_ucontext yes has_memfd_create yes liburing_nolibc no CC gcc CXX g++ + make -j16 --no-print-directory 'CFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer' V=1 gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "syscall.os" -MMD -MP -MF "syscall.os.d" -fPIC -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o syscall.os syscall.c gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "syscall.ol" -MMD -MP -MF "syscall.ol.d" -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o syscall.ol syscall.c gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "register.ol" -MMD -MP -MF "register.ol.d" -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o register.ol register.c gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "register.os" -MMD -MP -MF "register.os.d" -fPIC -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o register.os register.c gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "setup.os" -MMD -MP -MF "setup.os.d" -fPIC -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o setup.os setup.c gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "setup.ol" -MMD -MP -MF "setup.ol.d" -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o setup.ol setup.c gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "queue.os" -MMD -MP -MF "queue.os.d" -fPIC -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o queue.os queue.c gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "queue.ol" -MMD -MP -MF "queue.ol.d" -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o queue.ol queue.c ar r liburing.a setup.ol queue.ol register.ol syscall.ol ar: creating liburing.a ranlib liburing.a gcc -fPIC -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -shared -Wl,--version-script=liburing.map -Wl,-soname=liburing.so.2 -o liburing.so.2.2 setup.os queue.os register.os syscall.os gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o ../src/syscall.o -c ../src/syscall.c gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o helpers.o -c helpers.c gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o 917257daa0fe.t 917257daa0fe.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o a0908ae19763.t a0908ae19763.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o accept-test.t accept-test.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o b5837bd5311d.t b5837bd5311d.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o b19062a56726.t b19062a56726.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o 500f9fbadef8.t 500f9fbadef8.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o accept-reuse.t accept-reuse.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o 232c93d07b74.t 232c93d07b74.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o across-fork.t across-fork.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o 7ad0e4b2f83c.t 7ad0e4b2f83c.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from 7ad0e4b2f83c.c:5: In function 'main': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-5 | |7ad0e4b2f83c.c:32:5: | 32 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 42 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 45 | ret = io_uring_queue_init(32, &ring, 0); | | ~~~ | | | | | (3) ...to here | 46 | if (ret) { | | ~ | | | | | (4) following 'false' branch (when 'ret == 0')... |...... | 51 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (5) ...to here | 'main': event 6 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (6) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 7-9 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (7) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (8) following 'true' branch... | 1076 | shift = 1; | | ~~~~~ | | | | | (9) ...to here | <------+ | 'main': event 10 | | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (10) returning to 'main' from '_io_uring_get_sqe' | 'main': events 11-14 | |7ad0e4b2f83c.c:54:5: | 54 | if (ret != 1) { | | ^ | | | | | (11) following 'false' branch (when 'ret == 1')... |...... | 60 | ts1.tv_sec = 5, | | ~~~ | | | | | (12) ...to here |...... | 63 | if (ret) { | | ~ | | | | | (13) following 'false' branch (when 'ret == 0')... |...... | 67 | io_uring_cqe_seen(&ring, cqe); | | ~~~~~~~~~~~~~~~~~ | | | | | (14) ...to here | 'main': event 15 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (15) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 16-19 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (16) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (17) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (19) following 'false' branch... | | (18) ...to here | '_io_uring_get_sqe': event 20 | |cc1: | (20): ...to here | '_io_uring_get_sqe': event 21 | |cc1: | (21): '' is NULL | <------+ | 'main': events 22-23 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (23) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (22) return of NULL to 'main' from '_io_uring_get_sqe' | ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-5 | |7ad0e4b2f83c.c:32:5: | 32 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 42 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 45 | ret = io_uring_queue_init(32, &ring, 0); | | ~~~ | | | | | (3) ...to here | 46 | if (ret) { | | ~ | | | | | (4) following 'false' branch (when 'ret == 0')... |...... | 51 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (5) ...to here | 'main': event 6 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (6) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 7-10 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (7) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (8) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (10) following 'false' branch... | | (9) ...to here | '_io_uring_get_sqe': event 11 | |cc1: | (11): ...to here | '_io_uring_get_sqe': event 12 | |cc1: | (12): '' is NULL | <------+ | 'main': events 13-14 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (14) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (13) return of NULL to 'main' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o 8a9973408177.t 8a9973408177.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o cq-size.t cq-size.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o cq-full.t cq-full.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o a4c0b3decb33.t a4c0b3decb33.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o cq-peek-batch.t cq-peek-batch.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o accept-link.t accept-link.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o cq-ready.t cq-ready.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o connect.t connect.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o d77a67ed5f27.t d77a67ed5f27.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o empty-eownerdead.t empty-eownerdead.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o double-poll-crash.t double-poll-crash.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o eeed8b54e0df.t eeed8b54e0df.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o exec-target.t exec-target.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o eventfd-reg.t eventfd-reg.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o eventfd-disable.t eventfd-disable.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from eventfd-disable.c:15: ../src/include/liburing.h: In function 'main': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-10 | |eventfd-disable.c:17:5: | 17 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 30 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 33 | ret = io_uring_queue_init_params(64, &ring, &p); | | ~~~ | | | | | (3) ...to here | 34 | if (ret) { | | ~ | | | | | (4) following 'false' branch (when 'ret == 0')... |...... | 39 | evfd = eventfd(0, EFD_CLOEXEC); | | ~~~~ | | | | | (5) ...to here | 40 | if (evfd < 0) { | | ~ | | | | | (6) following 'false' branch (when 'evfd >= 0')... |...... | 45 | ret = io_uring_register_eventfd(&ring, evfd); | | ~~~ | | | | | (7) ...to here | 46 | if (ret) { | | ~ | | | | | (8) following 'false' branch (when 'ret == 0')... |...... | 51 | if (!io_uring_cq_eventfd_enabled(&ring)) { | | ~~ | | | | | (9) ...to here |...... | 56 | ret = io_uring_cq_eventfd_toggle(&ring, false); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (10) calling 'io_uring_cq_eventfd_toggle' from 'main' | +--> 'io_uring_cq_eventfd_toggle': events 11-14 | |../src/include/liburing.h:953:19: | 943 | if (!ring->cq.kflags) | | ~ | | | | | (12) following 'false' branch... |...... | 946 | return !(*ring->cq.kflags & IORING_CQ_EVENTFD_DISABLED); | | ~~~~~~ | | | | | (13) ...to here |...... | 953 | static inline int io_uring_cq_eventfd_toggle(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (11) entry to 'io_uring_cq_eventfd_toggle' |...... | 958 | if (!!enabled == io_uring_cq_eventfd_enabled(ring)) | | ~ | | | | | (14) following 'true' branch... | 'io_uring_cq_eventfd_toggle': event 15 | |cc1: | (15): ...to here | <------+ | 'main': events 16-18 | |eventfd-disable.c:56:8: | 56 | ret = io_uring_cq_eventfd_toggle(&ring, false); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (16) returning to 'main' from 'io_uring_cq_eventfd_toggle' | 57 | if (ret) { | | ~ | | | | | (17) following 'false' branch (when 'ret == 0')... |...... | 62 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (18) ...to here | 'main': event 19 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 20-23 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (20) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (21) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (23) following 'false' branch... | | (22) ...to here | '_io_uring_get_sqe': event 24 | |cc1: | (24): ...to here | '_io_uring_get_sqe': event 25 | |cc1: | (25): '' is NULL | <------+ | 'main': events 26-27 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (27) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (26) return of NULL to 'main' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o ce593a6c480a.t ce593a6c480a.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from ce593a6c480a.c:13: In function 'main': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-13 | |ce593a6c480a.c:37:5: | 37 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 48 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 54 | loop_fd = eventfd(0, EFD_CLOEXEC); | | ~~~~~~~ | | | | | (3) ...to here | 55 | if (loop_fd == -1) { | | ~ | | | | | (4) following 'false' branch (when 'loop_fd != -1')... |...... | 61 | use_fd = other_fd = eventfd(0, EFD_CLOEXEC); | | ~~~~~~ | | | | | (5) ...to here | 62 | if (other_fd == -1) { | | ~ | | | | | (6) following 'false' branch... |...... | 67 | if (use_sqpoll) | | ~~ | | | | | (7) ...to here |...... | 72 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (8) following 'false' branch (when 'ret != 1')... | 73 | return 0; | 74 | else if (ret < 0) | | ~~ ~ | | | | | | | (10) following 'false' branch (when 'ret >= 0')... | | (9) ...to here |...... | 77 | ret = io_uring_register_eventfd(&ring, loop_fd); | | ~~~ | | | | | (11) ...to here | 78 | if (ret < 0) { | | ~ | | | | | (12) following 'false' branch (when 'ret >= 0')... |...... | 83 | if (use_sqpoll) { | | ~~ | | | | | (13) ...to here | 'main': event 14 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (14) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 15-18 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (15) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (16) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (18) following 'false' branch... | | (17) ...to here | '_io_uring_get_sqe': event 19 | |cc1: | (19): ...to here | '_io_uring_get_sqe': event 20 | |cc1: | (20): '' is NULL | <------+ | 'main': events 21-22 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (22) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (21) return of NULL to 'main' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o drop-submit.t drop-submit.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o eventfd.t eventfd.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from eventfd.c:15: In function 'main': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-11 | |eventfd.c:17:5: | 17 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 30 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 33 | ret = io_uring_queue_init_params(8, &ring, &p); | | ~~~ | | | | | (3) ...to here | 34 | if (ret) { | | ~ | | | | | (4) following 'false' branch (when 'ret == 0')... |...... | 38 | if (!(p.features & IORING_FEAT_CUR_PERSONALITY)) { | | ~~ ~ | | | | | | | (6) following 'false' branch... | | (5) ...to here |...... | 43 | evfd = eventfd(0, EFD_CLOEXEC); | | ~~~~ | | | | | (7) ...to here | 44 | if (evfd < 0) { | | ~ | | | | | (8) following 'false' branch (when 'evfd >= 0')... |...... | 49 | ret = io_uring_register_eventfd(&ring, evfd); | | ~~~ | | | | | (9) ...to here | 50 | if (ret) { | | ~ | | | | | (10) following 'false' branch (when 'ret == 0')... |...... | 55 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (11) ...to here | 'main': event 12 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (12) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 13-16 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (13) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (14) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (16) following 'false' branch... | | (15) ...to here | '_io_uring_get_sqe': event 17 | |cc1: | (17): ...to here | <------+ | 'main': events 18-19 | | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (18) returning to 'main' from '_io_uring_get_sqe' | | (19) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 20-23 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (20) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (21) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (23) following 'false' branch... | | (22) ...to here | '_io_uring_get_sqe': event 24 | |cc1: | (24): ...to here | '_io_uring_get_sqe': event 25 | |cc1: | (25): '' is NULL | <------+ | 'main': events 26-27 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (27) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (26) return of NULL to 'main' from '_io_uring_get_sqe' | ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-11 | |eventfd.c:17:5: | 17 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 30 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 33 | ret = io_uring_queue_init_params(8, &ring, &p); | | ~~~ | | | | | (3) ...to here | 34 | if (ret) { | | ~ | | | | | (4) following 'false' branch (when 'ret == 0')... |...... | 38 | if (!(p.features & IORING_FEAT_CUR_PERSONALITY)) { | | ~~ ~ | | | | | | | (6) following 'false' branch... | | (5) ...to here |...... | 43 | evfd = eventfd(0, EFD_CLOEXEC); | | ~~~~ | | | | | (7) ...to here | 44 | if (evfd < 0) { | | ~ | | | | | (8) following 'false' branch (when 'evfd >= 0')... |...... | 49 | ret = io_uring_register_eventfd(&ring, evfd); | | ~~~ | | | | | (9) ...to here | 50 | if (ret) { | | ~ | | | | | (10) following 'false' branch (when 'ret == 0')... |...... | 55 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (11) ...to here | 'main': event 12 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (12) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 13-16 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (13) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (14) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (16) following 'false' branch... | | (15) ...to here | '_io_uring_get_sqe': event 17 | |cc1: | (17): ...to here | '_io_uring_get_sqe': event 18 | |cc1: | (18): '' is NULL | <------+ | 'main': events 19-20 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (20) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) return of NULL to 'main' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o close-opath.t close-opath.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o d4ae271dfaae.t d4ae271dfaae.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o eventfd-ring.t eventfd-ring.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from eventfd-ring.c:15: In function 'main': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-17 | |eventfd-ring.c:17:5: | 17 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 24 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 27 | ret = io_uring_queue_init_params(8, &ring1, &p); | | ~~~ | | | | | (3) ...to here | 28 | if (ret) { | | ~ | | | | | (4) following 'false' branch (when 'ret == 0')... |...... | 32 | if (!(p.features & IORING_FEAT_CUR_PERSONALITY)) { | | ~~ ~ | | | | | | | (6) following 'false' branch... | | (5) ...to here |...... | 36 | ret = io_uring_queue_init(8, &ring2, 0); | | ~~~ | | | | | (7) ...to here | 37 | if (ret) { | | ~ | | | | | (8) following 'false' branch (when 'ret == 0')... |...... | 42 | evfd1 = eventfd(0, EFD_CLOEXEC); | | ~~~~~ | | | | | (9) ...to here | 43 | if (evfd1 < 0) { | | ~ | | | | | (10) following 'false' branch (when 'evfd1 >= 0')... |...... | 48 | evfd2 = eventfd(0, EFD_CLOEXEC); | | ~~~~~ | | | | | (11) ...to here | 49 | if (evfd2 < 0) { | | ~ | | | | | (12) following 'false' branch (when 'evfd2 >= 0')... |...... | 54 | ret = io_uring_register_eventfd(&ring1, evfd1); | | ~~~ | | | | | (13) ...to here | 55 | if (ret) { | | ~ | | | | | (14) following 'false' branch (when 'ret == 0')... |...... | 60 | ret = io_uring_register_eventfd(&ring2, evfd2); | | ~~~ | | | | | (15) ...to here | 61 | if (ret) { | | ~ | | | | | (16) following 'false' branch (when 'ret == 0')... |...... | 66 | sqe = io_uring_get_sqe(&ring1); | | ~~~ | | | | | (17) ...to here | 'main': event 18 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (18) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 19-22 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (19) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (20) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (22) following 'false' branch... | | (21) ...to here | '_io_uring_get_sqe': event 23 | |cc1: | (23): ...to here | '_io_uring_get_sqe': event 24 | |cc1: | (24): '' is NULL | <------+ | 'main': events 25-26 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (26) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (25) return of NULL to 'main' from '_io_uring_get_sqe' | ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-17 | |eventfd-ring.c:17:5: | 17 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 24 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 27 | ret = io_uring_queue_init_params(8, &ring1, &p); | | ~~~ | | | | | (3) ...to here | 28 | if (ret) { | | ~ | | | | | (4) following 'false' branch (when 'ret == 0')... |...... | 32 | if (!(p.features & IORING_FEAT_CUR_PERSONALITY)) { | | ~~ ~ | | | | | | | (6) following 'false' branch... | | (5) ...to here |...... | 36 | ret = io_uring_queue_init(8, &ring2, 0); | | ~~~ | | | | | (7) ...to here | 37 | if (ret) { | | ~ | | | | | (8) following 'false' branch (when 'ret == 0')... |...... | 42 | evfd1 = eventfd(0, EFD_CLOEXEC); | | ~~~~~ | | | | | (9) ...to here | 43 | if (evfd1 < 0) { | | ~ | | | | | (10) following 'false' branch (when 'evfd1 >= 0')... |...... | 48 | evfd2 = eventfd(0, EFD_CLOEXEC); | | ~~~~~ | | | | | (11) ...to here | 49 | if (evfd2 < 0) { | | ~ | | | | | (12) following 'false' branch (when 'evfd2 >= 0')... |...... | 54 | ret = io_uring_register_eventfd(&ring1, evfd1); | | ~~~ | | | | | (13) ...to here | 55 | if (ret) { | | ~ | | | | | (14) following 'false' branch (when 'ret == 0')... |...... | 60 | ret = io_uring_register_eventfd(&ring2, evfd2); | | ~~~ | | | | | (15) ...to here | 61 | if (ret) { | | ~ | | | | | (16) following 'false' branch (when 'ret == 0')... |...... | 66 | sqe = io_uring_get_sqe(&ring1); | | ~~~ | | | | | (17) ...to here | 'main': event 18 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (18) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 19-22 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (19) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (20) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (22) following 'false' branch... | | (21) ...to here | '_io_uring_get_sqe': event 23 | |cc1: | (23): ...to here | <------+ | 'main': events 24-25 | | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (24) returning to 'main' from '_io_uring_get_sqe' | | (25) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 26-29 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (26) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (27) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (29) following 'false' branch... | | (28) ...to here | '_io_uring_get_sqe': event 30 | |cc1: | (30): ...to here | '_io_uring_get_sqe': event 31 | |cc1: | (31): '' is NULL | <------+ | 'main': events 32-33 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (33) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (32) return of NULL to 'main' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o exit-no-cleanup.t exit-no-cleanup.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o fc2a85cb02ef.t fc2a85cb02ef.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o fixed-link.t fixed-link.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from helpers.h:12, from fixed-link.c:10: In function 'main': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-6 | |fixed-link.c:15:5: | 15 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 21 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 24 | fd = open("/dev/zero", O_RDONLY); | | ~~ | | | | | (3) ...to here | 25 | if (fd < 0) { | | ~ | | | | | (4) following 'false' branch... |...... | 30 | if (io_uring_queue_init(32, &ring, 0) < 0) { | | ~~ ~ | | | | | | | (6) following 'false' branch... | | (5) ...to here | 'main': event 7 | |cc1: | (7): ...to here | 'main': events 8-10 | | 36 | for (i = 0; i < IOVECS_LEN; ++i) { | | ^~~ | | | | | (8) following 'true' branch (when 'i != 2')... | 37 | iovecs[i].iov_base = t_malloc(64); | | ~~~~~~ | | | | | (9) ...to here |...... | 42 | if (ret) { | | ~ | | | | | (10) following 'false' branch (when 'ret == 0')... | 'main': event 11 | |cc1: | (11): ...to here | 'main': events 12-13 | | 47 | for (i = 0; i < IOVECS_LEN; ++i) { | | ^~~ | | | | | (12) following 'true' branch (when 'i != 2')... | 48 | struct io_uring_sqe *sqe = io_uring_get_sqe(&ring); | | ~~~~~~ | | | | | (13) ...to here | 'main': event 14 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (14) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 15-16 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (15) entry to '_io_uring_get_sqe' |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~ | | | | | (16) following 'false' branch... | '_io_uring_get_sqe': event 17 | |cc1: | (17): ...to here | '_io_uring_get_sqe': event 18 | |cc1: | (18): '' is NULL | <------+ | 'main': events 19-20 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (20) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) return of NULL to 'main' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o 35fa71a030ca.t 35fa71a030ca.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o fixed-reuse.t fixed-reuse.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from fixed-reuse.c:15: In function 'test': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-10 | |fixed-reuse.c:120:5: | 120 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 126 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 129 | ret = io_uring_queue_init_params(8, &ring, &p); | | ~~~ | | | | | (3) ...to here | 130 | if (ret) { | | ~ | | | | | (4) following 'false' branch (when 'ret == 0')... |...... | 134 | if (!(p.features & IORING_FEAT_CQE_SKIP)) | | ~~ ~ | | | | | | | (6) following 'false' branch... | | (5) ...to here |...... | 137 | memset(files, -1, sizeof(files)); | | ~~~~~~ | | | | | (7) ...to here | 138 | ret = io_uring_register_files(&ring, files, ARRAY_SIZE(files)); | 139 | if (ret) { | | ~ | | | | | (8) following 'false' branch (when 'ret == 0')... |...... | 144 | t_create_file_pattern(FNAME1, 4096, PAT1); | | ~~~~~~~~~~~~~~~~~~~~~ | | | | | (9) ...to here |...... | 147 | ret = test(&ring); | | ~~~~~~~~~~~ | | | | | (10) calling 'test' from 'main' | +--> 'test': event 11 | | 25 | static int test(struct io_uring *ring) | | ^~~~ | | | | | (11) entry to 'test' | 'test': event 12 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (12) calling '_io_uring_get_sqe' from 'test' | +--> '_io_uring_get_sqe': events 13-16 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (13) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (14) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (16) following 'false' branch... | | (15) ...to here | '_io_uring_get_sqe': event 17 | |cc1: | (17): ...to here | '_io_uring_get_sqe': event 18 | |cc1: | (18): '' is NULL | <------+ | 'test': events 19-20 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (20) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) return of NULL to 'test' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o files-exit-hang-timeout.t files-exit-hang-timeout.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from files-exit-hang-timeout.c:17: files-exit-hang-timeout.c: In function 'add_timeout': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-10 | |files-exit-hang-timeout.c:66:5: | 66 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 74 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 77 | sock_listen_fd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0); | | ~~~~~~~~~~~~~~ | | | | | (3) ...to here | 78 | if (sock_listen_fd < 0) { | | ~ | | | | | (4) following 'false' branch (when 'sock_listen_fd >= 0')... |...... | 83 | setsockopt(sock_listen_fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); | | ~~~~~~~~~~ | | | | | (5) ...to here |...... | 93 | if (!ret) | | ~ | | | | | (6) following 'true' branch (when 'ret == 0')... |...... | 105 | if (listen(sock_listen_fd, BACKLOG) < 0) { | | ~~ ~ | | | | | | | (8) following 'false' branch... | | (7) ...to here |...... | 110 | if (setup_io_uring()) | | ~~ ~~~~~~~~~~~~~~~~ | | | | | | | (10) calling 'setup_io_uring' from 'main' | | (9) ...to here | +--> 'setup_io_uring': events 11-12 | | 48 | static int setup_io_uring(void) | | ^~~~~~~~~~~~~~ | | | | | (11) entry to 'setup_io_uring' |...... | 53 | if (ret) { | | ~ | | | | | (12) following 'false' branch (when 'ret == 0')... | 'setup_io_uring': event 13 | |cc1: | (13): ...to here | <------+ | 'main': events 14-17 | | 110 | if (setup_io_uring()) | | ~^~~~~~~~~~~~~~~~ | | || | | |(14) returning to 'main' from 'setup_io_uring' | | (15) following 'false' branch... |...... | 113 | add_timeout(&ring, sock_listen_fd); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (16) ...to here | | (17) calling 'add_timeout' from 'main' | +--> 'add_timeout': event 18 | | 30 | static void add_timeout(struct io_uring *ring, int fd) | | ^~~~~~~~~~~ | | | | | (18) entry to 'add_timeout' | 'add_timeout': event 19 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) calling '_io_uring_get_sqe' from 'add_timeout' | +--> '_io_uring_get_sqe': events 20-23 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (20) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (21) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (23) following 'false' branch... | | (22) ...to here | '_io_uring_get_sqe': event 24 | |cc1: | (24): ...to here | '_io_uring_get_sqe': event 25 | |cc1: | (25): '' is NULL | <------+ | 'add_timeout': events 26-27 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (27) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (26) return of NULL to 'add_timeout' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o cq-overflow.t cq-overflow.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o file-verify.t file-verify.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o files-exit-hang-poll.t files-exit-hang-poll.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from files-exit-hang-poll.c:17: In function 'add_poll': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-10 | |files-exit-hang-poll.c:60:5: | 60 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 68 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 71 | sock_listen_fd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0); | | ~~~~~~~~~~~~~~ | | | | | (3) ...to here | 72 | if (sock_listen_fd < 0) { | | ~ | | | | | (4) following 'false' branch (when 'sock_listen_fd >= 0')... |...... | 77 | setsockopt(sock_listen_fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); | | ~~~~~~~~~~ | | | | | (5) ...to here |...... | 87 | if (!ret) | | ~ | | | | | (6) following 'true' branch (when 'ret == 0')... |...... | 99 | if (listen(sock_listen_fd, BACKLOG) < 0) { | | ~~ ~ | | | | | | | (8) following 'false' branch... | | (7) ...to here |...... | 104 | if (setup_io_uring()) | | ~~ ~~~~~~~~~~~~~~~~ | | | | | | | (10) calling 'setup_io_uring' from 'main' | | (9) ...to here | +--> 'setup_io_uring': events 11-12 | | 42 | static int setup_io_uring(void) | | ^~~~~~~~~~~~~~ | | | | | (11) entry to 'setup_io_uring' |...... | 47 | if (ret) { | | ~ | | | | | (12) following 'false' branch (when 'ret == 0')... | 'setup_io_uring': event 13 | |cc1: | (13): ...to here | <------+ | 'main': events 14-17 | | 104 | if (setup_io_uring()) | | ~^~~~~~~~~~~~~~~~ | | || | | |(14) returning to 'main' from 'setup_io_uring' | | (15) following 'false' branch... |...... | 107 | add_poll(&ring, sock_listen_fd); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (16) ...to here | | (17) calling 'add_poll' from 'main' | +--> 'add_poll': event 18 | | 25 | static void add_poll(struct io_uring *ring, int fd) | | ^~~~~~~~ | | | | | (18) entry to 'add_poll' | 'add_poll': event 19 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) calling '_io_uring_get_sqe' from 'add_poll' | +--> '_io_uring_get_sqe': events 20-23 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (20) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (21) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (23) following 'false' branch... | | (22) ...to here | '_io_uring_get_sqe': event 24 | |cc1: | (24): ...to here | '_io_uring_get_sqe': event 25 | |cc1: | (25): '' is NULL | <------+ | 'add_poll': events 26-27 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (27) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (26) return of NULL to 'add_poll' from '_io_uring_get_sqe' | In function 'add_accept': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-10 | |files-exit-hang-poll.c:60:5: | 60 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 68 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 71 | sock_listen_fd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0); | | ~~~~~~~~~~~~~~ | | | | | (3) ...to here | 72 | if (sock_listen_fd < 0) { | | ~ | | | | | (4) following 'false' branch (when 'sock_listen_fd >= 0')... |...... | 77 | setsockopt(sock_listen_fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); | | ~~~~~~~~~~ | | | | | (5) ...to here |...... | 87 | if (!ret) | | ~ | | | | | (6) following 'true' branch (when 'ret == 0')... |...... | 99 | if (listen(sock_listen_fd, BACKLOG) < 0) { | | ~~ ~ | | | | | | | (8) following 'false' branch... | | (7) ...to here |...... | 104 | if (setup_io_uring()) | | ~~ ~~~~~~~~~~~~~~~~ | | | | | | | (10) calling 'setup_io_uring' from 'main' | | (9) ...to here | +--> 'setup_io_uring': events 11-12 | | 42 | static int setup_io_uring(void) | | ^~~~~~~~~~~~~~ | | | | | (11) entry to 'setup_io_uring' |...... | 47 | if (ret) { | | ~ | | | | | (12) following 'false' branch (when 'ret == 0')... | 'setup_io_uring': event 13 | |cc1: | (13): ...to here | <------+ | 'main': events 14-17 | | 104 | if (setup_io_uring()) | | ~^~~~~~~~~~~~~~~~ | | || | | |(14) returning to 'main' from 'setup_io_uring' | | (15) following 'false' branch... |...... | 107 | add_poll(&ring, sock_listen_fd); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (16) ...to here | | (17) calling 'add_poll' from 'main' | +--> 'add_poll': event 18 | | 25 | static void add_poll(struct io_uring *ring, int fd) | | ^~~~~~~~ | | | | | (18) entry to 'add_poll' | 'add_poll': event 19 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) calling '_io_uring_get_sqe' from 'add_poll' | +--> '_io_uring_get_sqe': events 20-23 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (20) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (21) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (23) following 'false' branch... | | (22) ...to here | '_io_uring_get_sqe': event 24 | |cc1: | (24): ...to here | <------+ | 'add_poll': event 25 | | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (25) returning to 'add_poll' from '_io_uring_get_sqe' | <------+ | 'main': events 26-27 | |files-exit-hang-poll.c:107:2: | 107 | add_poll(&ring, sock_listen_fd); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (26) returning to 'main' from 'add_poll' | 108 | add_accept(&ring, sock_listen_fd); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (27) calling 'add_accept' from 'main' | +--> 'add_accept': event 28 | | 34 | static void add_accept(struct io_uring *ring, int fd) | | ^~~~~~~~~~ | | | | | (28) entry to 'add_accept' | 'add_accept': event 29 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (29) calling '_io_uring_get_sqe' from 'add_accept' | +--> '_io_uring_get_sqe': events 30-33 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (30) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (31) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (33) following 'false' branch... | | (32) ...to here | '_io_uring_get_sqe': event 34 | |cc1: | (34): ...to here | '_io_uring_get_sqe': event 35 | |cc1: | (35): '' is NULL | <------+ | 'add_accept': events 36-37 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (37) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (36) return of NULL to 'add_accept' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o fallocate.t fallocate.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o fixed-buf-iter.t fixed-buf-iter.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o buf-ring.t buf-ring.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from buf-ring.c:13: buf-ring.c: In function 'test_mixed_reg2': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-2 | |buf-ring.c:344:5: | 344 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 350 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... | 'main': event 3 | |cc1: | (3): ...to here | 'main': events 4-6 | | 353 | for (i = 0; bgids[i] != -1; i++) { | | ^~~ | | | | | (4) following 'true' branch... | 354 | ret = test_reg_unreg(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (6) calling 'test_reg_unreg' from 'main' | | (5) ...to here | +--> 'test_reg_unreg': events 7-8 | | 169 | static int test_reg_unreg(int bgid) | | ^~~~~~~~~~~~~~ | | | | | (7) entry to 'test_reg_unreg' |...... | 177 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (8) following 'true' branch (when 'ret == 1')... | 'test_reg_unreg': event 9 | |cc1: | (9): ...to here | <------+ | 'main': events 10-15 | | 354 | ret = test_reg_unreg(bgids[i]); | | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (10) returning to 'main' from 'test_reg_unreg' | 355 | if (ret) { | | ~ | | | | | (11) following 'false' branch (when 'ret == 0')... |...... | 359 | if (no_buf_ring) | | ~~ ~ | | | | | | | (13) following 'false' branch... | | (12) ...to here |...... | 362 | ret = test_double_reg_unreg(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (15) calling 'test_double_reg_unreg' from 'main' | | (14) ...to here | +--> 'test_double_reg_unreg': events 16-17 | | 116 | static int test_double_reg_unreg(int bgid) | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (16) entry to 'test_double_reg_unreg' |...... | 124 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (17) following 'true' branch (when 'ret == 1')... | 'test_double_reg_unreg': event 18 | |cc1: | (18): ...to here | <------+ | 'main': events 19-22 | | 362 | ret = test_double_reg_unreg(bgids[i]); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) returning to 'main' from 'test_double_reg_unreg' | 363 | if (ret) { | | ~ | | | | | (20) following 'false' branch (when 'ret == 0')... |...... | 368 | ret = test_mixed_reg(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (22) calling 'test_mixed_reg' from 'main' | | (21) ...to here | +--> 'test_mixed_reg': events 23-24 | | 68 | static int test_mixed_reg(int bgid) | | ^~~~~~~~~~~~~~ | | | | | (23) entry to 'test_mixed_reg' |...... | 78 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (24) following 'true' branch (when 'ret == 1')... | 'test_mixed_reg': event 25 | |cc1: | (25): ...to here | <------+ | 'main': events 26-29 | | 368 | ret = test_mixed_reg(bgids[i]); | | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (26) returning to 'main' from 'test_mixed_reg' | 369 | if (ret) { | | ~ | | | | | (27) following 'false' branch (when 'ret == 0')... |...... | 374 | ret = test_mixed_reg2(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (29) calling 'test_mixed_reg2' from 'main' | | (28) ...to here | +--> 'test_mixed_reg2': events 30-31 | | 19 | static int test_mixed_reg2(int bgid) | | ^~~~~~~~~~~~~~~ | | | | | (30) entry to 'test_mixed_reg2' |...... | 29 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (31) following 'true' branch (when 'ret == 1')... | 'test_mixed_reg2': event 32 | |cc1: | (32): ...to here | <------+ | 'main': events 33-38 | | 353 | for (i = 0; bgids[i] != -1; i++) { | | ~~~ ~ | | | | | | | (35) ...to here | | (36) following 'true' branch... | 354 | ret = test_reg_unreg(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (38) calling 'test_reg_unreg' from 'main' | | (37) ...to here |...... | 374 | ret = test_mixed_reg2(bgids[i]); | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (33) returning to 'main' from 'test_mixed_reg2' | 375 | if (ret) { | | ~ | | | | | (34) following 'false' branch (when 'ret == 0')... | +--> 'test_reg_unreg': events 39-40 | | 169 | static int test_reg_unreg(int bgid) | | ^~~~~~~~~~~~~~ | | | | | (39) entry to 'test_reg_unreg' |...... | 177 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (40) following 'true' branch (when 'ret == 1')... | 'test_reg_unreg': event 41 | |cc1: | (41): ...to here | <------+ | 'main': events 42-47 | | 354 | ret = test_reg_unreg(bgids[i]); | | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (42) returning to 'main' from 'test_reg_unreg' | 355 | if (ret) { | | ~ | | | | | (43) following 'false' branch (when 'ret == 0')... |...... | 359 | if (no_buf_ring) | | ~~ ~ | | | | | | | (45) following 'false' branch... | | (44) ...to here |...... | 362 | ret = test_double_reg_unreg(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (47) calling 'test_double_reg_unreg' from 'main' | | (46) ...to here | +--> 'test_double_reg_unreg': events 48-49 | | 116 | static int test_double_reg_unreg(int bgid) | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (48) entry to 'test_double_reg_unreg' |...... | 124 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (49) following 'true' branch (when 'ret == 1')... | 'test_double_reg_unreg': event 50 | |cc1: | (50): ...to here | <------+ | 'main': events 51-54 | | 362 | ret = test_double_reg_unreg(bgids[i]); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (51) returning to 'main' from 'test_double_reg_unreg' | 363 | if (ret) { | | ~ | | | | | (52) following 'false' branch (when 'ret == 0')... |...... | 368 | ret = test_mixed_reg(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (54) calling 'test_mixed_reg' from 'main' | | (53) ...to here | +--> 'test_mixed_reg': events 55-56 | | 68 | static int test_mixed_reg(int bgid) | | ^~~~~~~~~~~~~~ | | | | | (55) entry to 'test_mixed_reg' |...... | 78 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (56) following 'true' branch (when 'ret == 1')... | 'test_mixed_reg': event 57 | |cc1: | (57): ...to here | <------+ | 'main': events 58-61 | | 368 | ret = test_mixed_reg(bgids[i]); | | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (58) returning to 'main' from 'test_mixed_reg' | 369 | if (ret) { | | ~ | | | | | (59) following 'false' branch (when 'ret == 0')... |...... | 374 | ret = test_mixed_reg2(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (61) calling 'test_mixed_reg2' from 'main' | | (60) ...to here | +--> 'test_mixed_reg2': events 62-64 | | 19 | static int test_mixed_reg2(int bgid) | | ^~~~~~~~~~~~~~~ | | | | | (62) entry to 'test_mixed_reg2' |...... | 31 | else if (ret != T_SETUP_OK) | | ~ | | | | | (63) following 'false' branch (when 'ret == 0')... |...... | 34 | if (posix_memalign(&ptr, 4096, 4096)) | | ~~ | | | | | (64) ...to here | 'test_mixed_reg2': event 65 | |cc1: | (65): following 'true' branch... | 'test_mixed_reg2': event 66 | |cc1: | (66): ...to here | 'test_mixed_reg2': events 67-70 | | 34 | if (posix_memalign(&ptr, 4096, 4096)) | | ^ | | | | | (67) following 'false' branch... |...... | 37 | reg.ring_addr = (unsigned long) ptr; | | ~~~ | | | | | (68) ...to here |...... | 42 | if (ret) { | | ~ | | | | | (69) following 'false' branch (when 'ret == 0')... |...... | 48 | bufs = malloc(8 * 1024); | | ~~~~ | | | | | (70) ...to here | 'test_mixed_reg2': event 71 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (71) calling '_io_uring_get_sqe' from 'test_mixed_reg2' | +--> '_io_uring_get_sqe': events 72-75 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (72) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (73) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (75) following 'false' branch... | | (74) ...to here | '_io_uring_get_sqe': event 76 | |cc1: | (76): ...to here | '_io_uring_get_sqe': event 77 | |cc1: | (77): '' is NULL | <------+ | 'test_mixed_reg2': events 78-79 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (79) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (78) return of NULL to 'test_mixed_reg2' from '_io_uring_get_sqe' | buf-ring.c: In function 'test_mixed_reg': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-2 | |buf-ring.c:344:5: | 344 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 350 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... | 'main': event 3 | |cc1: | (3): ...to here | 'main': events 4-6 | | 353 | for (i = 0; bgids[i] != -1; i++) { | | ^~~ | | | | | (4) following 'true' branch... | 354 | ret = test_reg_unreg(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (6) calling 'test_reg_unreg' from 'main' | | (5) ...to here | +--> 'test_reg_unreg': events 7-8 | | 169 | static int test_reg_unreg(int bgid) | | ^~~~~~~~~~~~~~ | | | | | (7) entry to 'test_reg_unreg' |...... | 177 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (8) following 'true' branch (when 'ret == 1')... | 'test_reg_unreg': event 9 | |cc1: | (9): ...to here | <------+ | 'main': events 10-15 | | 354 | ret = test_reg_unreg(bgids[i]); | | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (10) returning to 'main' from 'test_reg_unreg' | 355 | if (ret) { | | ~ | | | | | (11) following 'false' branch (when 'ret == 0')... |...... | 359 | if (no_buf_ring) | | ~~ ~ | | | | | | | (13) following 'false' branch... | | (12) ...to here |...... | 362 | ret = test_double_reg_unreg(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (15) calling 'test_double_reg_unreg' from 'main' | | (14) ...to here | +--> 'test_double_reg_unreg': events 16-17 | | 116 | static int test_double_reg_unreg(int bgid) | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (16) entry to 'test_double_reg_unreg' |...... | 124 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (17) following 'true' branch (when 'ret == 1')... | 'test_double_reg_unreg': event 18 | |cc1: | (18): ...to here | <------+ | 'main': events 19-22 | | 362 | ret = test_double_reg_unreg(bgids[i]); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) returning to 'main' from 'test_double_reg_unreg' | 363 | if (ret) { | | ~ | | | | | (20) following 'false' branch (when 'ret == 0')... |...... | 368 | ret = test_mixed_reg(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (22) calling 'test_mixed_reg' from 'main' | | (21) ...to here | +--> 'test_mixed_reg': events 23-27 | | 68 | static int test_mixed_reg(int bgid) | | ^~~~~~~~~~~~~~ | | | | | (23) entry to 'test_mixed_reg' |...... | 78 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (24) following 'false' branch (when 'ret != 1')... | 79 | return 0; | 80 | else if (ret != T_SETUP_OK) | | ~~ ~ | | | | | | | (26) following 'false' branch (when 'ret == 0')... | | (25) ...to here |...... | 84 | bufs = malloc(8 * 1024); | | ~~~~ | | | | | (27) ...to here | 'test_mixed_reg': event 28 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (28) calling '_io_uring_get_sqe' from 'test_mixed_reg' | +--> '_io_uring_get_sqe': events 29-30 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (29) entry to '_io_uring_get_sqe' |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~ | | | | | (30) following 'false' branch... | '_io_uring_get_sqe': event 31 | |cc1: | (31): ...to here | '_io_uring_get_sqe': event 32 | |cc1: | (32): '' is NULL | <------+ | 'test_mixed_reg': events 33-34 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (34) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (33) return of NULL to 'test_mixed_reg' from '_io_uring_get_sqe' | buf-ring.c:99:5: warning: leak of '' [CWE-401] [-Wanalyzer-malloc-leak] 99 | if (posix_memalign(&ptr, 4096, 4096)) | ^ 'main': events 1-2 | | 344 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 350 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... | 'main': event 3 | |cc1: | (3): ...to here | 'main': events 4-6 | | 353 | for (i = 0; bgids[i] != -1; i++) { | | ^~~ | | | | | (4) following 'true' branch... | 354 | ret = test_reg_unreg(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (6) calling 'test_reg_unreg' from 'main' | | (5) ...to here | +--> 'test_reg_unreg': events 7-8 | | 169 | static int test_reg_unreg(int bgid) | | ^~~~~~~~~~~~~~ | | | | | (7) entry to 'test_reg_unreg' |...... | 177 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (8) following 'true' branch (when 'ret == 1')... | 'test_reg_unreg': event 9 | |cc1: | (9): ...to here | <------+ | 'main': events 10-15 | | 354 | ret = test_reg_unreg(bgids[i]); | | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (10) returning to 'main' from 'test_reg_unreg' | 355 | if (ret) { | | ~ | | | | | (11) following 'false' branch (when 'ret == 0')... |...... | 359 | if (no_buf_ring) | | ~~ ~ | | | | | | | (13) following 'false' branch... | | (12) ...to here |...... | 362 | ret = test_double_reg_unreg(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (15) calling 'test_double_reg_unreg' from 'main' | | (14) ...to here | +--> 'test_double_reg_unreg': events 16-17 | | 116 | static int test_double_reg_unreg(int bgid) | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (16) entry to 'test_double_reg_unreg' |...... | 124 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (17) following 'true' branch (when 'ret == 1')... | 'test_double_reg_unreg': event 18 | |cc1: | (18): ...to here | <------+ | 'main': events 19-22 | | 362 | ret = test_double_reg_unreg(bgids[i]); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) returning to 'main' from 'test_double_reg_unreg' | 363 | if (ret) { | | ~ | | | | | (20) following 'false' branch (when 'ret == 0')... |...... | 368 | ret = test_mixed_reg(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (22) calling 'test_mixed_reg' from 'main' | | (21) ...to here | +--> 'test_mixed_reg': events 23-27 | | 68 | static int test_mixed_reg(int bgid) | | ^~~~~~~~~~~~~~ | | | | | (23) entry to 'test_mixed_reg' |...... | 78 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (24) following 'false' branch (when 'ret != 1')... | 79 | return 0; | 80 | else if (ret != T_SETUP_OK) | | ~~ ~ | | | | | | | (26) following 'false' branch (when 'ret == 0')... | | (25) ...to here |...... | 84 | bufs = malloc(8 * 1024); | | ~~~~ | | | | | (27) ...to here | 'test_mixed_reg': event 28 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (28) calling '_io_uring_get_sqe' from 'test_mixed_reg' | +--> '_io_uring_get_sqe': events 29-30 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (29) entry to '_io_uring_get_sqe' |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~ | | | | | (30) following 'false' branch... | '_io_uring_get_sqe': event 31 | |cc1: | (31): ...to here | <------+ | 'test_mixed_reg': events 32-33 | | 302 | sqe->flags = 0; | | ~~~ | | | | | (33) allocated here |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (32) returning to 'test_mixed_reg' from '_io_uring_get_sqe' | 'test_mixed_reg': event 34 | |buf-ring.c:88:8: | 88 | ret = io_uring_wait_cqe(&ring, &cqe); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (34) calling 'io_uring_wait_cqe' from 'test_mixed_reg' | +--> 'io_uring_wait_cqe': events 35-36 | |../src/include/liburing.h:1052:19: | 1052 | static inline int io_uring_wait_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~ | | | | | (35) entry to 'io_uring_wait_cqe' |...... | 1055 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (36) calling '__io_uring_peek_cqe' from 'io_uring_wait_cqe' | +--> '__io_uring_peek_cqe': events 37-38 | | 993 | static inline int __io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (37) entry to '__io_uring_peek_cqe' |...... | 1003 | if (ring->flags & IORING_SETUP_CQE32) | | ~ | | | | | (38) following 'false' branch... | '__io_uring_peek_cqe': event 39 | |cc1: | (39): ...to here | '__io_uring_peek_cqe': events 40-43 | | 1012 | if (!available) | | ^ | | | | | (40) following 'true' branch (when 'available == 0')... |...... | 1029 | *cqe_ptr = cqe; | | ~ | | | | | (41) ...to here | 1030 | if (nr_available) | | ~ | | | | | (42) following 'false' branch (when 'nr_available' is NULL)... | 1031 | *nr_available = available; | 1032 | return err; | | ~~~~~~ | | | | | (43) ...to here | <------+ | 'io_uring_wait_cqe': events 44-47 | | 1055 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | | | | | (46) ...to here | | | | (47) following 'false' branch... | | | (44) returning to 'io_uring_wait_cqe' from '__io_uring_peek_cqe' | | (45) following 'true' branch... | 'io_uring_wait_cqe': event 48 | |cc1: | (48): ...to here | <------+ | 'test_mixed_reg': events 49-53 | |buf-ring.c:88:8: | 88 | ret = io_uring_wait_cqe(&ring, &cqe); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (49) returning to 'test_mixed_reg' from 'io_uring_wait_cqe' | 89 | if (ret) { | | ~ | | | | | (50) following 'false' branch (when 'ret == 0')... |...... | 93 | if (cqe->res) { | | ~~ ~ | | | | | | | (52) following 'false' branch... | | (51) ...to here |...... | 97 | io_uring_cqe_seen(&ring, cqe); | | ~~~~~~~~~~~~~~~~~ | | | | | (53) ...to here | 'test_mixed_reg': event 54 | |cc1: | (54): following 'false' branch... | 'test_mixed_reg': events 55-56 | | 99 | if (posix_memalign(&ptr, 4096, 4096)) | | ^ | | | | | (55) ...to here | | (56) following 'true' branch... | 'test_mixed_reg': event 57 | |cc1: | (57): ...to here | 'test_mixed_reg': event 58 | | buf-ring.c:99:5: warning: leak of 'bufs' [CWE-401] [-Wanalyzer-malloc-leak] 'main': events 1-2 | | 344 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 350 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... | 'main': event 3 | |cc1: | (3): ...to here | 'main': events 4-6 | | 353 | for (i = 0; bgids[i] != -1; i++) { | | ^~~ | | | | | (4) following 'true' branch... | 354 | ret = test_reg_unreg(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (6) calling 'test_reg_unreg' from 'main' | | (5) ...to here | +--> 'test_reg_unreg': events 7-8 | | 169 | static int test_reg_unreg(int bgid) | | ^~~~~~~~~~~~~~ | | | | | (7) entry to 'test_reg_unreg' |...... | 177 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (8) following 'true' branch (when 'ret == 1')... | 'test_reg_unreg': event 9 | |cc1: | (9): ...to here | <------+ | 'main': events 10-15 | | 354 | ret = test_reg_unreg(bgids[i]); | | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (10) returning to 'main' from 'test_reg_unreg' | 355 | if (ret) { | | ~ | | | | | (11) following 'false' branch (when 'ret == 0')... |...... | 359 | if (no_buf_ring) | | ~~ ~ | | | | | | | (13) following 'false' branch... | | (12) ...to here |...... | 362 | ret = test_double_reg_unreg(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (15) calling 'test_double_reg_unreg' from 'main' | | (14) ...to here | +--> 'test_double_reg_unreg': events 16-17 | | 116 | static int test_double_reg_unreg(int bgid) | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (16) entry to 'test_double_reg_unreg' |...... | 124 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (17) following 'true' branch (when 'ret == 1')... | 'test_double_reg_unreg': event 18 | |cc1: | (18): ...to here | <------+ | 'main': events 19-22 | | 362 | ret = test_double_reg_unreg(bgids[i]); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) returning to 'main' from 'test_double_reg_unreg' | 363 | if (ret) { | | ~ | | | | | (20) following 'false' branch (when 'ret == 0')... |...... | 368 | ret = test_mixed_reg(bgids[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (22) calling 'test_mixed_reg' from 'main' | | (21) ...to here | +--> 'test_mixed_reg': events 23-28 | | 68 | static int test_mixed_reg(int bgid) | | ^~~~~~~~~~~~~~ | | | | | (23) entry to 'test_mixed_reg' |...... | 78 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (24) following 'false' branch (when 'ret != 1')... | 79 | return 0; | 80 | else if (ret != T_SETUP_OK) | | ~~ ~ | | | | | | | (26) following 'false' branch (when 'ret == 0')... | | (25) ...to here |...... | 84 | bufs = malloc(8 * 1024); | | ~~~~ | | | | | (27) ...to here | | (28) allocated here | 'test_mixed_reg': event 29 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (29) calling '_io_uring_get_sqe' from 'test_mixed_reg' | +--> '_io_uring_get_sqe': events 30-31 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (30) entry to '_io_uring_get_sqe' |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~ | | | | | (31) following 'false' branch... | '_io_uring_get_sqe': event 32 | |cc1: | (32): ...to here | <------+ | 'test_mixed_reg': event 33 | | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (33) returning to 'test_mixed_reg' from '_io_uring_get_sqe' | 'test_mixed_reg': event 34 | |buf-ring.c:88:8: | 88 | ret = io_uring_wait_cqe(&ring, &cqe); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (34) calling 'io_uring_wait_cqe' from 'test_mixed_reg' | +--> 'io_uring_wait_cqe': events 35-36 | |../src/include/liburing.h:1052:19: | 1052 | static inline int io_uring_wait_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~ | | | | | (35) entry to 'io_uring_wait_cqe' |...... | 1055 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (36) calling '__io_uring_peek_cqe' from 'io_uring_wait_cqe' | +--> '__io_uring_peek_cqe': events 37-38 | | 993 | static inline int __io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (37) entry to '__io_uring_peek_cqe' |...... | 1003 | if (ring->flags & IORING_SETUP_CQE32) | | ~ | | | | | (38) following 'false' branch... | '__io_uring_peek_cqe': event 39 | |cc1: | (39): ...to here | '__io_uring_peek_cqe': events 40-43 | | 1012 | if (!available) | | ^ | | | | | (40) following 'true' branch (when 'available == 0')... |...... | 1029 | *cqe_ptr = cqe; | | ~ | | | | | (41) ...to here | 1030 | if (nr_available) | | ~ | | | | | (42) following 'false' branch (when 'nr_available' is NULL)... | 1031 | *nr_available = available; | 1032 | return err; | | ~~~~~~ | | | | | (43) ...to here | <------+ | 'io_uring_wait_cqe': events 44-47 | | 1055 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | | | | | (46) ...to here | | | | (47) following 'false' branch... | | | (44) returning to 'io_uring_wait_cqe' from '__io_uring_peek_cqe' | | (45) following 'true' branch... | 'io_uring_wait_cqe': event 48 | |cc1: | (48): ...to here | <------+ | 'test_mixed_reg': events 49-53 | |buf-ring.c:88:8: | 88 | ret = io_uring_wait_cqe(&ring, &cqe); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (49) returning to 'test_mixed_reg' from 'io_uring_wait_cqe' | 89 | if (ret) { | | ~ | | | | | (50) following 'false' branch (when 'ret == 0')... |...... | 93 | if (cqe->res) { | | ~~ ~ | | | | | | | (52) following 'false' branch... | | (51) ...to here |...... | 97 | io_uring_cqe_seen(&ring, cqe); | | ~~~~~~~~~~~~~~~~~ | | | | | (53) ...to here | 'test_mixed_reg': event 54 | |cc1: | (54): following 'false' branch... | 'test_mixed_reg': events 55-56 | | 99 | if (posix_memalign(&ptr, 4096, 4096)) | | ^ | | | | | (55) ...to here | | (56) following 'true' branch... | 'test_mixed_reg': event 57 | |cc1: | (57): ...to here | 'test_mixed_reg': event 58 | | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o fadvise.t fadvise.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o hardlink.t hardlink.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o io-cancel.t io-cancel.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o file-update.t file-update.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o io_uring_setup.t io_uring_setup.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o lfs-openat-write.t lfs-openat-write.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o mkdir.t mkdir.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o lfs-openat.t lfs-openat.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o link_drain.t link_drain.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o link-timeout.t link-timeout.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o defer.t defer.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o link.t link.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o fsync.t fsync.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o openat2.t openat2.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o open-direct-link.t open-direct-link.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from open-direct-link.c:13: In function 'test.part.0': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-9 | |open-direct-link.c:121:5: | 121 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 127 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 130 | ret = io_uring_queue_init_params(8, &ring, &p); | | ~~~ | | | | | (3) ...to here | 131 | if (ret) { | | ~ | | | | | (4) following 'false' branch (when 'ret == 0')... |...... | 135 | if (!(p.features & IORING_FEAT_CQE_SKIP)) | | ~~ ~ | | | | | | | (6) following 'false' branch... | | (5) ...to here |...... | 138 | memset(files, -1, sizeof(files)); | | ~~~~~~ | | | | | (7) ...to here | 139 | ret = io_uring_register_files(&ring, files, ARRAY_SIZE(files)); | 140 | if (ret) { | | ~ | | | | | (8) following 'false' branch (when 'ret == 0')... |...... | 145 | t_create_file(FNAME, 4096); | | ~~~~~~~~~~~~~ | | | | | (9) ...to here | 'main': event 10 | |cc1: | (10): calling 'test.part.0' from 'main' | +--> 'test.part.0': event 11 | | 19 | static int test(struct io_uring *ring, int skip_success, int drain, int async) | | ^~~~ | | | | | (11) entry to 'test.part.0' | 'test.part.0': event 12 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (12) calling '_io_uring_get_sqe' from 'test.part.0' | +--> '_io_uring_get_sqe': events 13-16 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (13) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (14) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (16) following 'false' branch... | | (15) ...to here | '_io_uring_get_sqe': event 17 | |cc1: | (17): ...to here | '_io_uring_get_sqe': event 18 | |cc1: | (18): '' is NULL | <------+ | 'test.part.0': events 19-20 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (20) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) return of NULL to 'test.part.0' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o nop-all-sizes.t nop-all-sizes.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o madvise.t madvise.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o msg-ring.t msg-ring.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o io_uring_enter.t io_uring_enter.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from helpers.h:12, from io_uring_enter.c:27: io_uring_enter.c: In function 'io_prep_read': ../src/include/liburing.h:301:14: warning: dereference of NULL 'sqe' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-6 | |io_uring_enter.c:177:5: | 62 | return expect_fail(fd, to_submit, min_complete, | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (6) calling 'expect_fail' from 'main' | 63 | flags, sig, error); | | ~~~~~~~~~~~~~~~~~~ |...... | 177 | int main(int argc, char **argv) | | ^~~~ | | | | | (1) entry to 'main' |...... | 187 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 190 | ret = io_uring_queue_init(IORING_MAX_ENTRIES, &ring, 0); | | ~~~ | | | | | (3) ...to here |...... | 193 | if (ret < 0) { | | ~ | | | | | (4) following 'false' branch (when 'ret >= 0')... |...... | 197 | mask = *sq->kring_mask; | | ~~~~ | | | | | (5) ...to here | +--> 'expect_fail': events 7-9 | | 35 | static int expect_fail(int fd, unsigned int to_submit, | | ^~~~~~~~~~~ | | | | | (7) entry to 'expect_fail' |...... | 42 | if (ret != -1) { | | ~ | | | | | (8) following 'true' branch (when 'ret != -1')... | 43 | fprintf(stderr, "expected %s, but call succeeded\n", strerror(error)); | | ~~~~~~~ | | | | | (9) ...to here | <------+ | 'main': events 10-11 | | 62 | return expect_fail(fd, to_submit, min_complete, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (10) returning to 'main' from 'expect_fail' | | (11) calling 'expect_fail' from 'main' | 63 | flags, sig, error); | | ~~~~~~~~~~~~~~~~~~ | +--> 'expect_fail': events 12-14 | | 35 | static int expect_fail(int fd, unsigned int to_submit, | | ^~~~~~~~~~~ | | | | | (12) entry to 'expect_fail' |...... | 42 | if (ret != -1) { | | ~ | | | | | (13) following 'true' branch (when 'ret != -1')... | 43 | fprintf(stderr, "expected %s, but call succeeded\n", strerror(error)); | | ~~~~~~~ | | | | | (14) ...to here | <------+ | 'main': events 15-16 | | 62 | return expect_fail(fd, to_submit, min_complete, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (15) returning to 'main' from 'expect_fail' | | (16) calling 'expect_fail' from 'main' | 63 | flags, sig, error); | | ~~~~~~~~~~~~~~~~~~ | +--> 'expect_fail': events 17-19 | | 35 | static int expect_fail(int fd, unsigned int to_submit, | | ^~~~~~~~~~~ | | | | | (17) entry to 'expect_fail' |...... | 42 | if (ret != -1) { | | ~ | | | | | (18) following 'true' branch (when 'ret != -1')... | 43 | fprintf(stderr, "expected %s, but call succeeded\n", strerror(error)); | | ~~~~~~~ | | | | | (19) ...to here | <------+ | 'main': events 20-21 | | 62 | return expect_fail(fd, to_submit, min_complete, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (20) returning to 'main' from 'expect_fail' | 63 | flags, sig, error); | | ~~~~~~~~~~~~~~~~~~ |...... | 209 | status |= try_io_uring_enter(ring.ring_fd, 0, 0, 0, NULL, 0, 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (21) calling 'try_io_uring_enter' from 'main' | +--> 'try_io_uring_enter': events 22-25 | | 55 | static int try_io_uring_enter(int fd, unsigned int to_submit, | | ^~~~~~~~~~~~~~~~~~ | | | | | (22) entry to 'try_io_uring_enter' |...... | 61 | if (expect == -1) | | ~ | | | | | (23) following 'false' branch (when 'expect != -1')... |...... | 65 | ret = __sys_io_uring_enter(fd, to_submit, min_complete, flags, sig); | | ~~~ | | | | | (24) ...to here | 66 | if (ret != expect) { | | ~ | | | | | (25) following 'false' branch (when 'expect == ret')... | 'try_io_uring_enter': event 26 | |cc1: | (26): ...to here | <------+ | 'main': events 27-28 | | 209 | status |= try_io_uring_enter(ring.ring_fd, 0, 0, 0, NULL, 0, 0); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (27) returning to 'main' from 'try_io_uring_enter' |...... | 213 | submit_io(&ring, sq_entries); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (28) calling 'submit_io' from 'main' | +--> 'submit_io': events 29-30 | | 151 | static void submit_io(struct io_uring *ring, unsigned nr) | | ^~~~~~~~~ | | | | | (29) entry to 'submit_io' |...... | 160 | fd = setup_file(template, file_len); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (30) calling 'setup_file' from 'submit_io' | +--> 'setup_file': events 31-37 | | 77 | static int setup_file(char *template, off_t len) | | ^~~~~~~~~~ | | | | | (31) entry to 'setup_file' |...... | 83 | if (fd < 0) { | | ~ | | | | | (32) following 'false' branch (when 'fd >= 0')... |...... | 87 | ret = ftruncate(fd, len); | | ~~~ | | | | | (33) ...to here | 88 | if (ret < 0) { | | ~ | | | | | (34) following 'false' branch (when 'ret >= 0')... |...... | 93 | ret = read(fd, buf, 4096); | | ~~~ | | | | | (35) ...to here | 94 | if (ret != 4096) { | | ~ | | | | | (36) following 'false' branch (when 'ret == 4096')... |...... | 99 | return fd; | | ~~~~~~ | | | | | (37) ...to here | <------+ | 'submit_io': events 38-40 | | 160 | fd = setup_file(template, file_len); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (38) returning to 'submit_io' from 'setup_file' | 161 | for (i = 0; i < nr; i++) { | | ~~~ | | | | | (39) following 'true' branch (when 'i < nr')... | 162 | /* allocate an sqe */ | 163 | sqe = io_uring_get_sqe(ring); | | ~~~ | | | | | (40) ...to here | 'submit_io': event 41 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (41) calling '_io_uring_get_sqe' from 'submit_io' | +--> '_io_uring_get_sqe': events 42-45 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (42) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (43) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (45) following 'false' branch... | | (44) ...to here | '_io_uring_get_sqe': event 46 | |cc1: | (46): ...to here | '_io_uring_get_sqe': event 47 | |cc1: | (47): '' is NULL | <------+ | 'submit_io': event 48 | | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (48) return of NULL to 'submit_io' from '_io_uring_get_sqe' | 'submit_io': event 49 | |io_uring_enter.c:165:3: | 165 | io_prep_read(sqe, fd, i * 4096, 4096); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (49) calling 'io_prep_read' from 'submit_io' | +--> 'io_prep_read': event 50 | | 102 | static void io_prep_read(struct io_uring_sqe *sqe, int fd, off_t offset, | | ^~~~~~~~~~~~ | | | | | (50) entry to 'io_prep_read' | 'io_prep_read': event 51 | | 108 | assert(iov); | | ^~~~~~ | | | | | (51) following 'true' branch (when 'iov' is non-NULL)... | 'io_prep_read': event 52 | | 110 | iov->iov_base = t_malloc(len); | | ^~~ | | | | | (52) ...to here | 'io_prep_read': event 53 | | 111 | assert(iov->iov_base); | | ^~~~~~ | | | | | (53) following 'true' branch... | 'io_prep_read': event 54 | | 112 | iov->iov_len = len; | | ^~~ | | | | | (54) ...to here | 'io_prep_read': event 55 | |../src/include/liburing.h:301:14: | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~^~~~~~~~~~~ | | | | | (55) dereference of NULL 'sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o personality.t personality.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from personality.c:13: In function 'open_file': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-8 | |personality.c:164:5: | 164 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 169 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 172 | if (geteuid()) { | | ~~ ~ | | | | | | | (4) following 'false' branch... | | (3) ...to here |...... | 177 | ret = io_uring_queue_init(8, &ring, 0); | | ~~~ | | | | | (5) ...to here | 178 | if (ret) { | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 183 | ret = test_personality(&ring); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (8) calling 'test_personality' from 'main' | | (7) ...to here | +--> 'test_personality': events 9-14 | | 61 | static int test_personality(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~ | | | | | (9) entry to 'test_personality' |...... | 66 | if (ret < 0) { | | ~ | | | | | (10) following 'false' branch (when 'ret >= 0')... |...... | 75 | cred_id = ret; | | ~~~~~~~ | | | | | (11) ...to here |...... | 79 | if (ret < 0) { | | ~ | | | | | (12) following 'false' branch... |...... | 83 | close(ret); | | ~~~~~ | | | | | (13) ...to here |...... | 86 | ret = open_file(ring, -1, 0); | | ~~~~~~~~~~~~~~~~~~~~~~ | | | | | (14) calling 'open_file' from 'test_personality' | +--> 'open_file': events 15-17 | | 20 | static int open_file(struct io_uring *ring, int cred_id, int with_link) | | ^~~~~~~~~ | | | | | (15) entry to 'open_file' |...... | 26 | if (with_link) { | | ~ | | | | | (16) following 'false' branch (when 'with_link == 0')... |...... | 34 | sqe = io_uring_get_sqe(ring); | | ~~~ | | | | | (17) ...to here | 'open_file': event 18 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (18) calling '_io_uring_get_sqe' from 'open_file' | +--> '_io_uring_get_sqe': events 19-22 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (19) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (20) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (22) following 'false' branch... | | (21) ...to here | '_io_uring_get_sqe': event 23 | |cc1: | (23): ...to here | '_io_uring_get_sqe': event 24 | |cc1: | (24): '' is NULL | <------+ | 'open_file': events 25-26 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (26) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (25) return of NULL to 'open_file' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o pipe-eof.t pipe-eof.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from pipe-eof.c:13: In function 'main': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-3 | |pipe-eof.c:36:5: | 36 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 44 | if (pipe(d.fds) < 0) { | | ~ | | | | | (2) following 'false' branch... |...... | 48 | d.str = buf; | | ~ | | | | | (3) ...to here | 'main': event 4 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (4) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 5-8 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (5) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (6) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (8) following 'false' branch... | | (7) ...to here | '_io_uring_get_sqe': event 9 | |cc1: | (9): ...to here | '_io_uring_get_sqe': event 10 | |cc1: | (10): '' is NULL | <------+ | 'main': events 11-12 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (12) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (11) return of NULL to 'main' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o open-close.t open-close.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o poll-cancel.t poll-cancel.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o pipe-reuse.t pipe-reuse.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from pipe-reuse.c:11: In function 'main': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-2 | |pipe-reuse.c:16:5: | 16 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 27 | if (pipe(fds) < 0) { | | ~ | | | | | (2) following 'false' branch... | 'main': event 3 | |cc1: | (3): ...to here | 'main': events 4-11 | | 33 | for (i = 0; i < BUFFERS; i++) { | | ^~~ | | | | | (4) following 'true' branch (when 'i != 16')... | 34 | unsigned bsize = BUFSIZE / BUFFERS; | | ~~~~~~~~ | | | | | (5) ...to here |...... | 42 | if (ret) { | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 46 | if (!(p.features & IORING_FEAT_SUBMIT_STABLE)) { | | ~~ ~ | | | | | | | (8) following 'false' branch... | | (7) ...to here |...... | 51 | ptr = wbuf; | | ~~~ | | | | | (9) ...to here |...... | 57 | if (ret != sizeof(wbuf) / 2) { | | ~ | | | | | (10) following 'false' branch (when 'ret == 8192')... |...... | 63 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (11) ...to here | 'main': event 12 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (12) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 13-16 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (13) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (14) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (16) following 'false' branch... | | (15) ...to here | '_io_uring_get_sqe': event 17 | |cc1: | (17): ...to here | '_io_uring_get_sqe': event 18 | |cc1: | (18): '' is NULL | <------+ | 'main': events 19-20 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (20) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) return of NULL to 'main' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o nop.t nop.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o poll-ring.t poll-ring.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o poll.t poll.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o open-direct-pick.t open-direct-pick.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o poll-link.t poll-link.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o probe.t probe.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o read-before-exit.t read-before-exit.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o fpos.t fpos.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o poll-mshot-update.t poll-mshot-update.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from poll-mshot-update.c:17: In function 'has_poll_update': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-4 | |poll-mshot-update.c:190:5: | 190 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 198 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 201 | ret = has_poll_update(); | | ~~~ ~~~~~~~~~~~~~~~~~ | | | | | | | (4) calling 'has_poll_update' from 'main' | | (3) ...to here | +--> 'has_poll_update': events 5-7 | | 32 | static int has_poll_update(void) | | ^~~~~~~~~~~~~~~ | | | | | (5) entry to 'has_poll_update' |...... | 41 | if (ret) | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 44 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (7) ...to here | 'has_poll_update': event 8 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (8) calling '_io_uring_get_sqe' from 'has_poll_update' | +--> '_io_uring_get_sqe': events 9-12 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (9) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (10) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (12) following 'false' branch... | | (11) ...to here | '_io_uring_get_sqe': event 13 | |cc1: | (13): ...to here | '_io_uring_get_sqe': event 14 | |cc1: | (14): '' is NULL | <------+ | 'has_poll_update': events 15-16 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (16) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (15) return of NULL to 'has_poll_update' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o multicqes_drain.t multicqes_drain.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o iopoll.t iopoll.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o poll-cancel-ton.t poll-cancel-ton.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from poll-cancel-ton.c:16: In function 'del_polls': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-6 | |poll-cancel-ton.c:101:5: | 101 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 108 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 111 | if (pipe(pipe1) != 0) { | | ~~ ~ | | | | | | | (4) following 'false' branch... | | (3) ...to here |...... | 116 | p.flags = IORING_SETUP_CQSIZE; | | ~ | | | | | (5) ...to here |...... | 130 | add_polls(&ring, pipe1[0], 30000); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (6) calling 'add_polls' from 'main' | +--> 'add_polls': events 7-13 | | 72 | static int add_polls(struct io_uring *ring, int fd, int nr) | | ^~~~~~~~~ | | | | | (7) entry to 'add_polls' |...... | 78 | while (nr) { | | ~ | | | | | (8) following 'true' branch (when 'nr != 0')... | 79 | batch = 1024; | | ~~~~~ | | | | | (9) ...to here | 80 | if (batch > nr) | | ~ | | | | | (10) following 'false' branch (when 'nr > 1023')... |...... | 83 | for (i = 0; i < batch; i++) { | | ~~~ | | | | | (11) ...to here | | (12) following 'true' branch (when 'batch > i')... | 84 | sqe = io_uring_get_sqe(ring); | | ~~~ | | | | | (13) ...to here | 'add_polls': event 14 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (14) calling '_io_uring_get_sqe' from 'add_polls' | +--> '_io_uring_get_sqe': events 15-16 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (15) entry to '_io_uring_get_sqe' |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~ | | | | | (16) following 'false' branch... | '_io_uring_get_sqe': event 17 | |cc1: | (17): ...to here | <------+ | 'add_polls': event 18 | | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (18) returning to 'add_polls' from '_io_uring_get_sqe' | 'add_polls': events 19-22 | |poll-cancel-ton.c:83:3: | 83 | for (i = 0; i < batch; i++) { | | ^~~ | | | | | (19) following 'false' branch (when 'batch <= i')... |...... | 90 | ret = io_uring_submit(ring); | | ~~~ | | | | | (20) ...to here | 91 | if (ret != batch) { | | ~ | | | | | (21) following 'true' branch (when 'batch != ret')... | 92 | fprintf(stderr, "%s: failed submit, %d\n", __FUNCTION__, ret); | | ~~~~~~~ | | | | | (22) ...to here | <------+ | 'main': events 23-24 | | 130 | add_polls(&ring, pipe1[0], 30000); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (23) returning to 'main' from 'add_polls' | 131 | del_polls(&ring, pipe1[0], 30000); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (24) calling 'del_polls' from 'main' | +--> 'del_polls': events 25-31 | | 43 | static int del_polls(struct io_uring *ring, int fd, int nr) | | ^~~~~~~~~ | | | | | (25) entry to 'del_polls' |...... | 48 | while (nr) { | | ~ | | | | | (26) following 'true' branch (when 'nr != 0')... | 49 | batch = 1024; | | ~~~~~ | | | | | (27) ...to here | 50 | if (batch > nr) | | ~ | | | | | (28) following 'false' branch (when 'nr > 1023')... |...... | 53 | for (i = 0; i < batch; i++) { | | ~~~ | | | | | (29) ...to here | | (30) following 'true' branch (when 'batch > i')... | 54 | void *data; | | ~~~~ | | | | | (31) ...to here | 'del_polls': event 32 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (32) calling '_io_uring_get_sqe' from 'del_polls' | +--> '_io_uring_get_sqe': events 33-34 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (33) entry to '_io_uring_get_sqe' |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~ | | | | | (34) following 'false' branch... | '_io_uring_get_sqe': event 35 | |cc1: | (35): ...to here | '_io_uring_get_sqe': event 36 | |cc1: | (36): '' is NULL | <------+ | 'del_polls': events 37-38 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (38) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (37) return of NULL to 'del_polls' from '_io_uring_get_sqe' | In function 'add_polls': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-6 | |poll-cancel-ton.c:101:5: | 101 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 108 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 111 | if (pipe(pipe1) != 0) { | | ~~ ~ | | | | | | | (4) following 'false' branch... | | (3) ...to here |...... | 116 | p.flags = IORING_SETUP_CQSIZE; | | ~ | | | | | (5) ...to here |...... | 130 | add_polls(&ring, pipe1[0], 30000); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (6) calling 'add_polls' from 'main' | +--> 'add_polls': events 7-13 | | 72 | static int add_polls(struct io_uring *ring, int fd, int nr) | | ^~~~~~~~~ | | | | | (7) entry to 'add_polls' |...... | 78 | while (nr) { | | ~ | | | | | (8) following 'true' branch (when 'nr != 0')... | 79 | batch = 1024; | | ~~~~~ | | | | | (9) ...to here | 80 | if (batch > nr) | | ~ | | | | | (10) following 'false' branch (when 'nr > 1023')... |...... | 83 | for (i = 0; i < batch; i++) { | | ~~~ | | | | | (11) ...to here | | (12) following 'true' branch (when 'batch > i')... | 84 | sqe = io_uring_get_sqe(ring); | | ~~~ | | | | | (13) ...to here | 'add_polls': event 14 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (14) calling '_io_uring_get_sqe' from 'add_polls' | +--> '_io_uring_get_sqe': events 15-16 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (15) entry to '_io_uring_get_sqe' |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~ | | | | | (16) following 'false' branch... | '_io_uring_get_sqe': event 17 | |cc1: | (17): ...to here | '_io_uring_get_sqe': event 18 | |cc1: | (18): '' is NULL | <------+ | 'add_polls': events 19-20 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (20) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) return of NULL to 'add_polls' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o poll-cancel-all.t poll-cancel-all.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o file-register.t file-register.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o poll-v-poll.t poll-v-poll.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o ring-leak2.t ring-leak2.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o poll-many.t poll-many.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o ring-leak.t ring-leak.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o pollfree.t pollfree.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o rename.t rename.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o rw_merge_test.t rw_merge_test.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from rw_merge_test.c:15: In function 'main': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-3 | |rw_merge_test.c:18:5: | 18 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 31 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 34 | ret = pipe(pipe1); | | ~~~ | | | | | (3) ...to here | 'main': event 4 | | 35 | assert(!ret); | | ^~~~~~ | | | | | (4) following 'true' branch (when 'ret == 0')... | 'main': event 5 | | 37 | fd = open("testfile", O_RDWR | O_CREAT, 0644); | | ^~ | | | | | (5) ...to here | 'main': event 6 | | 38 | assert(fd >= 0); | | ^~~~~~ | | | | | (6) following 'true' branch... | 'main': event 7 | | 39 | unlink("testfile"); | | ^~~~~~ | | | | | (7) ...to here | 'main': event 8 | | 41 | assert(!ret); | | ^~~~~~ | | | | | (8) following 'true' branch (when 'ret == 0')... | 'main': events 9-13 | | 43 | ret = t_create_ring(4, &ring, 0); | | ^~~ | | | | | (9) ...to here | 44 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (10) following 'false' branch (when 'ret != 1')... | 45 | return 0; | 46 | else if (ret < 0) | | ~~ ~ | | | | | | | (12) following 'false' branch (when 'ret >= 0')... | | (11) ...to here |...... | 50 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (13) ...to here | 'main': event 14 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (14) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 15-18 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (15) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (16) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (18) following 'false' branch... | | (17) ...to here | '_io_uring_get_sqe': event 19 | |cc1: | (19): ...to here | '_io_uring_get_sqe': event 20 | |cc1: | (20): '' is NULL | <------+ | 'main': events 21-22 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (22) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (21) return of NULL to 'main' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o self.t self.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o shared-wq.t shared-wq.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o short-read.t short-read.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o sendmsg_fs_cve.t sendmsg_fs_cve.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o register-restrictions.t register-restrictions.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from register-restrictions.c:15: In function 'test_restrictions_sqe_op': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-4 | |register-restrictions.c:568:5: | 568 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 572 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 575 | ret = test_restrictions_sqe_op(); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (4) calling 'test_restrictions_sqe_op' from 'main' | | (3) ...to here | +--> 'test_restrictions_sqe_op': events 5-13 | | 23 | static int test_restrictions_sqe_op(void) | | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (5) entry to 'test_restrictions_sqe_op' |...... | 37 | if (pipe(pipe1) != 0) { | | ~ | | | | | (6) following 'false' branch... |...... | 42 | ret = io_uring_queue_init(8, &ring, IORING_SETUP_R_DISABLED); | | ~~~ | | | | | (7) ...to here | 43 | if (ret) { | | ~ | | | | | (8) following 'false' branch (when 'ret == 0')... |...... | 50 | res[0].opcode = IORING_RESTRICTION_SQE_OP; | | ~~~ | | | | | (9) ...to here |...... | 57 | if (ret) { | | ~ | | | | | (10) following 'false' branch (when 'ret == 0')... |...... | 65 | ret = io_uring_enable_rings(&ring); | | ~~~ | | | | | (11) ...to here | 66 | if (ret) { | | ~ | | | | | (12) following 'false' branch (when 'ret == 0')... |...... | 71 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (13) ...to here | 'test_restrictions_sqe_op': event 14 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (14) calling '_io_uring_get_sqe' from 'test_restrictions_sqe_op' | +--> '_io_uring_get_sqe': events 15-18 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (15) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (16) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (18) following 'false' branch... | | (17) ...to here | '_io_uring_get_sqe': event 19 | |cc1: | (19): ...to here | '_io_uring_get_sqe': event 20 | |cc1: | (20): '' is NULL | <------+ | 'test_restrictions_sqe_op': events 21-22 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (22) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (21) return of NULL to 'test_restrictions_sqe_op' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o send_recv.t send_recv.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from send_recv.c:15: In function 'do_send': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-4 | |send_recv.c:260:5: | 260 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 264 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 267 | ret = test(0, 0); | | ~~~ ~~~~~~~~~~ | | | | | | | (4) calling 'test' from 'main' | | (3) ...to here | +--> 'test': events 5-8 | | 232 | static int test(int use_sqthread, int regfiles) | | ^~~~ | | | | | (5) entry to 'test' |...... | 248 | if (ret) { | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 254 | pthread_mutex_lock(&rd.mutex); | | ~~~~~~~~~~~~~~~~~~ | | | | | (7) ...to here | 255 | do_send(); | | ~~~~~~~~~ | | | | | (8) calling 'do_send' from 'test' | +--> 'do_send': events 9-15 | | 169 | static int do_send(void) | | ^~~~~~~ | | | | | (9) entry to 'do_send' |...... | 182 | if (ret) { | | ~ | | | | | (10) following 'false' branch (when 'ret == 0')... |...... | 187 | memset(&saddr, 0, sizeof(saddr)); | | ~~~~~~ | | | | | (11) ...to here |...... | 193 | if (sockfd < 0) { | | ~ | | | | | (12) following 'false' branch (when 'sockfd >= 0')... |...... | 198 | ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr)); | | ~~~ | | | | | (13) ...to here | 199 | if (ret < 0) { | | ~ | | | | | (14) following 'false' branch (when 'ret >= 0')... |...... | 204 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (15) ...to here | 'do_send': event 16 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (16) calling '_io_uring_get_sqe' from 'do_send' | +--> '_io_uring_get_sqe': events 17-20 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (17) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (18) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (20) following 'false' branch... | | (19) ...to here | '_io_uring_get_sqe': event 21 | |cc1: | (21): ...to here | '_io_uring_get_sqe': event 22 | |cc1: | (22): '' is NULL | <------+ | 'do_send': events 23-24 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (24) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (23) return of NULL to 'do_send' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o sigfd-deadlock.t sigfd-deadlock.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from sigfd-deadlock.c:13: In function 'test_uring': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-6 | |sigfd-deadlock.c:57:5: | 57 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 61 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 64 | sfd = setup_signal(); | | ~~~ | | | | | (3) ...to here | 65 | if (sfd < 0) | | ~ | | | | | (4) following 'false' branch (when 'sfd >= 0')... |...... | 68 | ret = test_uring(sfd); | | ~~~ ~~~~~~~~~~~~~~~ | | | | | | | (6) calling 'test_uring' from 'main' | | (5) ...to here | +--> 'test_uring': event 7 | | 30 | static int test_uring(int sfd) | | ^~~~~~~~~~ | | | | | (7) entry to 'test_uring' | 'test_uring': event 8 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (8) calling '_io_uring_get_sqe' from 'test_uring' | +--> '_io_uring_get_sqe': events 9-12 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (9) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (10) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (12) following 'false' branch... | | (11) ...to here | '_io_uring_get_sqe': event 13 | |cc1: | (13): ...to here | '_io_uring_get_sqe': event 14 | |cc1: | (14): '' is NULL | <------+ | 'test_uring': events 15-16 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (16) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (15) return of NULL to 'test_uring' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o socket-rw.t socket-rw.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o socket-rw-eagain.t socket-rw-eagain.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o accept.t accept.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from helpers.h:12, from accept.c:23: accept.c: In function 'test_accept_multishot_wrong_arg': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-4 | |accept.c:666:5: | 666 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 670 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... | 671 | return 0; | 672 | ret = test_accept(1, false); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (4) calling 'test_accept' from 'main' | | (3) ...to here | +--> 'test_accept': event 5 | | 514 | static int test_accept(int count, bool before) | | ^~~~~~~~~~~ | | | | | (5) entry to 'test_accept' | 'test_accept': event 6 | | 524 | assert(ret >= 0); | | ^~~~~~ | | | | | (6) following 'true' branch (when 'ret >= 0')... | 'test_accept': events 7-8 | | 525 | ret = test(&m_io_uring, args); | | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (8) calling 'test' from 'test_accept' | | (7) ...to here | +--> 'test': events 9-10 | | 306 | static int test(struct io_uring *ring, struct accept_test_args args) | | ^~~~ | | | | | (9) entry to 'test' |...... | 311 | int32_t recv_s0 = start_accept_listen(&addr, 0, | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (10) calling 'start_accept_listen' from 'test' | 312 | args.nonblock ? O_NONBLOCK : 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | +--> 'start_accept_listen': event 11 | | 144 | static int start_accept_listen(struct sockaddr_in *addr, int port_off, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (11) entry to 'start_accept_listen' | 'start_accept_listen': event 12 | | 154 | assert(ret != -1); | | ^~~~~~ | | | | | (12) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 13 | | 155 | ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); | | ^~~ | | | | | (13) ...to here | 'start_accept_listen': event 14 | | 156 | assert(ret != -1); | | ^~~~~~ | | | | | (14) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': events 15-17 | | 158 | struct sockaddr_in laddr; | | ^~~~~~ | | | | | (15) ...to here | 159 | | 160 | if (!addr) | | ~ | | | | | (16) following 'false' branch (when 'addr' is non-NULL)... |...... | 163 | addr->sin_family = AF_INET; | | ~~~~ | | | | | (17) ...to here | 'start_accept_listen': event 18 | | 168 | assert(ret != -1); | | ^~~~~~ | | | | | (18) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 19 | | 169 | ret = listen(fd, 128); | | ^~~ | | | | | (19) ...to here | 'start_accept_listen': event 20 | | 170 | assert(ret != -1); | | ^~~~~~ | | | | | (20) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 21 | | 172 | return fd; | | ^~~~~~ | | | | | (21) ...to here | <------+ | 'test': events 22-24 | | 311 | int32_t recv_s0 = start_accept_listen(&addr, 0, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (22) returning to 'test' from 'start_accept_listen' | 312 | args.nonblock ? O_NONBLOCK : 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |...... | 315 | for (loop = 0; loop < 1 + args.extra_loops; loop++) { | | ~~~ | | | | | (23) following 'false' branch... |...... | 321 | close(recv_s0); | | ~~~~~ | | | | | (24) ...to here | <------+ | 'test_accept': event 25 | | 525 | ret = test(&m_io_uring, args); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (25) returning to 'test_accept' from 'test' | <------+ | 'main': events 26-31 | | 672 | ret = test_accept(1, false); | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (26) returning to 'main' from 'test_accept' | 673 | if (ret) { | | ~ | | | | | (27) following 'false' branch (when 'ret == 0')... |...... | 677 | if (no_accept) | | ~~ ~ | | | | | | | (29) following 'false' branch... | | (28) ...to here |...... | 680 | ret = test_accept(2, false); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (31) calling 'test_accept' from 'main' | | (30) ...to here | +--> 'test_accept': event 32 | | 514 | static int test_accept(int count, bool before) | | ^~~~~~~~~~~ | | | | | (32) entry to 'test_accept' | 'test_accept': event 33 | | 524 | assert(ret >= 0); | | ^~~~~~ | | | | | (33) following 'true' branch (when 'ret >= 0')... | 'test_accept': events 34-35 | | 525 | ret = test(&m_io_uring, args); | | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (35) calling 'test' from 'test_accept' | | (34) ...to here | +--> 'test': events 36-37 | | 306 | static int test(struct io_uring *ring, struct accept_test_args args) | | ^~~~ | | | | | (36) entry to 'test' |...... | 311 | int32_t recv_s0 = start_accept_listen(&addr, 0, | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (37) calling 'start_accept_listen' from 'test' | 312 | args.nonblock ? O_NONBLOCK : 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | +--> 'start_accept_listen': event 38 | | 144 | static int start_accept_listen(struct sockaddr_in *addr, int port_off, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (38) entry to 'start_accept_listen' | 'start_accept_listen': event 39 | | 154 | assert(ret != -1); | | ^~~~~~ | | | | | (39) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 40 | | 155 | ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); | | ^~~ | | | | | (40) ...to here | 'start_accept_listen': event 41 | | 156 | assert(ret != -1); | | ^~~~~~ | | | | | (41) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': events 42-44 | | 158 | struct sockaddr_in laddr; | | ^~~~~~ | | | | | (42) ...to here | 159 | | 160 | if (!addr) | | ~ | | | | | (43) following 'false' branch (when 'addr' is non-NULL)... |...... | 163 | addr->sin_family = AF_INET; | | ~~~~ | | | | | (44) ...to here | 'start_accept_listen': event 45 | | 168 | assert(ret != -1); | | ^~~~~~ | | | | | (45) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 46 | | 169 | ret = listen(fd, 128); | | ^~~ | | | | | (46) ...to here | 'start_accept_listen': event 47 | | 170 | assert(ret != -1); | | ^~~~~~ | | | | | (47) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 48 | | 172 | return fd; | | ^~~~~~ | | | | | (48) ...to here | <------+ | 'test': events 49-51 | | 311 | int32_t recv_s0 = start_accept_listen(&addr, 0, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (49) returning to 'test' from 'start_accept_listen' | 312 | args.nonblock ? O_NONBLOCK : 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |...... | 315 | for (loop = 0; loop < 1 + args.extra_loops; loop++) { | | ~~~ | | | | | (50) following 'false' branch... |...... | 321 | close(recv_s0); | | ~~~~~ | | | | | (51) ...to here | <------+ | 'test_accept': event 52 | | 525 | ret = test(&m_io_uring, args); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (52) returning to 'test_accept' from 'test' | <------+ | 'main': events 53-56 | | 680 | ret = test_accept(2, false); | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (53) returning to 'main' from 'test_accept' | 681 | if (ret) { | | ~ | | | | | (54) following 'false' branch (when 'ret == 0')... |...... | 686 | ret = test_accept(2, true); | | ~~~ ~~~~~~~~~~~~~~~~~~~~ | | | | | | | (56) calling 'test_accept' from 'main' | | (55) ...to here | +--> 'test_accept': event 57 | | 514 | static int test_accept(int count, bool before) | | ^~~~~~~~~~~ | | | | | (57) entry to 'test_accept' | 'test_accept': event 58 | | 524 | assert(ret >= 0); | | ^~~~~~ | | | | | (58) following 'true' branch (when 'ret >= 0')... | 'test_accept': events 59-60 | | 525 | ret = test(&m_io_uring, args); | | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (60) calling 'test' from 'test_accept' | | (59) ...to here | +--> 'test': events 61-62 | | 306 | static int test(struct io_uring *ring, struct accept_test_args args) | | ^~~~ | | | | | (61) entry to 'test' |...... | 311 | int32_t recv_s0 = start_accept_listen(&addr, 0, | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (62) calling 'start_accept_listen' from 'test' | 312 | args.nonblock ? O_NONBLOCK : 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | +--> 'start_accept_listen': event 63 | | 144 | static int start_accept_listen(struct sockaddr_in *addr, int port_off, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (63) entry to 'start_accept_listen' | 'start_accept_listen': event 64 | | 154 | assert(ret != -1); | | ^~~~~~ | | | | | (64) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 65 | | 155 | ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); | | ^~~ | | | | | (65) ...to here | 'start_accept_listen': event 66 | | 156 | assert(ret != -1); | | ^~~~~~ | | | | | (66) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': events 67-69 | | 158 | struct sockaddr_in laddr; | | ^~~~~~ | | | | | (67) ...to here | 159 | | 160 | if (!addr) | | ~ | | | | | (68) following 'false' branch (when 'addr' is non-NULL)... |...... | 163 | addr->sin_family = AF_INET; | | ~~~~ | | | | | (69) ...to here | 'start_accept_listen': event 70 | | 168 | assert(ret != -1); | | ^~~~~~ | | | | | (70) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 71 | | 169 | ret = listen(fd, 128); | | ^~~ | | | | | (71) ...to here | 'start_accept_listen': event 72 | | 170 | assert(ret != -1); | | ^~~~~~ | | | | | (72) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 73 | | 172 | return fd; | | ^~~~~~ | | | | | (73) ...to here | <------+ | 'test': events 74-76 | | 311 | int32_t recv_s0 = start_accept_listen(&addr, 0, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (74) returning to 'test' from 'start_accept_listen' | 312 | args.nonblock ? O_NONBLOCK : 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |...... | 315 | for (loop = 0; loop < 1 + args.extra_loops; loop++) { | | ~~~ | | | | | (75) following 'false' branch... |...... | 321 | close(recv_s0); | | ~~~~~ | | | | | (76) ...to here | <------+ | 'test_accept': event 77 | | 525 | ret = test(&m_io_uring, args); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (77) returning to 'test_accept' from 'test' | <------+ | 'main': events 78-81 | | 686 | ret = test_accept(2, true); | | ^~~~~~~~~~~~~~~~~~~~ | | | | | (78) returning to 'main' from 'test_accept' | 687 | if (ret) { | | ~ | | | | | (79) following 'false' branch (when 'ret == 0')... |...... | 692 | ret = test_accept_nonblock(false, 1); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (81) calling 'test_accept_nonblock' from 'main' | | (80) ...to here | +--> 'test_accept_nonblock': event 82 | | 587 | static int test_accept_nonblock(bool queue_before_connect, int count) | | ^~~~~~~~~~~~~~~~~~~~ | | | | | (82) entry to 'test_accept_nonblock' | 'test_accept_nonblock': event 83 | | 598 | assert(ret >= 0); | | ^~~~~~ | | | | | (83) following 'true' branch (when 'ret >= 0')... | 'test_accept_nonblock': events 84-85 | | 599 | ret = test(&m_io_uring, args); | | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (85) calling 'test' from 'test_accept_nonblock' | | (84) ...to here | +--> 'test': events 86-87 | | 306 | static int test(struct io_uring *ring, struct accept_test_args args) | | ^~~~ | | | | | (86) entry to 'test' |...... | 311 | int32_t recv_s0 = start_accept_listen(&addr, 0, | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (87) calling 'start_accept_listen' from 'test' | 312 | args.nonblock ? O_NONBLOCK : 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | +--> 'start_accept_listen': event 88 | | 144 | static int start_accept_listen(struct sockaddr_in *addr, int port_off, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (88) entry to 'start_accept_listen' | 'start_accept_listen': event 89 | | 154 | assert(ret != -1); | | ^~~~~~ | | | | | (89) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 90 | | 155 | ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); | | ^~~ | | | | | (90) ...to here | 'start_accept_listen': event 91 | | 156 | assert(ret != -1); | | ^~~~~~ | | | | | (91) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': events 92-94 | | 158 | struct sockaddr_in laddr; | | ^~~~~~ | | | | | (92) ...to here | 159 | | 160 | if (!addr) | | ~ | | | | | (93) following 'false' branch (when 'addr' is non-NULL)... |...... | 163 | addr->sin_family = AF_INET; | | ~~~~ | | | | | (94) ...to here | 'start_accept_listen': event 95 | | 168 | assert(ret != -1); | | ^~~~~~ | | | | | (95) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 96 | | 169 | ret = listen(fd, 128); | | ^~~ | | | | | (96) ...to here | 'start_accept_listen': event 97 | | 170 | assert(ret != -1); | | ^~~~~~ | | | | | (97) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 98 | | 172 | return fd; | | ^~~~~~ | | | | | (98) ...to here | <------+ | 'test': events 99-101 | | 311 | int32_t recv_s0 = start_accept_listen(&addr, 0, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (99) returning to 'test' from 'start_accept_listen' | 312 | args.nonblock ? O_NONBLOCK : 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |...... | 315 | for (loop = 0; loop < 1 + args.extra_loops; loop++) { | | ~~~ | | | | | (100) following 'false' branch... |...... | 321 | close(recv_s0); | | ~~~~~ | | | | | (101) ...to here | <------+ | 'test_accept_nonblock': event 102 | | 599 | ret = test(&m_io_uring, args); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (102) returning to 'test_accept_nonblock' from 'test' | <------+ | 'main': events 103-106 | | 692 | ret = test_accept_nonblock(false, 1); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (103) returning to 'main' from 'test_accept_nonblock' | 693 | if (ret) { | | ~ | | | | | (104) following 'false' branch (when 'ret == 0')... |...... | 698 | ret = test_accept_nonblock(true, 1); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (106) calling 'test_accept_nonblock' from 'main' | | (105) ...to here | +--> 'test_accept_nonblock': event 107 | | 587 | static int test_accept_nonblock(bool queue_before_connect, int count) | | ^~~~~~~~~~~~~~~~~~~~ | | | | | (107) entry to 'test_accept_nonblock' | 'test_accept_nonblock': event 108 | | 598 | assert(ret >= 0); | | ^~~~~~ | | | | | (108) following 'true' branch (when 'ret >= 0')... | 'test_accept_nonblock': events 109-110 | | 599 | ret = test(&m_io_uring, args); | | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (110) calling 'test' from 'test_accept_nonblock' | | (109) ...to here | +--> 'test': events 111-112 | | 306 | static int test(struct io_uring *ring, struct accept_test_args args) | | ^~~~ | | | | | (111) entry to 'test' |...... | 311 | int32_t recv_s0 = start_accept_listen(&addr, 0, | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (112) calling 'start_accept_listen' from 'test' | 312 | args.nonblock ? O_NONBLOCK : 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | +--> 'start_accept_listen': event 113 | | 144 | static int start_accept_listen(struct sockaddr_in *addr, int port_off, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (113) entry to 'start_accept_listen' | 'start_accept_listen': event 114 | | 154 | assert(ret != -1); | | ^~~~~~ | | | | | (114) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 115 | | 155 | ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); | | ^~~ | | | | | (115) ...to here | 'start_accept_listen': event 116 | | 156 | assert(ret != -1); | | ^~~~~~ | | | | | (116) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': events 117-119 | | 158 | struct sockaddr_in laddr; | | ^~~~~~ | | | | | (117) ...to here | 159 | | 160 | if (!addr) | | ~ | | | | | (118) following 'false' branch (when 'addr' is non-NULL)... |...... | 163 | addr->sin_family = AF_INET; | | ~~~~ | | | | | (119) ...to here | 'start_accept_listen': event 120 | | 168 | assert(ret != -1); | | ^~~~~~ | | | | | (120) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 121 | | 169 | ret = listen(fd, 128); | | ^~~ | | | | | (121) ...to here | 'start_accept_listen': event 122 | | 170 | assert(ret != -1); | | ^~~~~~ | | | | | (122) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 123 | | 172 | return fd; | | ^~~~~~ | | | | | (123) ...to here | <------+ | 'test': events 124-125 | | 311 | int32_t recv_s0 = start_accept_listen(&addr, 0, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (124) returning to 'test' from 'start_accept_listen' | 312 | args.nonblock ? O_NONBLOCK : 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 313 | if (args.queue_accept_before_connect) | | ~ | | | | | (125) following 'false' branch... | 'test': event 126 | |cc1: | (126): ...to here | 'test': events 127-128 | | 315 | for (loop = 0; loop < 1 + args.extra_loops; loop++) { | | ^~~ | | | | | (127) following 'false' branch... |...... | 321 | close(recv_s0); | | ~~~~~ | | | | | (128) ...to here | <------+ | 'test_accept_nonblock': event 129 | | 599 | ret = test(&m_io_uring, args); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (129) returning to 'test_accept_nonblock' from 'test' | <------+ | 'main': events 130-133 | | 698 | ret = test_accept_nonblock(true, 1); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (130) returning to 'main' from 'test_accept_nonblock' | 699 | if (ret) { | | ~ | | | | | (131) following 'false' branch (when 'ret == 0')... |...... | 704 | ret = test_accept_nonblock(true, 3); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (133) calling 'test_accept_nonblock' from 'main' | | (132) ...to here | +--> 'test_accept_nonblock': event 134 | | 587 | static int test_accept_nonblock(bool queue_before_connect, int count) | | ^~~~~~~~~~~~~~~~~~~~ | | | | | (134) entry to 'test_accept_nonblock' | 'test_accept_nonblock': event 135 | | 598 | assert(ret >= 0); | | ^~~~~~ | | | | | (135) following 'true' branch (when 'ret >= 0')... | 'test_accept_nonblock': events 136-137 | | 599 | ret = test(&m_io_uring, args); | | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (137) calling 'test' from 'test_accept_nonblock' | | (136) ...to here | +--> 'test': events 138-139 | | 306 | static int test(struct io_uring *ring, struct accept_test_args args) | | ^~~~ | | | | | (138) entry to 'test' |...... | 311 | int32_t recv_s0 = start_accept_listen(&addr, 0, | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (139) calling 'start_accept_listen' from 'test' | 312 | args.nonblock ? O_NONBLOCK : 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | +--> 'start_accept_listen': event 140 | | 144 | static int start_accept_listen(struct sockaddr_in *addr, int port_off, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (140) entry to 'start_accept_listen' | 'start_accept_listen': event 141 | | 154 | assert(ret != -1); | | ^~~~~~ | | | | | (141) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 142 | | 155 | ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); | | ^~~ | | | | | (142) ...to here | 'start_accept_listen': event 143 | | 156 | assert(ret != -1); | | ^~~~~~ | | | | | (143) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': events 144-146 | | 158 | struct sockaddr_in laddr; | | ^~~~~~ | | | | | (144) ...to here | 159 | | 160 | if (!addr) | | ~ | | | | | (145) following 'false' branch (when 'addr' is non-NULL)... |...... | 163 | addr->sin_family = AF_INET; | | ~~~~ | | | | | (146) ...to here | 'start_accept_listen': event 147 | | 168 | assert(ret != -1); | | ^~~~~~ | | | | | (147) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 148 | | 169 | ret = listen(fd, 128); | | ^~~ | | | | | (148) ...to here | 'start_accept_listen': event 149 | | 170 | assert(ret != -1); | | ^~~~~~ | | | | | (149) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 150 | | 172 | return fd; | | ^~~~~~ | | | | | (150) ...to here | <------+ | 'test': events 151-152 | | 311 | int32_t recv_s0 = start_accept_listen(&addr, 0, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (151) returning to 'test' from 'start_accept_listen' | 312 | args.nonblock ? O_NONBLOCK : 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 313 | if (args.queue_accept_before_connect) | | ~ | | | | | (152) following 'false' branch... | 'test': event 153 | |cc1: | (153): ...to here | 'test': events 154-155 | | 315 | for (loop = 0; loop < 1 + args.extra_loops; loop++) { | | ^~~ | | | | | (154) following 'false' branch... |...... | 321 | close(recv_s0); | | ~~~~~ | | | | | (155) ...to here | <------+ | 'test_accept_nonblock': event 156 | | 599 | ret = test(&m_io_uring, args); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (156) returning to 'test_accept_nonblock' from 'test' | <------+ | 'main': events 157-160 | | 704 | ret = test_accept_nonblock(true, 3); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (157) returning to 'main' from 'test_accept_nonblock' | 705 | if (ret) { | | ~ | | | | | (158) following 'false' branch (when 'ret == 0')... |...... | 710 | ret = test_accept_fixed(); | | ~~~ ~~~~~~~~~~~~~~~~~~~ | | | | | | | (160) calling 'test_accept_fixed' from 'main' | | (159) ...to here | +--> 'test_accept_fixed': event 161 | | 604 | static int test_accept_fixed(void) | | ^~~~~~~~~~~~~~~~~ | | | | | (161) entry to 'test_accept_fixed' | 'test_accept_fixed': event 162 | | 613 | assert(ret >= 0); | | ^~~~~~ | | | | | (162) following 'true' branch (when 'ret >= 0')... | 'test_accept_fixed': event 163 | | 614 | ret = io_uring_register_files(&m_io_uring, &fd, 1); | | ^~~ | | | | | (163) ...to here | 'test_accept_fixed': event 164 | | 615 | assert(ret == 0); | | ^~~~~~ | | | | | (164) following 'true' branch (when 'ret == 0')... | 'test_accept_fixed': events 165-166 | | 616 | ret = test(&m_io_uring, args); | | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (166) calling 'test' from 'test_accept_fixed' | | (165) ...to here | +--> 'test': events 167-168 | | 306 | static int test(struct io_uring *ring, struct accept_test_args args) | | ^~~~ | | | | | (167) entry to 'test' |...... | 311 | int32_t recv_s0 = start_accept_listen(&addr, 0, | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (168) calling 'start_accept_listen' from 'test' | 312 | args.nonblock ? O_NONBLOCK : 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | +--> 'start_accept_listen': event 169 | | 144 | static int start_accept_listen(struct sockaddr_in *addr, int port_off, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (169) entry to 'start_accept_listen' | 'start_accept_listen': event 170 | | 154 | assert(ret != -1); | | ^~~~~~ | | | | | (170) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 171 | | 155 | ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); | | ^~~ | | | | | (171) ...to here | 'start_accept_listen': event 172 | | 156 | assert(ret != -1); | | ^~~~~~ | | | | | (172) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': events 173-175 | | 158 | struct sockaddr_in laddr; | | ^~~~~~ | | | | | (173) ...to here | 159 | | 160 | if (!addr) | | ~ | | | | | (174) following 'false' branch (when 'addr' is non-NULL)... |...... | 163 | addr->sin_family = AF_INET; | | ~~~~ | | | | | (175) ...to here | 'start_accept_listen': event 176 | | 168 | assert(ret != -1); | | ^~~~~~ | | | | | (176) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 177 | | 169 | ret = listen(fd, 128); | | ^~~ | | | | | (177) ...to here | 'start_accept_listen': event 178 | | 170 | assert(ret != -1); | | ^~~~~~ | | | | | (178) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 179 | | 172 | return fd; | | ^~~~~~ | | | | | (179) ...to here | <------+ | 'test': events 180-181 | | 311 | int32_t recv_s0 = start_accept_listen(&addr, 0, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (180) returning to 'test' from 'start_accept_listen' | 312 | args.nonblock ? O_NONBLOCK : 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 313 | if (args.queue_accept_before_connect) | | ~ | | | | | (181) following 'false' branch... | 'test': event 182 | |cc1: | (182): ...to here | 'test': events 183-184 | | 315 | for (loop = 0; loop < 1 + args.extra_loops; loop++) { | | ^~~ | | | | | (183) following 'false' branch... |...... | 321 | close(recv_s0); | | ~~~~~ | | | | | (184) ...to here | <------+ | 'test_accept_fixed': event 185 | | 616 | ret = test(&m_io_uring, args); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (185) returning to 'test_accept_fixed' from 'test' | <------+ | 'main': events 186-189 | | 710 | ret = test_accept_fixed(); | | ^~~~~~~~~~~~~~~~~~~ | | | | | (186) returning to 'main' from 'test_accept_fixed' | 711 | if (ret) { | | ~ | | | | | (187) following 'false' branch (when 'ret == 0')... |...... | 716 | ret = test_multishot_fixed_accept(); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (189) calling 'test_multishot_fixed_accept' from 'main' | | (188) ...to here | +--> 'test_multishot_fixed_accept': events 190-191 | | 621 | static int test_multishot_fixed_accept(void) | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (190) entry to 'test_multishot_fixed_accept' |...... | 630 | if (no_accept_multi) | | ~ | | | | | (191) following 'true' branch... | 'test_multishot_fixed_accept': event 192 | |cc1: | (192): ...to here | <------+ | 'main': events 193-196 | | 716 | ret = test_multishot_fixed_accept(); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (193) returning to 'main' from 'test_multishot_fixed_accept' | 717 | if (ret) { | | ~ | | | | | (194) following 'false' branch (when 'ret == 0')... |...... | 722 | ret = test_accept_multishot_wrong_arg(); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (196) calling 'test_accept_multishot_wrong_arg' from 'main' | | (195) ...to here | +--> 'test_accept_multishot_wrong_arg': event 197 | | 550 | static int test_accept_multishot_wrong_arg() | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (197) entry to 'test_accept_multishot_wrong_arg' | 'test_accept_multishot_wrong_arg': event 198 | | 558 | assert(ret >= 0); | | ^~~~~~ | | | | | (198) following 'true' branch (when 'ret >= 0')... | 'test_accept_multishot_wrong_arg': events 199-200 | | 560 | fd = start_accept_listen(NULL, 0, 0); | | ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (200) calling 'start_accept_listen' from 'test_accept_multishot_wrong_arg' | | (199) ...to here | +--> 'start_accept_listen': event 201 | | 144 | static int start_accept_listen(struct sockaddr_in *addr, int port_off, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (201) entry to 'start_accept_listen' | 'start_accept_listen': event 202 | | 154 | assert(ret != -1); | | ^~~~~~ | | | | | (202) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 203 | | 155 | ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); | | ^~~ | | | | | (203) ...to here | 'start_accept_listen': event 204 | | 156 | assert(ret != -1); | | ^~~~~~ | | | | | (204) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': events 205-207 | | 158 | struct sockaddr_in laddr; | | ^~~~~~ | | | | | (205) ...to here | 159 | | 160 | if (!addr) | | ~ | | | | | (206) following 'true' branch (when 'addr' is NULL)... | 161 | addr = &laddr; | | ~~~~ | | | | | (207) ...to here | 'start_accept_listen': event 208 | | 168 | assert(ret != -1); | | ^~~~~~ | | | | | (208) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 209 | | 169 | ret = listen(fd, 128); | | ^~~ | | | | | (209) ...to here | 'start_accept_listen': event 210 | | 170 | assert(ret != -1); | | ^~~~~~ | | | | | (210) following 'true' branch (when 'ret != -1')... | 'start_accept_listen': event 211 | | 172 | return fd; | | ^~~~~~ | | | | | (211) ...to here | <------+ | 'test_accept_multishot_wrong_arg': event 212 | | 560 | fd = start_accept_listen(NULL, 0, 0); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (212) returning to 'test_accept_multishot_wrong_arg' from 'start_accept_listen' | 'test_accept_multishot_wrong_arg': event 213 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (213) calling '_io_uring_get_sqe' from 'test_accept_multishot_wrong_arg' | +--> '_io_uring_get_sqe': events 214-217 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (214) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (215) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (217) following 'false' branch... | | (216) ...to here | '_io_uring_get_sqe': event 218 | |cc1: | (218): ...to here | '_io_uring_get_sqe': event 219 | |cc1: | (219): '' is NULL | <------+ | 'test_accept_multishot_wrong_arg': events 220-221 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (221) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (220) return of NULL to 'test_accept_multishot_wrong_arg' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o recv-msgall.t recv-msgall.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from recv-msgall.c:15: recv-msgall.c: In function 'do_send': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-4 | |recv-msgall.c:247:5: | 247 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 251 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 254 | ret = test(0); | | ~~~ ~~~~~~~ | | | | | | | (4) calling 'test' from 'main' | | (3) ...to here | +--> 'test': events 5-8 | | 220 | static int test(int use_recvmsg) | | ^~~~ | | | | | (5) entry to 'test' |...... | 235 | if (ret) { | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 241 | pthread_mutex_lock(&rd.mutex); | | ~~~~~~~~~~~~~~~~~~ | | | | | (7) ...to here | 242 | do_send(); | | ~~~~~~~~~ | | | | | (8) calling 'do_send' from 'test' | +--> 'do_send': events 9-18 | | 146 | static int do_send(void) | | ^~~~~~~ | | | | | (9) entry to 'do_send' |...... | 157 | if (ret) { | | ~ | | | | | (10) following 'false' branch (when 'ret == 0')... |...... | 162 | buf = malloc(MAX_MSG * sizeof(int)); | | ~~~ | | | | | (11) ...to here | 163 | for (i = 0; i < MAX_MSG; i++) | | ~~~ | | | | | (12) following 'true' branch (when 'i != 128')... | | (14) following 'false' branch (when 'i == 128')... | 164 | buf[i] = i; | | ~~~ | | | | | (13) ...to here | 165 | | 166 | memset(&saddr, 0, sizeof(saddr)); | | ~~~~~~ | | | | | (15) ...to here |...... | 172 | if (sockfd < 0) { | | ~ | | | | | (16) following 'false' branch (when 'sockfd >= 0')... |...... | 177 | ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr)); | | ~~~ | | | | | (17) ...to here | 178 | if (ret < 0) { | | ~ | | | | | (18) following 'false' branch (when 'ret >= 0')... | 'do_send': event 19 | |cc1: | (19): ...to here | 'do_send': events 20-21 | | 185 | for (i = 0; i < 2; i++) { | | ^~~ | | | | | (20) following 'true' branch (when 'i != 2')... | 186 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (21) ...to here | 'do_send': event 22 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (22) calling '_io_uring_get_sqe' from 'do_send' | +--> '_io_uring_get_sqe': events 23-26 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (23) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (24) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (26) following 'false' branch... | | (25) ...to here | '_io_uring_get_sqe': event 27 | |cc1: | (27): ...to here | '_io_uring_get_sqe': event 28 | |cc1: | (28): '' is NULL | <------+ | 'do_send': events 29-30 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (30) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (29) return of NULL to 'do_send' from '_io_uring_get_sqe' | recv-msgall.c:174:3: warning: leak of 'buf' [CWE-401] [-Wanalyzer-malloc-leak] 174 | return 1; | ^~~~~~ 'main': events 1-4 | | 247 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 251 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 254 | ret = test(0); | | ~~~ ~~~~~~~ | | | | | | | (4) calling 'test' from 'main' | | (3) ...to here | +--> 'test': events 5-8 | | 220 | static int test(int use_recvmsg) | | ^~~~ | | | | | (5) entry to 'test' |...... | 235 | if (ret) { | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 241 | pthread_mutex_lock(&rd.mutex); | | ~~~~~~~~~~~~~~~~~~ | | | | | (7) ...to here | 242 | do_send(); | | ~~~~~~~~~ | | | | | (8) calling 'do_send' from 'test' | +--> 'do_send': events 9-17 | | 146 | static int do_send(void) | | ^~~~~~~ | | | | | (9) entry to 'do_send' |...... | 157 | if (ret) { | | ~ | | | | | (10) following 'false' branch (when 'ret == 0')... |...... | 162 | buf = malloc(MAX_MSG * sizeof(int)); | | ~~~ | | | | | (11) ...to here | | (12) allocated here | 163 | for (i = 0; i < MAX_MSG; i++) | | ~~~ | | | | | (13) following 'true' branch (when 'i != 128')... | 164 | buf[i] = i; | | ~~~ | | | | | (14) ...to here |...... | 172 | if (sockfd < 0) { | | ~ | | | | | (15) following 'true' branch (when 'sockfd < 0')... | 173 | perror("socket"); | | ~~~~~~ | | | | | (16) ...to here | 174 | return 1; | | ~~~~~~ | | | | | (17) 'buf' leaks here; was allocated at (12) | recv-msgall.c:180:3: warning: leak of 'buf' [CWE-401] [-Wanalyzer-malloc-leak] 180 | return 1; | ^~~~~~ 'main': events 1-4 | | 247 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 251 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 254 | ret = test(0); | | ~~~ ~~~~~~~ | | | | | | | (4) calling 'test' from 'main' | | (3) ...to here | +--> 'test': events 5-8 | | 220 | static int test(int use_recvmsg) | | ^~~~ | | | | | (5) entry to 'test' |...... | 235 | if (ret) { | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 241 | pthread_mutex_lock(&rd.mutex); | | ~~~~~~~~~~~~~~~~~~ | | | | | (7) ...to here | 242 | do_send(); | | ~~~~~~~~~ | | | | | (8) calling 'do_send' from 'test' | +--> 'do_send': events 9-21 | | 146 | static int do_send(void) | | ^~~~~~~ | | | | | (9) entry to 'do_send' |...... | 157 | if (ret) { | | ~ | | | | | (10) following 'false' branch (when 'ret == 0')... |...... | 162 | buf = malloc(MAX_MSG * sizeof(int)); | | ~~~ | | | | | (11) ...to here | | (12) allocated here | 163 | for (i = 0; i < MAX_MSG; i++) | | ~~~ | | | | | (13) following 'true' branch (when 'i != 128')... | | (15) following 'false' branch (when 'i == 128')... | 164 | buf[i] = i; | | ~~~ | | | | | (14) ...to here | 165 | | 166 | memset(&saddr, 0, sizeof(saddr)); | | ~~~~~~ | | | | | (16) ...to here |...... | 172 | if (sockfd < 0) { | | ~ | | | | | (17) following 'false' branch (when 'sockfd >= 0')... |...... | 177 | ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr)); | | ~~~ | | | | | (18) ...to here | 178 | if (ret < 0) { | | ~ | | | | | (19) following 'true' branch (when 'ret < 0')... | 179 | perror("connect"); | | ~~~~~~ | | | | | (20) ...to here | 180 | return 1; | | ~~~~~~ | | | | | (21) 'buf' leaks here; was allocated at (12) | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o socket-rw-offset.t socket-rw-offset.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o sq-full.t sq-full.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o sqpoll-cancel-hang.t sqpoll-cancel-hang.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o splice.t splice.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread g++ -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -std=c++11 -DLIBURING_BUILD_TEST -o sq-full-cpp.t sq-full-cpp.cc helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o sqpoll-exit-hang.t sqpoll-exit-hang.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from sqpoll-exit-hang.c:12: In function 'main': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-7 | |sqpoll-exit-hang.c:39:5: | 39 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 47 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 50 | p.flags = IORING_SETUP_SQPOLL; | | ~ | | | | | (3) ...to here |...... | 54 | if (ret) { | | ~ | | | | | (4) following 'false' branch (when 'ret == 0')... |...... | 63 | if (!(p.features & IORING_FEAT_SQPOLL_NONFIXED)) { | | ~~ ~ | | | | | | | (6) following 'false' branch... | | (5) ...to here |...... | 68 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (7) ...to here | 'main': event 8 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (8) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 9-12 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (9) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (10) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (12) following 'false' branch... | | (11) ...to here | '_io_uring_get_sqe': event 13 | |cc1: | (13): ...to here | '_io_uring_get_sqe': event 14 | |cc1: | (14): '' is NULL | <------+ | 'main': events 15-16 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (16) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (15) return of NULL to 'main' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o ringbuf-read.t ringbuf-read.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o sqpoll-sleep.t sqpoll-sleep.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o sqpoll-disable-exit.t sqpoll-disable-exit.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o io_uring_register.t io_uring_register.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from helpers.h:12, from io_uring_register.c:26: io_uring_register.c: In function 'test_shmem': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-8 | |io_uring_register.c:572:5: | 572 | int main(int argc, char **argv) | | ^~~~ | | | | | (1) entry to 'main' |...... | 579 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 583 | pagesize = getpagesize(); | | ~~~~~~~~ | | | | | (3) ...to here | 584 | ret = getrlimit(RLIMIT_MEMLOCK, &rlim); | 585 | if (ret < 0) { | | ~ | | | | | (4) following 'false' branch (when 'ret >= 0')... |...... | 589 | mlock_limit = rlim.rlim_cur; | | ~~~~~~~~~~~ | | | | | (5) ...to here | 590 | devnull = open("/dev/null", O_RDWR); | 591 | if (devnull < 0) { | | ~ | | | | | (6) following 'false' branch... |...... | 597 | status |= expect_fail(-1, 0, NULL, 0, EBADF); | | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (8) calling 'expect_fail' from 'main' | | (7) ...to here | +--> 'expect_fail': events 9-15 | | 45 | static int expect_fail(int fd, unsigned int opcode, void *arg, | | ^~~~~~~~~~~ | | | | | (9) entry to 'expect_fail' |...... | 51 | if (ret != -1) { | | ~ | | | | | (10) following 'true' branch (when 'ret != -1')... | 52 | int ret2 = 0; | | ~~~ | | | | | (11) ...to here |...... | 55 | if (opcode == IORING_REGISTER_BUFFERS) { | | ~ | | | | | (12) following 'true' branch (when 'opcode == 0')... | 56 | ret2 = __sys_io_uring_register(fd, | | ~~~~ | | | | | (13) ...to here |...... | 62 | if (ret2) { | | ~ | | | | | (14) following 'false' branch (when 'ret2 == 0')... |...... | 66 | return 1; | | ~~~~~~ | | | | | (15) ...to here | <------+ | 'main': events 16-17 | | 597 | status |= expect_fail(-1, 0, NULL, 0, EBADF); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (16) returning to 'main' from 'expect_fail' | 598 | /* valid fd that is not an io_uring fd */ | 599 | status |= expect_fail(devnull, 0, NULL, 0, EOPNOTSUPP); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (17) calling 'expect_fail' from 'main' | +--> 'expect_fail': events 18-24 | | 45 | static int expect_fail(int fd, unsigned int opcode, void *arg, | | ^~~~~~~~~~~ | | | | | (18) entry to 'expect_fail' |...... | 51 | if (ret != -1) { | | ~ | | | | | (19) following 'true' branch (when 'ret != -1')... | 52 | int ret2 = 0; | | ~~~ | | | | | (20) ...to here |...... | 55 | if (opcode == IORING_REGISTER_BUFFERS) { | | ~ | | | | | (21) following 'true' branch (when 'opcode == 0')... | 56 | ret2 = __sys_io_uring_register(fd, | | ~~~~ | | | | | (22) ...to here |...... | 62 | if (ret2) { | | ~ | | | | | (23) following 'false' branch (when 'ret2 == 0')... |...... | 66 | return 1; | | ~~~~~~ | | | | | (24) ...to here | <------+ | 'main': events 25-26 | | 599 | status |= expect_fail(devnull, 0, NULL, 0, EOPNOTSUPP); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (25) returning to 'main' from 'expect_fail' |...... | 603 | fd = new_io_uring(1, &p); | | ~~~~~~~~~~~~~~~~~~~ | | | | | (26) calling 'new_io_uring' from 'main' | +--> 'new_io_uring': events 27-29 | | 76 | static int new_io_uring(int entries, struct io_uring_params *p) | | ^~~~~~~~~~~~ | | | | | (27) entry to 'new_io_uring' |...... | 81 | if (fd < 0) { | | ~ | | | | | (28) following 'false' branch (when 'fd >= 0')... |...... | 85 | return fd; | | ~~~~~~ | | | | | (29) ...to here | <------+ | 'main': events 30-31 | | 603 | fd = new_io_uring(1, &p); | | ^~~~~~~~~~~~~~~~~~~ | | | | | (30) returning to 'main' from 'new_io_uring' | 604 | ret = expect_fail(fd, ~0U, NULL, 0, EINVAL); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (31) calling 'expect_fail' from 'main' | +--> 'expect_fail': events 32-38 | | 45 | static int expect_fail(int fd, unsigned int opcode, void *arg, | | ^~~~~~~~~~~ | | | | | (32) entry to 'expect_fail' |...... | 51 | if (ret != -1) { | | ~ | | | | | (33) following 'true' branch (when 'ret != -1')... | 52 | int ret2 = 0; | | ~~~ | | | | | (34) ...to here |...... | 55 | if (opcode == IORING_REGISTER_BUFFERS) { | | ~ | | | | | (35) following 'false' branch (when 'opcode != 0')... |...... | 58 | } else if (opcode == IORING_REGISTER_FILES) { | | ~~ ~ | | | | | | | (37) following 'false' branch (when 'opcode != 2')... | | (36) ...to here |...... | 66 | return 1; | | ~~~~~~ | | | | | (38) ...to here | <------+ | 'main': events 39-42 | | 604 | ret = expect_fail(fd, ~0U, NULL, 0, EINVAL); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (39) returning to 'main' from 'expect_fail' | 605 | if (ret) { | | ~ | | | | | (40) following 'true' branch (when 'ret != 0')... |...... | 608 | close(fd); | | ~~~~~ | | | | | (41) ...to here | 609 | fd = new_io_uring(1, &p); | | ~~~~~~~~~~~~~~~~~~~ | | | | | (42) calling 'new_io_uring' from 'main' | +--> 'new_io_uring': events 43-45 | | 76 | static int new_io_uring(int entries, struct io_uring_params *p) | | ^~~~~~~~~~~~ | | | | | (43) entry to 'new_io_uring' |...... | 81 | if (fd < 0) { | | ~ | | | | | (44) following 'false' branch (when 'fd >= 0')... |...... | 85 | return fd; | | ~~~~~~ | | | | | (45) ...to here | <------+ | 'main': events 46-47 | | 609 | fd = new_io_uring(1, &p); | | ^~~~~~~~~~~~~~~~~~~ | | | | | (46) returning to 'main' from 'new_io_uring' |...... | 613 | status |= test_iovec_size(fd); | | ~~~~~~~~~~~~~~~~~~~ | | | | | (47) calling 'test_iovec_size' from 'main' | +--> 'test_iovec_size': events 48-49 | | 314 | static int test_iovec_size(int fd) | | ^~~~~~~~~~~~~~~ | | | | | (48) entry to 'test_iovec_size' |...... | 324 | status |= expect_fail(fd, IORING_REGISTER_BUFFERS, &iov, 1, EFAULT); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (49) calling 'expect_fail' from 'test_iovec_size' | +--> 'expect_fail': events 50-56 | | 45 | static int expect_fail(int fd, unsigned int opcode, void *arg, | | ^~~~~~~~~~~ | | | | | (50) entry to 'expect_fail' |...... | 51 | if (ret != -1) { | | ~ | | | | | (51) following 'true' branch (when 'ret != -1')... | 52 | int ret2 = 0; | | ~~~ | | | | | (52) ...to here |...... | 55 | if (opcode == IORING_REGISTER_BUFFERS) { | | ~ | | | | | (53) following 'true' branch (when 'opcode == 0')... | 56 | ret2 = __sys_io_uring_register(fd, | | ~~~~ | | | | | (54) ...to here |...... | 62 | if (ret2) { | | ~ | | | | | (55) following 'false' branch (when 'ret2 == 0')... |...... | 66 | return 1; | | ~~~~~~ | | | | | (56) ...to here | <------+ | 'test_iovec_size': events 57-58 | | 324 | status |= expect_fail(fd, IORING_REGISTER_BUFFERS, &iov, 1, EFAULT); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (57) returning to 'test_iovec_size' from 'expect_fail' |...... | 329 | status |= expect_fail(fd, IORING_REGISTER_BUFFERS, &iov, 1, EFAULT); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (58) calling 'expect_fail' from 'test_iovec_size' | +--> 'expect_fail': events 59-65 | | 45 | static int expect_fail(int fd, unsigned int opcode, void *arg, | | ^~~~~~~~~~~ | | | | | (59) entry to 'expect_fail' |...... | 51 | if (ret != -1) { | | ~ | | | | | (60) following 'true' branch (when 'ret != -1')... | 52 | int ret2 = 0; | | ~~~ | | | | | (61) ...to here |...... | 55 | if (opcode == IORING_REGISTER_BUFFERS) { | | ~ | | | | | (62) following 'true' branch (when 'opcode == 0')... | 56 | ret2 = __sys_io_uring_register(fd, | | ~~~~ | | | | | (63) ...to here |...... | 62 | if (ret2) { | | ~ | | | | | (64) following 'false' branch (when 'ret2 == 0')... |...... | 66 | return 1; | | ~~~~~~ | | | | | (65) ...to here | <------+ | 'test_iovec_size': event 66 | | 329 | status |= expect_fail(fd, IORING_REGISTER_BUFFERS, &iov, 1, EFAULT); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (66) returning to 'test_iovec_size' from 'expect_fail' | 'test_iovec_size': event 67 | | 335 | assert(buf != MAP_FAILED); | | ^~~~~~ | | | | | (67) following 'true' branch... | 'test_iovec_size': event 68 | | 336 | ret = munmap(buf + pagesize, pagesize); | | ^~~ | | | | | (68) ...to here | 'test_iovec_size': event 69 | | 337 | assert(ret == 0); | | ^~~~~~ | | | | | (69) following 'true' branch (when 'ret == 0')... | 'test_iovec_size': events 70-71 | | 338 | iov.iov_base = buf; | | ^~~ | | | | | (70) ...to here | 339 | iov.iov_len = 2 * pagesize; | 340 | status |= expect_fail(fd, IORING_REGISTER_BUFFERS, &iov, 1, EFAULT); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (71) calling 'expect_fail' from 'test_iovec_size' | +--> 'expect_fail': events 72-78 | | 45 | static int expect_fail(int fd, unsigned int opcode, void *arg, | | ^~~~~~~~~~~ | | | | | (72) entry to 'expect_fail' |...... | 51 | if (ret != -1) { | | ~ | | | | | (73) following 'true' branch (when 'ret != -1')... | 52 | int ret2 = 0; | | ~~~ | | | | | (74) ...to here |...... | 55 | if (opcode == IORING_REGISTER_BUFFERS) { | | ~ | | | | | (75) following 'true' branch (when 'opcode == 0')... | 56 | ret2 = __sys_io_uring_register(fd, | | ~~~~ | | | | | (76) ...to here |...... | 62 | if (ret2) { | | ~ | | | | | (77) following 'false' branch (when 'ret2 == 0')... |...... | 66 | return 1; | | ~~~~~~ | | | | | (78) ...to here | <------+ | 'test_iovec_size': events 79-81 | | 340 | status |= expect_fail(fd, IORING_REGISTER_BUFFERS, &iov, 1, EFAULT); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (79) returning to 'test_iovec_size' from 'expect_fail' |...... | 347 | if (buf == MAP_FAILED) { | | ~ | | | | | (80) following 'true' branch... | 348 | printf("Unable to map a huge page. Try increasing " | | ~~~~~~ | | | | | (81) ...to here | 'test_iovec_size': event 82 | | 379 | assert(ret == 0); | | ^~~~~~ | | | | | (82) following 'true' branch (when 'ret == 0')... | 'test_iovec_size': events 83-84 | | 382 | buf = map_filebacked(2*1024*1024); | | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (84) calling 'map_filebacked' from 'test_iovec_size' | | (83) ...to here | +--> 'map_filebacked': events 85-87 | | 90 | static void *map_filebacked(size_t size) | | ^~~~~~~~~~~~~~ | | | | | (85) entry to 'map_filebacked' |...... | 97 | if (fd < 0) { | | ~ | | | | | (86) following 'true' branch (when 'fd < 0')... | 98 | perror("mkstemp"); | | ~~~~~~ | | | | | (87) ...to here | <------+ | 'test_iovec_size': events 88-91 | | 382 | buf = map_filebacked(2*1024*1024); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (88) returning to 'test_iovec_size' from 'map_filebacked' | 383 | if (!buf) | | ~ | | | | | (89) following 'true' branch... | 384 | status = 1; | | ~~~~~~ | | | | | (90) ...to here |...... | 387 | status |= expect_fail(fd, IORING_REGISTER_BUFFERS, &iov, 1, EOPNOTSUPP); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (91) calling 'expect_fail' from 'test_iovec_size' | +--> 'expect_fail': events 92-98 | | 45 | static int expect_fail(int fd, unsigned int opcode, void *arg, | | ^~~~~~~~~~~ | | | | | (92) entry to 'expect_fail' |...... | 51 | if (ret != -1) { | | ~ | | | | | (93) following 'true' branch (when 'ret != -1')... | 52 | int ret2 = 0; | | ~~~ | | | | | (94) ...to here |...... | 55 | if (opcode == IORING_REGISTER_BUFFERS) { | | ~ | | | | | (95) following 'true' branch (when 'opcode == 0')... | 56 | ret2 = __sys_io_uring_register(fd, | | ~~~~ | | | | | (96) ...to here |...... | 62 | if (ret2) { | | ~ | | | | | (97) following 'false' branch (when 'ret2 == 0')... |...... | 66 | return 1; | | ~~~~~~ | | | | | (98) ...to here | <------+ | 'test_iovec_size': event 99 | | 387 | status |= expect_fail(fd, IORING_REGISTER_BUFFERS, &iov, 1, EOPNOTSUPP); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (99) returning to 'test_iovec_size' from 'expect_fail' | <------+ | 'main': events 100-101 | | 613 | status |= test_iovec_size(fd); | | ^~~~~~~~~~~~~~~~~~~ | | | | | (100) returning to 'main' from 'test_iovec_size' | 614 | status |= test_iovec_nr(fd); | | ~~~~~~~~~~~~~~~~~ | | | | | (101) calling 'test_iovec_nr' from 'main' | +--> 'test_iovec_nr': events 102-104 | | 274 | static int test_iovec_nr(int fd) | | ^~~~~~~~~~~~~ | | | | | (102) entry to 'test_iovec_nr' |...... | 282 | if (!iovs) { | | ~ | | | | | (103) following 'true' branch (when 'iovs' is NULL)... | 283 | fprintf(stdout, "can't allocate iovecs, skip\n"); | | ~~~~~~~ | | | | | (104) ...to here | <------+ | 'main': events 105-106 | | 614 | status |= test_iovec_nr(fd); | | ^~~~~~~~~~~~~~~~~ | | | | | (105) returning to 'main' from 'test_iovec_nr' | 615 | /* IORING_REGISTER_FILES */ | 616 | status |= test_max_fds(fd); | | ~~~~~~~~~~~~~~~~ | | | | | (106) calling 'test_max_fds' from 'main' | +--> 'test_max_fds': events 107-110 | | 125 | static int test_max_fds(int uring_fd) | | ^~~~~~~~~~~~ | | | | | (107) entry to 'test_max_fds' |...... | 144 | if (fd_as == MAP_FAILED) { | | ~ | | | | | (108) following 'true' branch (when 'fd_as == 18446744073709551615')... | 145 | if (errno == ENOMEM) | | ~~ ~ | | | | | | | (110) following 'true' branch... | | (109) ...to here | 'test_max_fds': event 111 | |cc1: | (111): ...to here | <------+ | 'main': events 112-113 | | 616 | status |= test_max_fds(fd); | | ^~~~~~~~~~~~~~~~ | | | | | (112) returning to 'main' from 'test_max_fds' |...... | 619 | status |= test_poll_ringfd(); | | ~~~~~~~~~~~~~~~~~~ | | | | | (113) calling 'test_poll_ringfd' from 'main' | +--> 'test_poll_ringfd': events 114-116 | | 435 | static int test_poll_ringfd(void) | | ^~~~~~~~~~~~~~~~ | | | | | (114) entry to 'test_poll_ringfd' |...... | 443 | if (ret) { | | ~ | | | | | (115) following 'true' branch (when 'ret != 0')... | 444 | perror("io_uring_queue_init"); | | ~~~~~~ | | | | | (116) ...to here | <------+ | 'main': events 117-120 | | 619 | status |= test_poll_ringfd(); | | ^~~~~~~~~~~~~~~~~~ | | | | | (117) returning to 'main' from 'test_poll_ringfd' | 620 | | 621 | if (status) | | ~ | | | | | (118) following 'true' branch (when 'status != 0')... | 622 | fprintf(stderr, "FAIL\n"); | | ~~~~~~~ | | | | | (119) ...to here | 623 | | 624 | ret = test_shmem(); | | ~~~~~~~~~~~~ | | | | | (120) calling 'test_shmem' from 'main' | +--> 'test_shmem': events 121-130 | | 465 | static int test_shmem(void) | | ^~~~~~~~~~ | | | | | (121) entry to 'test_shmem' |...... | 478 | if (ret) | | ~ | | | | | (122) following 'false' branch (when 'ret == 0')... |...... | 481 | if (pipe(pipefd)) { | | ~~ ~ | | | | | | | (124) following 'false' branch... | | (123) ...to here |...... | 485 | memfd = memfd_create("uring-shmem-test", 0); | | ~~~~~ | | | | | (125) ...to here | 486 | if (memfd < 0) { | | ~ | | | | | (126) following 'false' branch (when 'memfd >= 0')... |...... | 490 | if (ftruncate(memfd, len)) { | | ~~ ~ | | | | | | | (128) following 'false' branch... | | (127) ...to here |...... | 494 | mem = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, memfd, 0); | | ~~~ | | | | | (129) ...to here | 495 | if (!mem) { | | ~ | | | | | (130) following 'false' branch (when 'mem' is non-NULL)... | 'test_shmem': event 131 | |cc1: | (131): ...to here | 'test_shmem': events 132-137 | | 499 | for (i = 0; i < len; i++) | | ^~~ | | | | | (132) following 'true' branch (when 'i != 4096')... | | (134) following 'false' branch (when 'i == 4096')... | 500 | mem[i] = pattern; | | ~~~ | | | | | (133) ...to here | 501 | | 502 | iov.iov_base = mem; | | ~~~ | | | | | (135) ...to here |...... | 505 | if (ret) { | | ~ | | | | | (136) following 'false' branch (when 'ret == 0')... |...... | 517 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (137) ...to here | 'test_shmem': event 138 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (138) calling '_io_uring_get_sqe' from 'test_shmem' | +--> '_io_uring_get_sqe': events 139-142 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (139) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (140) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (142) following 'false' branch... | | (141) ...to here | '_io_uring_get_sqe': event 143 | |cc1: | (143): ...to here | <------+ | 'test_shmem': event 144 | | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (144) returning to 'test_shmem' from '_io_uring_get_sqe' | 'test_shmem': events 145-147 | |io_uring_register.c:522:5: | 522 | if (ret != 1) { | | ^ | | | | | (145) following 'false' branch (when 'ret == 1')... |...... | 526 | ret = io_uring_wait_cqe(&ring, &cqe); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (147) calling 'io_uring_wait_cqe' from 'test_shmem' | | (146) ...to here | +--> 'io_uring_wait_cqe': events 148-149 | |../src/include/liburing.h:1052:19: | 1052 | static inline int io_uring_wait_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~ | | | | | (148) entry to 'io_uring_wait_cqe' |...... | 1055 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (149) calling '__io_uring_peek_cqe' from 'io_uring_wait_cqe' | +--> '__io_uring_peek_cqe': events 150-151 | | 993 | static inline int __io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (150) entry to '__io_uring_peek_cqe' |...... | 1003 | if (ring->flags & IORING_SETUP_CQE32) | | ~ | | | | | (151) following 'false' branch... | '__io_uring_peek_cqe': event 152 | |cc1: | (152): ...to here | '__io_uring_peek_cqe': events 153-156 | | 1012 | if (!available) | | ^ | | | | | (153) following 'true' branch (when 'available == 0')... |...... | 1029 | *cqe_ptr = cqe; | | ~ | | | | | (154) ...to here | 1030 | if (nr_available) | | ~ | | | | | (155) following 'false' branch (when 'nr_available' is NULL)... | 1031 | *nr_available = available; | 1032 | return err; | | ~~~~~~ | | | | | (156) ...to here | <------+ | 'io_uring_wait_cqe': events 157-160 | | 1055 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | | | | | (159) ...to here | | | | (160) following 'false' branch... | | | (157) returning to 'io_uring_wait_cqe' from '__io_uring_peek_cqe' | | (158) following 'true' branch... | 'io_uring_wait_cqe': event 161 | |cc1: | (161): ...to here | <------+ | 'test_shmem': events 162-168 | |io_uring_register.c:526:8: | 526 | ret = io_uring_wait_cqe(&ring, &cqe); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (162) returning to 'test_shmem' from 'io_uring_wait_cqe' | 527 | if (ret < 0 || cqe->user_data != 1 || cqe->res != 512) { | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | | | | | | | (166) ...to here | | | | (164) ...to here (167) following 'false' branch... | | | (165) following 'false' branch... | | (163) following 'false' branch (when 'ret >= 0')... |...... | 531 | io_uring_cqe_seen(&ring, cqe); | | ~~~~~~~~~~~~~~~~~ | | | | | (168) ...to here | 'test_shmem': event 169 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (169) calling '_io_uring_get_sqe' from 'test_shmem' | +--> '_io_uring_get_sqe': events 170-173 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (170) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (171) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (173) following 'false' branch... | | (172) ...to here | '_io_uring_get_sqe': event 174 | |cc1: | (174): ...to here | '_io_uring_get_sqe': event 175 | |cc1: | (175): '' is NULL | <------+ | 'test_shmem': events 176-177 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (177) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (176) return of NULL to 'test_shmem' from '_io_uring_get_sqe' | ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-8 | |io_uring_register.c:572:5: | 572 | int main(int argc, char **argv) | | ^~~~ | | | | | (1) entry to 'main' |...... | 579 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 583 | pagesize = getpagesize(); | | ~~~~~~~~ | | | | | (3) ...to here | 584 | ret = getrlimit(RLIMIT_MEMLOCK, &rlim); | 585 | if (ret < 0) { | | ~ | | | | | (4) following 'false' branch (when 'ret >= 0')... |...... | 589 | mlock_limit = rlim.rlim_cur; | | ~~~~~~~~~~~ | | | | | (5) ...to here | 590 | devnull = open("/dev/null", O_RDWR); | 591 | if (devnull < 0) { | | ~ | | | | | (6) following 'false' branch... |...... | 597 | status |= expect_fail(-1, 0, NULL, 0, EBADF); | | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (8) calling 'expect_fail' from 'main' | | (7) ...to here | +--> 'expect_fail': events 9-15 | | 45 | static int expect_fail(int fd, unsigned int opcode, void *arg, | | ^~~~~~~~~~~ | | | | | (9) entry to 'expect_fail' |...... | 51 | if (ret != -1) { | | ~ | | | | | (10) following 'true' branch (when 'ret != -1')... | 52 | int ret2 = 0; | | ~~~ | | | | | (11) ...to here |...... | 55 | if (opcode == IORING_REGISTER_BUFFERS) { | | ~ | | | | | (12) following 'true' branch (when 'opcode == 0')... | 56 | ret2 = __sys_io_uring_register(fd, | | ~~~~ | | | | | (13) ...to here |...... | 62 | if (ret2) { | | ~ | | | | | (14) following 'false' branch (when 'ret2 == 0')... |...... | 66 | return 1; | | ~~~~~~ | | | | | (15) ...to here | <------+ | 'main': events 16-17 | | 597 | status |= expect_fail(-1, 0, NULL, 0, EBADF); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (16) returning to 'main' from 'expect_fail' | 598 | /* valid fd that is not an io_uring fd */ | 599 | status |= expect_fail(devnull, 0, NULL, 0, EOPNOTSUPP); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (17) calling 'expect_fail' from 'main' | +--> 'expect_fail': events 18-24 | | 45 | static int expect_fail(int fd, unsigned int opcode, void *arg, | | ^~~~~~~~~~~ | | | | | (18) entry to 'expect_fail' |...... | 51 | if (ret != -1) { | | ~ | | | | | (19) following 'true' branch (when 'ret != -1')... | 52 | int ret2 = 0; | | ~~~ | | | | | (20) ...to here |...... | 55 | if (opcode == IORING_REGISTER_BUFFERS) { | | ~ | | | | | (21) following 'true' branch (when 'opcode == 0')... | 56 | ret2 = __sys_io_uring_register(fd, | | ~~~~ | | | | | (22) ...to here |...... | 62 | if (ret2) { | | ~ | | | | | (23) following 'false' branch (when 'ret2 == 0')... |...... | 66 | return 1; | | ~~~~~~ | | | | | (24) ...to here | <------+ | 'main': events 25-26 | | 599 | status |= expect_fail(devnull, 0, NULL, 0, EOPNOTSUPP); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (25) returning to 'main' from 'expect_fail' |...... | 603 | fd = new_io_uring(1, &p); | | ~~~~~~~~~~~~~~~~~~~ | | | | | (26) calling 'new_io_uring' from 'main' | +--> 'new_io_uring': events 27-29 | | 76 | static int new_io_uring(int entries, struct io_uring_params *p) | | ^~~~~~~~~~~~ | | | | | (27) entry to 'new_io_uring' |...... | 81 | if (fd < 0) { | | ~ | | | | | (28) following 'false' branch (when 'fd >= 0')... |...... | 85 | return fd; | | ~~~~~~ | | | | | (29) ...to here | <------+ | 'main': events 30-31 | | 603 | fd = new_io_uring(1, &p); | | ^~~~~~~~~~~~~~~~~~~ | | | | | (30) returning to 'main' from 'new_io_uring' | 604 | ret = expect_fail(fd, ~0U, NULL, 0, EINVAL); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (31) calling 'expect_fail' from 'main' | +--> 'expect_fail': events 32-38 | | 45 | static int expect_fail(int fd, unsigned int opcode, void *arg, | | ^~~~~~~~~~~ | | | | | (32) entry to 'expect_fail' |...... | 51 | if (ret != -1) { | | ~ | | | | | (33) following 'true' branch (when 'ret != -1')... | 52 | int ret2 = 0; | | ~~~ | | | | | (34) ...to here |...... | 55 | if (opcode == IORING_REGISTER_BUFFERS) { | | ~ | | | | | (35) following 'false' branch (when 'opcode != 0')... |...... | 58 | } else if (opcode == IORING_REGISTER_FILES) { | | ~~ ~ | | | | | | | (37) following 'false' branch (when 'opcode != 2')... | | (36) ...to here |...... | 66 | return 1; | | ~~~~~~ | | | | | (38) ...to here | <------+ | 'main': events 39-42 | | 604 | ret = expect_fail(fd, ~0U, NULL, 0, EINVAL); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (39) returning to 'main' from 'expect_fail' | 605 | if (ret) { | | ~ | | | | | (40) following 'true' branch (when 'ret != 0')... |...... | 608 | close(fd); | | ~~~~~ | | | | | (41) ...to here | 609 | fd = new_io_uring(1, &p); | | ~~~~~~~~~~~~~~~~~~~ | | | | | (42) calling 'new_io_uring' from 'main' | +--> 'new_io_uring': events 43-45 | | 76 | static int new_io_uring(int entries, struct io_uring_params *p) | | ^~~~~~~~~~~~ | | | | | (43) entry to 'new_io_uring' |...... | 81 | if (fd < 0) { | | ~ | | | | | (44) following 'false' branch (when 'fd >= 0')... |...... | 85 | return fd; | | ~~~~~~ | | | | | (45) ...to here | <------+ | 'main': events 46-47 | | 609 | fd = new_io_uring(1, &p); | | ^~~~~~~~~~~~~~~~~~~ | | | | | (46) returning to 'main' from 'new_io_uring' |...... | 613 | status |= test_iovec_size(fd); | | ~~~~~~~~~~~~~~~~~~~ | | | | | (47) calling 'test_iovec_size' from 'main' | +--> 'test_iovec_size': events 48-49 | | 314 | static int test_iovec_size(int fd) | | ^~~~~~~~~~~~~~~ | | | | | (48) entry to 'test_iovec_size' |...... | 324 | status |= expect_fail(fd, IORING_REGISTER_BUFFERS, &iov, 1, EFAULT); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (49) calling 'expect_fail' from 'test_iovec_size' | +--> 'expect_fail': events 50-56 | | 45 | static int expect_fail(int fd, unsigned int opcode, void *arg, | | ^~~~~~~~~~~ | | | | | (50) entry to 'expect_fail' |...... | 51 | if (ret != -1) { | | ~ | | | | | (51) following 'true' branch (when 'ret != -1')... | 52 | int ret2 = 0; | | ~~~ | | | | | (52) ...to here |...... | 55 | if (opcode == IORING_REGISTER_BUFFERS) { | | ~ | | | | | (53) following 'true' branch (when 'opcode == 0')... | 56 | ret2 = __sys_io_uring_register(fd, | | ~~~~ | | | | | (54) ...to here |...... | 62 | if (ret2) { | | ~ | | | | | (55) following 'false' branch (when 'ret2 == 0')... |...... | 66 | return 1; | | ~~~~~~ | | | | | (56) ...to here | <------+ | 'test_iovec_size': events 57-58 | | 324 | status |= expect_fail(fd, IORING_REGISTER_BUFFERS, &iov, 1, EFAULT); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (57) returning to 'test_iovec_size' from 'expect_fail' |...... | 329 | status |= expect_fail(fd, IORING_REGISTER_BUFFERS, &iov, 1, EFAULT); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (58) calling 'expect_fail' from 'test_iovec_size' | +--> 'expect_fail': events 59-65 | | 45 | static int expect_fail(int fd, unsigned int opcode, void *arg, | | ^~~~~~~~~~~ | | | | | (59) entry to 'expect_fail' |...... | 51 | if (ret != -1) { | | ~ | | | | | (60) following 'true' branch (when 'ret != -1')... | 52 | int ret2 = 0; | | ~~~ | | | | | (61) ...to here |...... | 55 | if (opcode == IORING_REGISTER_BUFFERS) { | | ~ | | | | | (62) following 'true' branch (when 'opcode == 0')... | 56 | ret2 = __sys_io_uring_register(fd, | | ~~~~ | | | | | (63) ...to here |...... | 62 | if (ret2) { | | ~ | | | | | (64) following 'false' branch (when 'ret2 == 0')... |...... | 66 | return 1; | | ~~~~~~ | | | | | (65) ...to here | <------+ | 'test_iovec_size': event 66 | | 329 | status |= expect_fail(fd, IORING_REGISTER_BUFFERS, &iov, 1, EFAULT); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (66) returning to 'test_iovec_size' from 'expect_fail' | 'test_iovec_size': event 67 | | 335 | assert(buf != MAP_FAILED); | | ^~~~~~ | | | | | (67) following 'true' branch... | 'test_iovec_size': event 68 | | 336 | ret = munmap(buf + pagesize, pagesize); | | ^~~ | | | | | (68) ...to here | 'test_iovec_size': event 69 | | 337 | assert(ret == 0); | | ^~~~~~ | | | | | (69) following 'true' branch (when 'ret == 0')... | 'test_iovec_size': events 70-71 | | 338 | iov.iov_base = buf; | | ^~~ | | | | | (70) ...to here | 339 | iov.iov_len = 2 * pagesize; | 340 | status |= expect_fail(fd, IORING_REGISTER_BUFFERS, &iov, 1, EFAULT); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (71) calling 'expect_fail' from 'test_iovec_size' | +--> 'expect_fail': events 72-78 | | 45 | static int expect_fail(int fd, unsigned int opcode, void *arg, | | ^~~~~~~~~~~ | | | | | (72) entry to 'expect_fail' |...... | 51 | if (ret != -1) { | | ~ | | | | | (73) following 'true' branch (when 'ret != -1')... | 52 | int ret2 = 0; | | ~~~ | | | | | (74) ...to here |...... | 55 | if (opcode == IORING_REGISTER_BUFFERS) { | | ~ | | | | | (75) following 'true' branch (when 'opcode == 0')... | 56 | ret2 = __sys_io_uring_register(fd, | | ~~~~ | | | | | (76) ...to here |...... | 62 | if (ret2) { | | ~ | | | | | (77) following 'false' branch (when 'ret2 == 0')... |...... | 66 | return 1; | | ~~~~~~ | | | | | (78) ...to here | <------+ | 'test_iovec_size': events 79-81 | | 340 | status |= expect_fail(fd, IORING_REGISTER_BUFFERS, &iov, 1, EFAULT); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (79) returning to 'test_iovec_size' from 'expect_fail' |...... | 347 | if (buf == MAP_FAILED) { | | ~ | | | | | (80) following 'true' branch... | 348 | printf("Unable to map a huge page. Try increasing " | | ~~~~~~ | | | | | (81) ...to here | 'test_iovec_size': event 82 | | 379 | assert(ret == 0); | | ^~~~~~ | | | | | (82) following 'true' branch (when 'ret == 0')... | 'test_iovec_size': events 83-84 | | 382 | buf = map_filebacked(2*1024*1024); | | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (84) calling 'map_filebacked' from 'test_iovec_size' | | (83) ...to here | +--> 'map_filebacked': events 85-87 | | 90 | static void *map_filebacked(size_t size) | | ^~~~~~~~~~~~~~ | | | | | (85) entry to 'map_filebacked' |...... | 97 | if (fd < 0) { | | ~ | | | | | (86) following 'true' branch (when 'fd < 0')... | 98 | perror("mkstemp"); | | ~~~~~~ | | | | | (87) ...to here | <------+ | 'test_iovec_size': events 88-91 | | 382 | buf = map_filebacked(2*1024*1024); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (88) returning to 'test_iovec_size' from 'map_filebacked' | 383 | if (!buf) | | ~ | | | | | (89) following 'true' branch... | 384 | status = 1; | | ~~~~~~ | | | | | (90) ...to here |...... | 387 | status |= expect_fail(fd, IORING_REGISTER_BUFFERS, &iov, 1, EOPNOTSUPP); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (91) calling 'expect_fail' from 'test_iovec_size' | +--> 'expect_fail': events 92-98 | | 45 | static int expect_fail(int fd, unsigned int opcode, void *arg, | | ^~~~~~~~~~~ | | | | | (92) entry to 'expect_fail' |...... | 51 | if (ret != -1) { | | ~ | | | | | (93) following 'true' branch (when 'ret != -1')... | 52 | int ret2 = 0; | | ~~~ | | | | | (94) ...to here |...... | 55 | if (opcode == IORING_REGISTER_BUFFERS) { | | ~ | | | | | (95) following 'true' branch (when 'opcode == 0')... | 56 | ret2 = __sys_io_uring_register(fd, | | ~~~~ | | | | | (96) ...to here |...... | 62 | if (ret2) { | | ~ | | | | | (97) following 'false' branch (when 'ret2 == 0')... |...... | 66 | return 1; | | ~~~~~~ | | | | | (98) ...to here | <------+ | 'test_iovec_size': event 99 | | 387 | status |= expect_fail(fd, IORING_REGISTER_BUFFERS, &iov, 1, EOPNOTSUPP); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (99) returning to 'test_iovec_size' from 'expect_fail' | <------+ | 'main': events 100-101 | | 613 | status |= test_iovec_size(fd); | | ^~~~~~~~~~~~~~~~~~~ | | | | | (100) returning to 'main' from 'test_iovec_size' | 614 | status |= test_iovec_nr(fd); | | ~~~~~~~~~~~~~~~~~ | | | | | (101) calling 'test_iovec_nr' from 'main' | +--> 'test_iovec_nr': events 102-104 | | 274 | static int test_iovec_nr(int fd) | | ^~~~~~~~~~~~~ | | | | | (102) entry to 'test_iovec_nr' |...... | 282 | if (!iovs) { | | ~ | | | | | (103) following 'true' branch (when 'iovs' is NULL)... | 283 | fprintf(stdout, "can't allocate iovecs, skip\n"); | | ~~~~~~~ | | | | | (104) ...to here | <------+ | 'main': events 105-106 | | 614 | status |= test_iovec_nr(fd); | | ^~~~~~~~~~~~~~~~~ | | | | | (105) returning to 'main' from 'test_iovec_nr' | 615 | /* IORING_REGISTER_FILES */ | 616 | status |= test_max_fds(fd); | | ~~~~~~~~~~~~~~~~ | | | | | (106) calling 'test_max_fds' from 'main' | +--> 'test_max_fds': events 107-110 | | 125 | static int test_max_fds(int uring_fd) | | ^~~~~~~~~~~~ | | | | | (107) entry to 'test_max_fds' |...... | 144 | if (fd_as == MAP_FAILED) { | | ~ | | | | | (108) following 'true' branch (when 'fd_as == 18446744073709551615')... | 145 | if (errno == ENOMEM) | | ~~ ~ | | | | | | | (110) following 'true' branch... | | (109) ...to here | 'test_max_fds': event 111 | |cc1: | (111): ...to here | <------+ | 'main': events 112-113 | | 616 | status |= test_max_fds(fd); | | ^~~~~~~~~~~~~~~~ | | | | | (112) returning to 'main' from 'test_max_fds' |...... | 619 | status |= test_poll_ringfd(); | | ~~~~~~~~~~~~~~~~~~ | | | | | (113) calling 'test_poll_ringfd' from 'main' | +--> 'test_poll_ringfd': events 114-116 | | 435 | static int test_poll_ringfd(void) | | ^~~~~~~~~~~~~~~~ | | | | | (114) entry to 'test_poll_ringfd' |...... | 443 | if (ret) { | | ~ | | | | | (115) following 'true' branch (when 'ret != 0')... | 444 | perror("io_uring_queue_init"); | | ~~~~~~ | | | | | (116) ...to here | <------+ | 'main': events 117-120 | | 619 | status |= test_poll_ringfd(); | | ^~~~~~~~~~~~~~~~~~ | | | | | (117) returning to 'main' from 'test_poll_ringfd' | 620 | | 621 | if (status) | | ~ | | | | | (118) following 'true' branch (when 'status != 0')... | 622 | fprintf(stderr, "FAIL\n"); | | ~~~~~~~ | | | | | (119) ...to here | 623 | | 624 | ret = test_shmem(); | | ~~~~~~~~~~~~ | | | | | (120) calling 'test_shmem' from 'main' | +--> 'test_shmem': events 121-130 | | 465 | static int test_shmem(void) | | ^~~~~~~~~~ | | | | | (121) entry to 'test_shmem' |...... | 478 | if (ret) | | ~ | | | | | (122) following 'false' branch (when 'ret == 0')... |...... | 481 | if (pipe(pipefd)) { | | ~~ ~ | | | | | | | (124) following 'false' branch... | | (123) ...to here |...... | 485 | memfd = memfd_create("uring-shmem-test", 0); | | ~~~~~ | | | | | (125) ...to here | 486 | if (memfd < 0) { | | ~ | | | | | (126) following 'false' branch (when 'memfd >= 0')... |...... | 490 | if (ftruncate(memfd, len)) { | | ~~ ~ | | | | | | | (128) following 'false' branch... | | (127) ...to here |...... | 494 | mem = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, memfd, 0); | | ~~~ | | | | | (129) ...to here | 495 | if (!mem) { | | ~ | | | | | (130) following 'false' branch (when 'mem' is non-NULL)... | 'test_shmem': event 131 | |cc1: | (131): ...to here | 'test_shmem': events 132-137 | | 499 | for (i = 0; i < len; i++) | | ^~~ | | | | | (132) following 'true' branch (when 'i != 4096')... | | (134) following 'false' branch (when 'i == 4096')... | 500 | mem[i] = pattern; | | ~~~ | | | | | (133) ...to here | 501 | | 502 | iov.iov_base = mem; | | ~~~ | | | | | (135) ...to here |...... | 505 | if (ret) { | | ~ | | | | | (136) following 'false' branch (when 'ret == 0')... |...... | 517 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (137) ...to here | 'test_shmem': event 138 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (138) calling '_io_uring_get_sqe' from 'test_shmem' | +--> '_io_uring_get_sqe': events 139-142 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (139) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (140) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (142) following 'false' branch... | | (141) ...to here | '_io_uring_get_sqe': event 143 | |cc1: | (143): ...to here | '_io_uring_get_sqe': event 144 | |cc1: | (144): '' is NULL | <------+ | 'test_shmem': events 145-146 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (146) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (145) return of NULL to 'test_shmem' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o sq-poll-kthread.t sq-poll-kthread.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o submit-link-fail.t submit-link-fail.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from submit-link-fail.c:13: submit-link-fail.c: In function 'test_underprep_fail': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-2 | |submit-link-fail.c:122:5: | 122 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 126 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... | 'main': event 3 | |cc1: | (3): ...to here | 'main': event 4 | | 134 | for (link_size = 0; link_size < 3; link_size++) { | | ^~~ | | | | | (4) following 'true' branch (when 'link_size != 3')... | 'main': event 5 | |cc1: | (5): ...to here | 'main': events 6-8 | | 134 | for (link_size = 0; link_size < 3; link_size++) { | | ~~~ ~~~~~~~~~ | | | | | | | (7) ...to here | | (8) following 'true' branch (when 'link_size != 3')... | 135 | for (fail_idx = 0; fail_idx < link_size; fail_idx++) { | | ^~~ | | | | | (6) following 'false' branch (when 'link_size <= fail_idx')... | 'main': event 9 | |cc1: | (9): ...to here | 'main': event 10 | | 136 | for (i = 0; i < 8; i++) { | | ^~~ | | | | | (10) following 'true' branch (when 'i != 8')... | 'main': event 11 | | 137 | bool hardlink = (i & 1) != 0; | | ^~~~ | | | | | (11) ...to here | 'main': event 12 | | 141 | ret = test_underprep_fail(hardlink, drain, link_last, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (12) calling 'test_underprep_fail' from 'main' | 142 | link_size, fail_idx); | | ~~~~~~~~~~~~~~~~~~~~ | +--> 'test_underprep_fail': events 13-16 | | 17 | static int test_underprep_fail(bool hardlink, bool drain, bool link_last, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (13) entry to 'test_underprep_fail' |...... | 29 | if (drain) | | ~ | | | | | (14) following 'false' branch (when 'drain == 0')... | 30 | link_flags |= IOSQE_IO_DRAIN; | 31 | if (hardlink) | | ~~ ~ | | | | | | | (16) following 'false' branch (when 'hardlink == 0')... | | (15) ...to here | 'test_underprep_fail': event 17 | | 34 | assert(fail_idx < link_size); | | ^~~~~~ | | | | | (17) ...to here | 'test_underprep_fail': event 18 | | 34 | assert(fail_idx < link_size); | | ^~~~~~ | | | | | (18) following 'true' branch (when 'link_size > fail_idx')... | 'test_underprep_fail': event 19 | | 35 | assert(link_size < 40); | | ^~~~~~ | | | | | (19) ...to here | 'test_underprep_fail': event 20 | | 35 | assert(link_size < 40); | | ^~~~~~ | | | | | (20) following 'true' branch (when 'link_size <= 39')... | 'test_underprep_fail': events 21-29 | | 38 | ret = io_uring_queue_init(8, &ring, 0); | | ^~~ | | | | | (21) ...to here | 39 | if (ret) { | | ~ | | | | | (22) following 'false' branch (when 'ret == 0')... |...... | 43 | if (pipe(fds)) { | | ~~ ~ | | | | | | | (24) following 'false' branch... | | (23) ...to here |...... | 48 | if (drain) { | | ~~ ~ | | | | | | | (26) following 'false' branch (when 'drain == 0')... | | (25) ...to here |...... | 57 | for (i = 0; i < link_size; i++) { | | ~~~ | | | | | (27) ...to here | | (28) following 'true' branch (when 'i < link_size')... | 58 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (29) ...to here | 'test_underprep_fail': event 30 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (30) calling '_io_uring_get_sqe' from 'test_underprep_fail' | +--> '_io_uring_get_sqe': events 31-32 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (31) entry to '_io_uring_get_sqe' |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~ | | | | | (32) following 'false' branch... | '_io_uring_get_sqe': event 33 | |cc1: | (33): ...to here | '_io_uring_get_sqe': event 34 | |cc1: | (34): '' is NULL | <------+ | 'test_underprep_fail': event 35 | | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (35) return of NULL to 'test_underprep_fail' from '_io_uring_get_sqe' | 'test_underprep_fail': events 36-37 | |submit-link-fail.c:59:6: | 59 | if (i == fail_idx) { | | ^ | | | | | (36) following 'true' branch (when 'i == fail_idx')... | 60 | io_uring_prep_read(sqe, invalid_fd, buffer, 1, 0); | | ~~~~~~~~~~~~~~~~~~ | | | | | (37) ...to here | 'test_underprep_fail': event 38 | |../src/include/liburing.h:301:14: | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~^~~~~~~~~~~ | | | | | (38) dereference of NULL '' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o submit-reuse.t submit-reuse.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o teardowns.t teardowns.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o sq-poll-share.t sq-poll-share.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o stdout.t stdout.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o sq-space_left.t sq-space_left.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o shutdown.t shutdown.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from shutdown.c:21: In function 'main': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-3 | |shutdown.c:27:5: | 27 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 34 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 37 | srand(getpid()); | | ~~~~~ | | | | | (3) ...to here | 'main': event 4 | | 42 | assert(ret != -1); | | ^~~~~~ | | | | | (4) following 'true' branch (when 'ret != -1')... | 'main': event 5 | | 43 | ret = setsockopt(recv_s0, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); | | ^~~ | | | | | (5) ...to here | 'main': event 6 | | 44 | assert(ret != -1); | | ^~~~~~ | | | | | (6) following 'true' branch (when 'ret != -1')... | 'main': event 7 | | 46 | addr.sin_family = AF_INET; | | ^~~~ | | | | | (7) ...to here | 'main': event 8 | | 51 | assert(ret != -1); | | ^~~~~~ | | | | | (8) following 'true' branch (when 'ret != -1')... | 'main': event 9 | | 52 | ret = listen(recv_s0, 128); | | ^~~ | | | | | (9) ...to here | 'main': event 10 | | 53 | assert(ret != -1); | | ^~~~~~ | | | | | (10) following 'true' branch (when 'ret != -1')... | 'main': event 11 | | 55 | p_fd[1] = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, IPPROTO_TCP); | | ^~~~ | | | | | (11) ...to here | 'main': event 12 | | 59 | assert(ret != -1); | | ^~~~~~ | | | | | (12) following 'true' branch (when 'ret != -1')... | 'main': event 13 | | 61 | int32_t flags = fcntl(p_fd[1], F_GETFL, 0); | | ^~~~~~~ | | | | | (13) ...to here | 'main': event 14 | | 62 | assert(flags != -1); | | ^~~~~~ | | | | | (14) following 'true' branch (when 'flags != -1')... | 'main': event 15 | | 64 | flags |= O_NONBLOCK; | | ^~~~~ | | | | | (15) ...to here | 'main': event 16 | | 66 | assert(ret != -1); | | ^~~~~~ | | | | | (16) following 'true' branch (when 'ret != -1')... | 'main': event 17 | | 68 | ret = connect(p_fd[1], (struct sockaddr*)&addr, sizeof(addr)); | | ^~~ | | | | | (17) ...to here | 'main': event 18 | | 69 | assert(ret == -1); | | ^~~~~~ | | | | | (18) following 'true' branch (when 'ret == -1')... | 'main': event 19 | | 71 | flags = fcntl(p_fd[1], F_GETFL, 0); | | ^~~~~ | | | | | (19) ...to here | 'main': event 20 | | 72 | assert(flags != -1); | | ^~~~~~ | | | | | (20) following 'true' branch (when 'flags != -1')... | 'main': event 21 | | 74 | flags &= ~O_NONBLOCK; | | ^~~~~ | | | | | (21) ...to here | 'main': event 22 | | 76 | assert(ret != -1); | | ^~~~~~ | | | | | (22) following 'true' branch (when 'ret != -1')... | 'main': event 23 | | 78 | p_fd[0] = accept(recv_s0, NULL, NULL); | | ^~~~ | | | | | (23) ...to here | 'main': event 24 | | 79 | assert(p_fd[0] != -1); | | ^~~~~~ | | | | | (24) following 'true' branch... | 'main': event 25 | | 81 | signal(SIGPIPE, sig_pipe); | | ^~~~~~ | | | | | (25) ...to here | 'main': event 26 | | 88 | assert(ret != -1); | | ^~~~~~ | | | | | (26) following 'true' branch (when 'ret != -1')... | 'main': event 27 | | 90 | if (!code) | | ^~ | | | | | (27) ...to here | 'main': event 28 | | 97 | assert(ret >= 0); | | ^~~~~~ | | | | | (28) following 'true' branch (when 'ret >= 0')... | 'main': event 29 | | 100 | struct io_uring_cqe *cqe; | | ^~~~~~ | | | | | (29) ...to here | 'main': event 30 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (30) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 31-34 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (31) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (32) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (34) following 'false' branch... | | (33) ...to here | '_io_uring_get_sqe': event 35 | |cc1: | (35): ...to here | '_io_uring_get_sqe': event 36 | |cc1: | (36): '' is NULL | <------+ | 'main': events 37-38 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (38) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (37) return of NULL to 'main' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o sq-poll-dup.t sq-poll-dup.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o symlink.t symlink.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o recv-msgall-stream.t recv-msgall-stream.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from recv-msgall-stream.c:17: recv-msgall-stream.c: In function 'do_send': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-4 | |recv-msgall-stream.c:368:5: | 368 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 372 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 375 | ret = test(0, 0); | | ~~~ ~~~~~~~~~~ | | | | | | | (4) calling 'test' from 'main' | | (3) ...to here | +--> 'test': events 5-8 | | 340 | static int test(int use_recvmsg, int use_sync) | | ^~~~ | | | | | (5) entry to 'test' |...... | 357 | if (ret) { | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 363 | do_send(&rd); | | ~~~~~~~~~~~~ | | | | | (7) ...to here | | (8) calling 'do_send' from 'test' | +--> 'do_send': events 9-18 | | 262 | static int do_send(struct recv_data *rd) | | ^~~~~~~ | | | | | (9) entry to 'do_send' |...... | 273 | if (ret) { | | ~ | | | | | (10) following 'false' branch (when 'ret == 0')... |...... | 278 | buf = malloc(MAX_MSG * sizeof(int)); | | ~~~ | | | | | (11) ...to here | 279 | for (i = 0; i < MAX_MSG; i++) | | ~~~ | | | | | (12) following 'true' branch (when 'i != 128')... | | (14) following 'false' branch (when 'i == 128')... | 280 | buf[i] = i; | | ~~~ | | | | | (13) ...to here | 281 | | 282 | memset(&saddr, 0, sizeof(saddr)); | | ~~~~~~ | | | | | (15) ...to here |...... | 288 | if (sockfd < 0) { | | ~ | | | | | (16) following 'false' branch (when 'sockfd >= 0')... |...... | 293 | pthread_mutex_lock(&rd->mutex); | | ~~~~~~~~~~~~~~~~~~ | | | | | (17) ...to here |...... | 296 | if (ret < 0) { | | ~ | | | | | (18) following 'false' branch (when 'ret >= 0')... | 'do_send': event 19 | |cc1: | (19): ...to here | 'do_send': events 20-21 | | 303 | for (i = 0; i < 2; i++) { | | ^~~ | | | | | (20) following 'true' branch (when 'i != 2')... | 304 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (21) ...to here | 'do_send': event 22 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (22) calling '_io_uring_get_sqe' from 'do_send' | +--> '_io_uring_get_sqe': events 23-26 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (23) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (24) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (26) following 'false' branch... | | (25) ...to here | '_io_uring_get_sqe': event 27 | |cc1: | (27): ...to here | '_io_uring_get_sqe': event 28 | |cc1: | (28): '' is NULL | <------+ | 'do_send': events 29-30 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (30) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (29) return of NULL to 'do_send' from '_io_uring_get_sqe' | recv-msgall-stream.c:290:3: warning: leak of 'buf' [CWE-401] [-Wanalyzer-malloc-leak] 290 | return 1; | ^~~~~~ 'main': events 1-4 | | 368 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 372 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 375 | ret = test(0, 0); | | ~~~ ~~~~~~~~~~ | | | | | | | (4) calling 'test' from 'main' | | (3) ...to here | +--> 'test': events 5-8 | | 340 | static int test(int use_recvmsg, int use_sync) | | ^~~~ | | | | | (5) entry to 'test' |...... | 357 | if (ret) { | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 363 | do_send(&rd); | | ~~~~~~~~~~~~ | | | | | (7) ...to here | | (8) calling 'do_send' from 'test' | +--> 'do_send': events 9-17 | | 262 | static int do_send(struct recv_data *rd) | | ^~~~~~~ | | | | | (9) entry to 'do_send' |...... | 273 | if (ret) { | | ~ | | | | | (10) following 'false' branch (when 'ret == 0')... |...... | 278 | buf = malloc(MAX_MSG * sizeof(int)); | | ~~~ | | | | | (11) ...to here | | (12) allocated here | 279 | for (i = 0; i < MAX_MSG; i++) | | ~~~ | | | | | (13) following 'true' branch (when 'i != 128')... | 280 | buf[i] = i; | | ~~~ | | | | | (14) ...to here |...... | 288 | if (sockfd < 0) { | | ~ | | | | | (15) following 'true' branch (when 'sockfd < 0')... | 289 | perror("socket"); | | ~~~~~~ | | | | | (16) ...to here | 290 | return 1; | | ~~~~~~ | | | | | (17) 'buf' leaks here; was allocated at (12) | recv-msgall-stream.c:298:3: warning: leak of 'buf' [CWE-401] [-Wanalyzer-malloc-leak] 298 | return 1; | ^~~~~~ 'main': events 1-4 | | 368 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 372 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 375 | ret = test(0, 0); | | ~~~ ~~~~~~~~~~ | | | | | | | (4) calling 'test' from 'main' | | (3) ...to here | +--> 'test': events 5-8 | | 340 | static int test(int use_recvmsg, int use_sync) | | ^~~~ | | | | | (5) entry to 'test' |...... | 357 | if (ret) { | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 363 | do_send(&rd); | | ~~~~~~~~~~~~ | | | | | (7) ...to here | | (8) calling 'do_send' from 'test' | +--> 'do_send': events 9-21 | | 262 | static int do_send(struct recv_data *rd) | | ^~~~~~~ | | | | | (9) entry to 'do_send' |...... | 273 | if (ret) { | | ~ | | | | | (10) following 'false' branch (when 'ret == 0')... |...... | 278 | buf = malloc(MAX_MSG * sizeof(int)); | | ~~~ | | | | | (11) ...to here | | (12) allocated here | 279 | for (i = 0; i < MAX_MSG; i++) | | ~~~ | | | | | (13) following 'true' branch (when 'i != 128')... | | (15) following 'false' branch (when 'i == 128')... | 280 | buf[i] = i; | | ~~~ | | | | | (14) ...to here | 281 | | 282 | memset(&saddr, 0, sizeof(saddr)); | | ~~~~~~ | | | | | (16) ...to here |...... | 288 | if (sockfd < 0) { | | ~ | | | | | (17) following 'false' branch (when 'sockfd >= 0')... |...... | 293 | pthread_mutex_lock(&rd->mutex); | | ~~~~~~~~~~~~~~~~~~ | | | | | (18) ...to here |...... | 296 | if (ret < 0) { | | ~ | | | | | (19) following 'true' branch (when 'ret < 0')... | 297 | perror("connect"); | | ~~~~~~ | | | | | (20) ...to here | 298 | return 1; | | ~~~~~~ | | | | | (21) 'buf' leaks here; was allocated at (12) | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o send_recvmsg.t send_recvmsg.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from send_recvmsg.c:16: In function 'do_sendmsg': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-4 | |send_recvmsg.c:363:5: | 363 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 367 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 370 | ret = test(0, 0, 0, 1, 0); | | ~~~ ~~~~~~~~~~~~~~~~~~~ | | | | | | | (4) calling 'test' from 'main' | | (3) ...to here | +--> 'test': events 5-10 | | 324 | static int test(int buf_select, int buf_ring, int no_buf_add, int iov_count, | | ^~~~ | | | | | (5) entry to 'test' |...... | 334 | if (buf_select || buf_ring) | | ~ | | | | | (6) following 'false' branch... |...... | 337 | pthread_mutexattr_init(&attr); | | ~~~~~~~~~~~~~~~~~~~~~~ | | | | | (7) ...to here |...... | 349 | if (ret) { | | ~ | | | | | (8) following 'false' branch (when 'ret == 0')... |...... | 355 | pthread_mutex_lock(&mutex); | | ~~~~~~~~~~~~~~~~~~ | | | | | (9) ...to here | 356 | do_sendmsg(); | | ~~~~~~~~~~~~ | | | | | (10) calling 'do_sendmsg' from 'test' | +--> 'do_sendmsg': events 11-15 | | 263 | static int do_sendmsg(void) | | ^~~~~~~~~~ | | | | | (11) entry to 'do_sendmsg' |...... | 277 | if (ret) { | | ~ | | | | | (12) following 'false' branch (when 'ret == 0')... |...... | 282 | memset(&saddr, 0, sizeof(saddr)); | | ~~~~~~ | | | | | (13) ...to here |...... | 294 | if (sockfd < 0) { | | ~ | | | | | (14) following 'false' branch (when 'sockfd >= 0')... |...... | 299 | usleep(10000); | | ~~~~~~ | | | | | (15) ...to here | 'do_sendmsg': event 16 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (16) calling '_io_uring_get_sqe' from 'do_sendmsg' | +--> '_io_uring_get_sqe': events 17-20 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (17) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (18) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (20) following 'false' branch... | | (19) ...to here | '_io_uring_get_sqe': event 21 | |cc1: | (21): ...to here | '_io_uring_get_sqe': event 22 | |cc1: | (22): '' is NULL | <------+ | 'do_sendmsg': events 23-24 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (24) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (23) return of NULL to 'do_sendmsg' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o timeout-overflow.t timeout-overflow.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from timeout-overflow.c:12: In function 'check_timeout_support': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-4 | |timeout-overflow.c:181:5: | 181 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 185 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 188 | ret = check_timeout_support(); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (4) calling 'check_timeout_support' from 'main' | | (3) ...to here | +--> 'check_timeout_support': events 5-9 | | 23 | static int check_timeout_support(void) | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (5) entry to 'check_timeout_support' |...... | 34 | if (ret) { | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 40 | if (p.features & IORING_FEAT_POLL_32BITS) { | | ~~ ~ | | | | | | | (8) following 'false' branch... | | (7) ...to here |...... | 46 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (9) ...to here | 'check_timeout_support': event 10 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (10) calling '_io_uring_get_sqe' from 'check_timeout_support' | +--> '_io_uring_get_sqe': events 11-14 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (11) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (12) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (14) following 'false' branch... | | (13) ...to here | '_io_uring_get_sqe': event 15 | |cc1: | (15): ...to here | '_io_uring_get_sqe': event 16 | |cc1: | (16): '' is NULL | <------+ | 'check_timeout_support': events 17-18 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (18) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (17) return of NULL to 'check_timeout_support' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o tty-write-dpoll.t tty-write-dpoll.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from tty-write-dpoll.c:18: tty-write-dpoll.c: In function 'main': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-8 | |tty-write-dpoll.c:24:5: | 24 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 31 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 34 | fd = open("/dev/ttyS0", O_RDWR | O_NONBLOCK); | | ~~ | | | | | (3) ...to here | 35 | if (fd < 0) | | ~ | | | | | (4) following 'false' branch... |...... | 38 | ret = t_create_ring(SQES, &ring, 0); | | ~~~ | | | | | (5) ...to here | 39 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (6) following 'false' branch (when 'ret != 1')... | 40 | return 0; | 41 | else if (ret < 0) | | ~~ ~ | | | | | | | (8) following 'false' branch (when 'ret >= 0')... | | (7) ...to here | 'main': event 9 | |cc1: | (9): ...to here | 'main': events 10-11 | | 44 | for (i = 0; i < SQES; i++) { | | ^~~ | | | | | (10) following 'true' branch (when 'i != 128')... | 45 | struct io_uring_sqe *sqe; | | ~~~~~~ | | | | | (11) ...to here | 'main': event 12 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (12) calling '_io_uring_get_sqe' from 'main' | +--> '_io_uring_get_sqe': events 13-14 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (13) entry to '_io_uring_get_sqe' |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~ | | | | | (14) following 'false' branch... | '_io_uring_get_sqe': event 15 | |cc1: | (15): ...to here | '_io_uring_get_sqe': event 16 | |cc1: | (16): '' is NULL | <------+ | 'main': events 17-18 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (18) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (17) return of NULL to 'main' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o thread-exit.t thread-exit.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o wakeup-hang.t wakeup-hang.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from wakeup-hang.c:8: In function 'test_pipes': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-4 | |wakeup-hang.c:142:5: | 142 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 146 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 149 | ret = test_pipes(); | | ~~~ ~~~~~~~~~~~~ | | | | | | | (4) calling 'test_pipes' from 'main' | | (3) ...to here | +--> 'test_pipes': events 5-9 | | 59 | static int test_pipes(void) | | ^~~~~~~~~~ | | | | | (5) entry to 'test_pipes' |...... | 68 | if (pipe(fds) < 0) | | ~ | | | | | (6) following 'false' branch... |...... | 71 | ret = io_uring_queue_init(8, &ring, 0); | | ~~~ | | | | | (7) ...to here | 72 | if (ret) { | | ~ | | | | | (8) following 'false' branch (when 'ret == 0')... |...... | 77 | td.write_fd = fds[1]; | | ~~ | | | | | (9) ...to here | 'test_pipes': event 10 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (10) calling '_io_uring_get_sqe' from 'test_pipes' | +--> '_io_uring_get_sqe': events 11-14 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (11) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (12) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (14) following 'false' branch... | | (13) ...to here | '_io_uring_get_sqe': event 15 | |cc1: | (15): ...to here | '_io_uring_get_sqe': event 16 | |cc1: | (16): '' is NULL | <------+ | 'test_pipes': events 17-18 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (18) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (17) return of NULL to 'test_pipes' from '_io_uring_get_sqe' | In function 'test_eventfd': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-4 | |wakeup-hang.c:142:5: | 142 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 146 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 149 | ret = test_pipes(); | | ~~~ ~~~~~~~~~~~~ | | | | | | | (4) calling 'test_pipes' from 'main' | | (3) ...to here | +--> 'test_pipes': events 5-11 | | 59 | static int test_pipes(void) | | ^~~~~~~~~~ | | | | | (5) entry to 'test_pipes' |...... | 68 | if (pipe(fds) < 0) | | ~ | | | | | (6) following 'false' branch... |...... | 71 | ret = io_uring_queue_init(8, &ring, 0); | | ~~~ | | | | | (7) ...to here | 72 | if (ret) { | | ~ | | | | | (8) following 'false' branch (when 'ret == 0')... |...... | 77 | td.write_fd = fds[1]; | | ~~ | | | | | (9) ...to here |...... | 84 | if (ret != 1) { | | ~ | | | | | (10) following 'false' branch (when 'ret == 1')... |...... | 89 | pthread_create(&t1, NULL, listener_thread, &td); | | ~~~~~~~~~~~~~~ | | | | | (11) ...to here | <------+ | 'main': events 12-15 | | 149 | ret = test_pipes(); | | ^~~~~~~~~~~~ | | | | | (12) returning to 'main' from 'test_pipes' | 150 | if (ret) { | | ~ | | | | | (13) following 'false' branch (when 'ret == 0')... |...... | 155 | ret = test_eventfd(); | | ~~~ ~~~~~~~~~~~~~~ | | | | | | | (15) calling 'test_eventfd' from 'main' | | (14) ...to here | +--> 'test_eventfd': events 16-20 | | 100 | static int test_eventfd(void) | | ^~~~~~~~~~~~ | | | | | (16) entry to 'test_eventfd' |...... | 110 | if (efd < 0) | | ~ | | | | | (17) following 'false' branch (when 'efd >= 0')... |...... | 113 | ret = io_uring_queue_init(8, &ring, 0); | | ~~~ | | | | | (18) ...to here | 114 | if (ret) { | | ~ | | | | | (19) following 'false' branch (when 'ret == 0')... |...... | 119 | td.write_fd = efd; | | ~~ | | | | | (20) ...to here | 'test_eventfd': event 21 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (21) calling '_io_uring_get_sqe' from 'test_eventfd' | +--> '_io_uring_get_sqe': events 22-25 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (22) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (23) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (25) following 'false' branch... | | (24) ...to here | '_io_uring_get_sqe': event 26 | |cc1: | (26): ...to here | '_io_uring_get_sqe': event 27 | |cc1: | (27): '' is NULL | <------+ | 'test_eventfd': events 28-29 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (29) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (28) return of NULL to 'test_eventfd' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o statx.t statx.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o timeout-new.t timeout-new.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from timeout-new.c:10: In function 'test_return_before_timeout': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-8 | |timeout-new.c:197:5: | 197 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 202 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 205 | ret = io_uring_queue_init(8, &ring_normal, 0); | | ~~~ | | | | | (3) ...to here | 206 | if (ret) { | | ~ | | | | | (4) following 'false' branch (when 'ret == 0')... |...... | 210 | if (!(ring_normal.features & IORING_FEAT_EXT_ARG)) { | | ~~ ~ | | | | | | | (6) following 'false' branch... | | (5) ...to here |...... | 215 | ret = test_return_before_timeout(&ring_normal); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (8) calling 'test_return_before_timeout' from 'main' | | (7) ...to here | +--> 'test_return_before_timeout': event 9 | | 51 | static int test_return_before_timeout(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (9) entry to 'test_return_before_timeout' | 'test_return_before_timeout': event 10 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (10) calling '_io_uring_get_sqe' from 'test_return_before_timeout' | +--> '_io_uring_get_sqe': events 11-14 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (11) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (12) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (14) following 'false' branch... | | (13) ...to here | '_io_uring_get_sqe': event 15 | |cc1: | (15): ...to here | '_io_uring_get_sqe': event 16 | |cc1: | (16): '' is NULL | <------+ | 'test_return_before_timeout': events 17-18 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (18) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (17) return of NULL to 'test_return_before_timeout' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o unlink.t unlink.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o timeout.t timeout.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o socket.t socket.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from socket.c:15: In function 'do_send': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-4 | |socket.c:368:5: | 368 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 372 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 375 | ret = test(0, 0, 0, 0); | | ~~~ ~~~~~~~~~~~~~~~~ | | | | | | | (4) calling 'test' from 'main' | | (3) ...to here | +--> 'test': events 5-8 | | 340 | static int test(int use_sqthread, int regfiles, int socket_direct, int alloc) | | ^~~~ | | | | | (5) entry to 'test' |...... | 356 | if (ret) { | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 362 | pthread_mutex_lock(&rd.mutex); | | ~~~~~~~~~~~~~~~~~~ | | | | | (7) ...to here | 363 | do_send(socket_direct, alloc); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (8) calling 'do_send' from 'test' | +--> 'do_send': events 9-11 | | 221 | static int do_send(int socket_direct, int alloc) | | ^~~~~~~ | | | | | (9) entry to 'do_send' |...... | 234 | if (ret) { | | ~ | | | | | (10) following 'true' branch (when 'ret != 0')... | 235 | fprintf(stderr, "queue init failed: %d\n", ret); | | ~~~~~~~ | | | | | (11) ...to here | <------+ | 'test': event 12 | | 363 | do_send(socket_direct, alloc); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (12) returning to 'test' from 'do_send' | <------+ | 'main': events 13-18 | | 375 | ret = test(0, 0, 0, 0); | | ^~~~~~~~~~~~~~~~ | | | | | (13) returning to 'main' from 'test' | 376 | if (ret) { | | ~ | | | | | (14) following 'false' branch (when 'ret == 0')... |...... | 380 | if (no_socket) | | ~~ ~ | | | | | | | (16) following 'false' branch... | | (15) ...to here |...... | 383 | ret = test(1, 1, 0, 0); | | ~~~ ~~~~~~~~~~~~~~~~ | | | | | | | (18) calling 'test' from 'main' | | (17) ...to here | +--> 'test': events 19-22 | | 340 | static int test(int use_sqthread, int regfiles, int socket_direct, int alloc) | | ^~~~ | | | | | (19) entry to 'test' |...... | 356 | if (ret) { | | ~ | | | | | (20) following 'false' branch (when 'ret == 0')... |...... | 362 | pthread_mutex_lock(&rd.mutex); | | ~~~~~~~~~~~~~~~~~~ | | | | | (21) ...to here | 363 | do_send(socket_direct, alloc); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (22) calling 'do_send' from 'test' | +--> 'do_send': events 23-25 | | 221 | static int do_send(int socket_direct, int alloc) | | ^~~~~~~ | | | | | (23) entry to 'do_send' |...... | 234 | if (ret) { | | ~ | | | | | (24) following 'true' branch (when 'ret != 0')... | 235 | fprintf(stderr, "queue init failed: %d\n", ret); | | ~~~~~~~ | | | | | (25) ...to here | <------+ | 'test': event 26 | | 363 | do_send(socket_direct, alloc); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (26) returning to 'test' from 'do_send' | <------+ | 'main': events 27-30 | | 383 | ret = test(1, 1, 0, 0); | | ^~~~~~~~~~~~~~~~ | | | | | (27) returning to 'main' from 'test' | 384 | if (ret) { | | ~ | | | | | (28) following 'false' branch (when 'ret == 0')... |...... | 389 | ret = test(1, 0, 0, 0); | | ~~~ ~~~~~~~~~~~~~~~~ | | | | | | | (30) calling 'test' from 'main' | | (29) ...to here | +--> 'test': events 31-34 | | 340 | static int test(int use_sqthread, int regfiles, int socket_direct, int alloc) | | ^~~~ | | | | | (31) entry to 'test' |...... | 356 | if (ret) { | | ~ | | | | | (32) following 'false' branch (when 'ret == 0')... |...... | 362 | pthread_mutex_lock(&rd.mutex); | | ~~~~~~~~~~~~~~~~~~ | | | | | (33) ...to here | 363 | do_send(socket_direct, alloc); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (34) calling 'do_send' from 'test' | +--> 'do_send': events 35-37 | | 221 | static int do_send(int socket_direct, int alloc) | | ^~~~~~~ | | | | | (35) entry to 'do_send' |...... | 234 | if (ret) { | | ~ | | | | | (36) following 'true' branch (when 'ret != 0')... | 235 | fprintf(stderr, "queue init failed: %d\n", ret); | | ~~~~~~~ | | | | | (37) ...to here | <------+ | 'test': event 38 | | 363 | do_send(socket_direct, alloc); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (38) returning to 'test' from 'do_send' | <------+ | 'main': events 39-42 | | 389 | ret = test(1, 0, 0, 0); | | ^~~~~~~~~~~~~~~~ | | | | | (39) returning to 'main' from 'test' | 390 | if (ret) { | | ~ | | | | | (40) following 'false' branch (when 'ret == 0')... |...... | 395 | ret = test(0, 0, 1, 0); | | ~~~ ~~~~~~~~~~~~~~~~ | | | | | | | (42) calling 'test' from 'main' | | (41) ...to here | +--> 'test': events 43-46 | | 340 | static int test(int use_sqthread, int regfiles, int socket_direct, int alloc) | | ^~~~ | | | | | (43) entry to 'test' |...... | 356 | if (ret) { | | ~ | | | | | (44) following 'false' branch (when 'ret == 0')... |...... | 362 | pthread_mutex_lock(&rd.mutex); | | ~~~~~~~~~~~~~~~~~~ | | | | | (45) ...to here | 363 | do_send(socket_direct, alloc); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (46) calling 'do_send' from 'test' | +--> 'do_send': events 47-53 | | 221 | static int do_send(int socket_direct, int alloc) | | ^~~~~~~ | | | | | (47) entry to 'do_send' |...... | 234 | if (ret) { | | ~ | | | | | (48) following 'false' branch (when 'ret == 0')... |...... | 239 | if (socket_direct) { | | ~~ ~ | | | | | | | (50) following 'true' branch (when 'socket_direct != 0')... | | (49) ...to here | 240 | ret = io_uring_register_files(&ring, &fd, 1); | | ~~~ | | | | | (51) ...to here | 241 | if (ret) { | | ~ | | | | | (52) following 'false' branch (when 'ret == 0')... |...... | 247 | memset(&saddr, 0, sizeof(saddr)); | | ~~~~~~ | | | | | (53) ...to here | 'do_send': event 54 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (54) calling '_io_uring_get_sqe' from 'do_send' | +--> '_io_uring_get_sqe': events 55-58 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (55) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (56) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (58) following 'false' branch... | | (57) ...to here | '_io_uring_get_sqe': event 59 | |cc1: | (59): ...to here | '_io_uring_get_sqe': event 60 | |cc1: | (60): '' is NULL | <------+ | 'do_send': event 61 | | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (61) return of NULL to 'do_send' from '_io_uring_get_sqe' | 'do_send': events 62-65 | |socket.c:253:5: | 253 | if (socket_direct) { | | ^ | | | | | (62) following 'true' branch (when 'socket_direct != 0')... | 254 | unsigned file_index = 0; | | ~~~~~~~~ | | | | | (63) ...to here | 255 | if (alloc) | | ~ | | | | | (64) following 'false' branch (when 'alloc == 0')... | 256 | file_index = IORING_FILE_INDEX_ALLOC - 1; | 257 | io_uring_prep_socket_direct(sqe, AF_INET, SOCK_DGRAM, 0, | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (65) ...to here | 'do_send': event 66 | |../src/include/liburing.h:301:14: | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~^~~~~~~~~~~ | | | | | (66) dereference of NULL '' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o rsrc_tags.t rsrc_tags.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread rsrc_tags.c: In function 'register_rsrc': rsrc_tags.c:56:22: warning: leak of 'reg.tags' [CWE-401] [-Wanalyzer-malloc-leak] 56 | return ret ? -errno : 0; | ~~~~~~~~~~~~~^~~ 'main': events 1-4 | | 405 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 410 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... | 411 | return 0; | 412 | if (!has_rsrc_update()) { | | ~~ ~~~~~~~~~~~~~~~~~ | | | | | | | (4) calling 'has_rsrc_update' from 'main' | | (3) ...to here | +--> 'has_rsrc_update': events 5-7 | | 83 | static bool has_rsrc_update(void) | | ^~~~~~~~~~~~~~~ | | | | | (5) entry to 'has_rsrc_update' |...... | 89 | if (ret) { | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 94 | ret = ring.features & IORING_FEAT_RSRC_TAGS; | | ~~~ | | | | | (7) ...to here | <------+ | 'main': events 8-13 | | 412 | if (!has_rsrc_update()) { | | ~ ^~~~~~~~~~~~~~~~~ | | | | | | | (8) returning to 'main' from 'has_rsrc_update' | | (9) following 'true' branch... |...... | 417 | if (pipe(pipes) < 0) { | | ~~ ~ | | | | | | | (11) following 'false' branch... | | (10) ...to here |...... | 422 | ret = test_notag(); | | ~~~ ~~~~~~~~~~~~ | | | | | | | (13) calling 'test_notag' from 'main' | | (12) ...to here | +--> 'test_notag': events 14-15 | | 371 | static int test_notag(void) | | ^~~~~~~~~~ | | | | | (14) entry to 'test_notag' |...... | 380 | if (ret) { | | ~ | | | | | (15) following 'false' branch (when 'ret == 0')... | 'test_notag': event 16 | |cc1: | (16): ...to here | 'test_notag': events 17-18 | | 384 | for (i = 0; i < nr; ++i) | | ^~~ | | | | | (17) following 'true' branch (when 'i != 50')... | 385 | files[i] = pipes[0]; | | ~~~~~ | | | | | (18) ...to here | 'test_notag': event 19 | | 388 | assert(!ret); | | ^~~~~~ | | | | | (19) following 'true' branch (when 'ret == 0')... | 'test_notag': event 20 | | 391 | fd = -1; | | ^~ | | | | | (20) ...to here | 'test_notag': event 21 | | 393 | assert(ret == 1); | | ^~~~~~ | | | | | (21) following 'true' branch (when 'ret == 1')... | 'test_notag': event 22 | | 394 | assert(check_cq_empty(&ring)); | | ^~~~~~ | | | | | (22) ...to here | 'test_notag': event 23 | | 394 | assert(check_cq_empty(&ring)); | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (23) calling 'check_cq_empty' from 'test_notag' | +--> 'check_cq_empty': events 24-25 | | 25 | static bool check_cq_empty(struct io_uring *ring) | | ^~~~~~~~~~~~~~ | | | | | (24) entry to 'check_cq_empty' |...... | 31 | ret = io_uring_peek_cqe(ring, &cqe); /* nothing should be there */ | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (25) calling 'io_uring_peek_cqe' from 'check_cq_empty' | +--> 'io_uring_peek_cqe': events 26-27 | |../src/include/liburing.h:1039:19: | 1039 | static inline int io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~ | | | | | (26) entry to 'io_uring_peek_cqe' |...... | 1042 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (27) calling '__io_uring_peek_cqe' from 'io_uring_peek_cqe' | +--> '__io_uring_peek_cqe': events 28-30 | | 993 | static inline int __io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (28) entry to '__io_uring_peek_cqe' |...... | 1030 | if (nr_available) | | ~ | | | | | (29) following 'false' branch (when 'nr_available' is NULL)... | 1031 | *nr_available = available; | 1032 | return err; | | ~~~~~~ | | | | | (30) ...to here | <------+ | 'io_uring_peek_cqe': events 31-34 | | 1042 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | | | | | (33) ...to here | | | | (34) following 'false' branch... | | | (31) returning to 'io_uring_peek_cqe' from '__io_uring_peek_cqe' | | (32) following 'true' branch... | 'io_uring_peek_cqe': event 35 | |cc1: | (35): ...to here | <------+ | 'check_cq_empty': event 36 | |rsrc_tags.c:31:8: | 31 | ret = io_uring_peek_cqe(ring, &cqe); /* nothing should be there */ | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (36) returning to 'check_cq_empty' from 'io_uring_peek_cqe' | <------+ | 'test_notag': event 37 | | 394 | assert(check_cq_empty(&ring)); | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (37) returning to 'test_notag' from 'check_cq_empty' | 'test_notag': event 38 | | 394 | assert(check_cq_empty(&ring)); | | ^~~~~~ | | | | | (38) following 'true' branch... | 'test_notag': event 39 | | 396 | ret = io_uring_unregister_files(&ring); | | ^~~ | | | | | (39) ...to here | 'test_notag': event 40 | | 397 | assert(!ret); | | ^~~~~~ | | | | | (40) following 'true' branch (when 'ret == 0')... | 'test_notag': events 41-42 | | 398 | ret = io_uring_peek_cqe(&ring, &cqe); /* nothing should be there */ | | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (42) calling 'io_uring_peek_cqe' from 'test_notag' | | (41) ...to here | +--> 'io_uring_peek_cqe': events 43-44 | |../src/include/liburing.h:1039:19: | 1039 | static inline int io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~ | | | | | (43) entry to 'io_uring_peek_cqe' |...... | 1042 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (44) calling '__io_uring_peek_cqe' from 'io_uring_peek_cqe' | +--> '__io_uring_peek_cqe': events 45-47 | | 993 | static inline int __io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (45) entry to '__io_uring_peek_cqe' |...... | 1030 | if (nr_available) | | ~ | | | | | (46) following 'false' branch (when 'nr_available' is NULL)... | 1031 | *nr_available = available; | 1032 | return err; | | ~~~~~~ | | | | | (47) ...to here | <------+ | 'io_uring_peek_cqe': events 48-51 | | 1042 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | | | | | (50) ...to here | | | | (51) following 'false' branch... | | | (48) returning to 'io_uring_peek_cqe' from '__io_uring_peek_cqe' | | (49) following 'true' branch... | 'io_uring_peek_cqe': event 52 | |cc1: | (52): ...to here | <------+ | 'test_notag': event 53 | |rsrc_tags.c:398:8: | 398 | ret = io_uring_peek_cqe(&ring, &cqe); /* nothing should be there */ | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (53) returning to 'test_notag' from 'io_uring_peek_cqe' | 'test_notag': event 54 | | 399 | assert(ret); | | ^~~~~~ | | | | | (54) following 'true' branch (when 'ret != 0')... | 'test_notag': event 55 | | 401 | io_uring_queue_exit(&ring); | | ^~~~~~~~~~~~~~~~~~~ | | | | | (55) ...to here | <------+ | 'main': events 56-57 | | 422 | ret = test_notag(); | | ^~~~~~~~~~~~ | | | | | (56) returning to 'main' from 'test_notag' | 423 | if (ret) { | | ~ | | | | | (57) following 'false' branch (when 'ret == 0')... | 'main': event 58 | |cc1: | (58): ...to here | 'main': events 59-61 | | 428 | for (i = 0; i < sizeof(ring_flags) / sizeof(ring_flags[0]); i++) { | | ^~~ | | | | | (59) following 'true' branch... | 429 | ret = test_files(ring_flags[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (61) calling 'test_files' from 'main' | | (60) ...to here | +--> 'test_files': events 62-65 | | 319 | static int test_files(int ring_flags) | | ^~~~~~~~~~ | | | | | (62) entry to 'test_files' |...... | 328 | for (i = 0; i < nr; ++i) { | | ~~~ | | | | | (63) following 'true' branch (when 'i != 50')... | 329 | files[i] = pipes[0]; | | ~~~~~ | | | | | (64) ...to here |...... | 333 | ret = test_tags_generic(nr, TEST_IORING_RSRC_FILE, files, ring_flags); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (65) calling 'test_tags_generic' from 'test_files' | +--> 'test_tags_generic': events 66-67 | | 99 | static int test_tags_generic(int nr, int type, void *rsrc, int ring_flags) | | ^~~~~~~~~~~~~~~~~ | | | | | (66) entry to 'test_tags_generic' |...... | 107 | if (!tags) | | ~ | | | | | (67) following 'false' branch (when 'tags' is non-NULL)... | 'test_tags_generic': event 68 | |cc1: | (68): ...to here | 'test_tags_generic': events 69-73 | | 109 | for (i = 0; i < nr; i++) | | ^~~ | | | | | (69) following 'true' branch (when 'i < nr')... | 110 | tags[i] = i + 1; | | ~~~~ | | | | | (70) ...to here | 111 | ret = io_uring_queue_init(1, &ring, 0); | 112 | if (ret) { | | ~ | | | | | (71) following 'false' branch (when 'ret == 0')... |...... | 117 | ret = register_rsrc(&ring, type, nr, rsrc, tags); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (73) calling 'register_rsrc' from 'test_tags_generic' | | (72) ...to here | +--> 'register_rsrc': events 74-81 | | 39 | static int register_rsrc(struct io_uring *ring, int type, int nr, | | ^~~~~~~~~~~~~ | | | | | (74) entry to 'register_rsrc' |...... | 45 | memset(®, 0, sizeof(reg)); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (75) state of '': 'start' -> 'nonnull' (origin: NULL) |...... | 48 | reg.tags = (__u64)(uintptr_t)tags; | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (76) state of 'reg.tags': 'start' -> 'nonnull' (origin: '') |...... | 51 | if (type != TEST_IORING_RSRC_FILE) | | ~ | | | | | (77) following 'false' branch (when 'type == 0')... |...... | 54 | ret = __sys_io_uring_register(ring->ring_fd, reg_type, | | ~~~ | | | | | (78) ...to here | 55 | ®, sizeof(reg)); | 56 | return ret ? -errno : 0; | | ~~~~~~~~~~~~~~~~ | | | | | (79) following 'false' branch (when 'ret == 0')... | | (80) ...to here | | (81) 'reg.tags' leaks here | rsrc_tags.c: In function 'update_rsrc': rsrc_tags.c:80:26: warning: leak of 'up.tags' [CWE-401] [-Wanalyzer-malloc-leak] 80 | return ret < 0 ? -errno : ret; | ~~~~~~~~~~~~~~~~~^~~~~ 'main': events 1-4 | | 405 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 410 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... | 411 | return 0; | 412 | if (!has_rsrc_update()) { | | ~~ ~~~~~~~~~~~~~~~~~ | | | | | | | (4) calling 'has_rsrc_update' from 'main' | | (3) ...to here | +--> 'has_rsrc_update': events 5-7 | | 83 | static bool has_rsrc_update(void) | | ^~~~~~~~~~~~~~~ | | | | | (5) entry to 'has_rsrc_update' |...... | 89 | if (ret) { | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 94 | ret = ring.features & IORING_FEAT_RSRC_TAGS; | | ~~~ | | | | | (7) ...to here | <------+ | 'main': events 8-13 | | 412 | if (!has_rsrc_update()) { | | ~ ^~~~~~~~~~~~~~~~~ | | | | | | | (8) returning to 'main' from 'has_rsrc_update' | | (9) following 'true' branch... |...... | 417 | if (pipe(pipes) < 0) { | | ~~ ~ | | | | | | | (11) following 'false' branch... | | (10) ...to here |...... | 422 | ret = test_notag(); | | ~~~ ~~~~~~~~~~~~ | | | | | | | (13) calling 'test_notag' from 'main' | | (12) ...to here | +--> 'test_notag': events 14-15 | | 371 | static int test_notag(void) | | ^~~~~~~~~~ | | | | | (14) entry to 'test_notag' |...... | 380 | if (ret) { | | ~ | | | | | (15) following 'false' branch (when 'ret == 0')... | 'test_notag': event 16 | |cc1: | (16): ...to here | 'test_notag': events 17-18 | | 384 | for (i = 0; i < nr; ++i) | | ^~~ | | | | | (17) following 'true' branch (when 'i != 50')... | 385 | files[i] = pipes[0]; | | ~~~~~ | | | | | (18) ...to here | 'test_notag': event 19 | | 388 | assert(!ret); | | ^~~~~~ | | | | | (19) following 'true' branch (when 'ret == 0')... | 'test_notag': event 20 | | 391 | fd = -1; | | ^~ | | | | | (20) ...to here | 'test_notag': event 21 | | 393 | assert(ret == 1); | | ^~~~~~ | | | | | (21) following 'true' branch (when 'ret == 1')... | 'test_notag': event 22 | | 394 | assert(check_cq_empty(&ring)); | | ^~~~~~ | | | | | (22) ...to here | 'test_notag': event 23 | | 394 | assert(check_cq_empty(&ring)); | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (23) calling 'check_cq_empty' from 'test_notag' | +--> 'check_cq_empty': events 24-25 | | 25 | static bool check_cq_empty(struct io_uring *ring) | | ^~~~~~~~~~~~~~ | | | | | (24) entry to 'check_cq_empty' |...... | 31 | ret = io_uring_peek_cqe(ring, &cqe); /* nothing should be there */ | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (25) calling 'io_uring_peek_cqe' from 'check_cq_empty' | +--> 'io_uring_peek_cqe': events 26-27 | |../src/include/liburing.h:1039:19: | 1039 | static inline int io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~ | | | | | (26) entry to 'io_uring_peek_cqe' |...... | 1042 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (27) calling '__io_uring_peek_cqe' from 'io_uring_peek_cqe' | +--> '__io_uring_peek_cqe': events 28-30 | | 993 | static inline int __io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (28) entry to '__io_uring_peek_cqe' |...... | 1030 | if (nr_available) | | ~ | | | | | (29) following 'false' branch (when 'nr_available' is NULL)... | 1031 | *nr_available = available; | 1032 | return err; | | ~~~~~~ | | | | | (30) ...to here | <------+ | 'io_uring_peek_cqe': events 31-34 | | 1042 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | | | | | (33) ...to here | | | | (34) following 'false' branch... | | | (31) returning to 'io_uring_peek_cqe' from '__io_uring_peek_cqe' | | (32) following 'true' branch... | 'io_uring_peek_cqe': event 35 | |cc1: | (35): ...to here | <------+ | 'check_cq_empty': event 36 | |rsrc_tags.c:31:8: | 31 | ret = io_uring_peek_cqe(ring, &cqe); /* nothing should be there */ | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (36) returning to 'check_cq_empty' from 'io_uring_peek_cqe' | <------+ | 'test_notag': event 37 | | 394 | assert(check_cq_empty(&ring)); | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (37) returning to 'test_notag' from 'check_cq_empty' | 'test_notag': event 38 | | 394 | assert(check_cq_empty(&ring)); | | ^~~~~~ | | | | | (38) following 'true' branch... | 'test_notag': event 39 | | 396 | ret = io_uring_unregister_files(&ring); | | ^~~ | | | | | (39) ...to here | 'test_notag': event 40 | | 397 | assert(!ret); | | ^~~~~~ | | | | | (40) following 'true' branch (when 'ret == 0')... | 'test_notag': events 41-42 | | 398 | ret = io_uring_peek_cqe(&ring, &cqe); /* nothing should be there */ | | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (42) calling 'io_uring_peek_cqe' from 'test_notag' | | (41) ...to here | +--> 'io_uring_peek_cqe': events 43-44 | |../src/include/liburing.h:1039:19: | 1039 | static inline int io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~ | | | | | (43) entry to 'io_uring_peek_cqe' |...... | 1042 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (44) calling '__io_uring_peek_cqe' from 'io_uring_peek_cqe' | +--> '__io_uring_peek_cqe': events 45-47 | | 993 | static inline int __io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (45) entry to '__io_uring_peek_cqe' |...... | 1030 | if (nr_available) | | ~ | | | | | (46) following 'false' branch (when 'nr_available' is NULL)... | 1031 | *nr_available = available; | 1032 | return err; | | ~~~~~~ | | | | | (47) ...to here | <------+ | 'io_uring_peek_cqe': events 48-51 | | 1042 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | | | | | (50) ...to here | | | | (51) following 'false' branch... | | | (48) returning to 'io_uring_peek_cqe' from '__io_uring_peek_cqe' | | (49) following 'true' branch... | 'io_uring_peek_cqe': event 52 | |cc1: | (52): ...to here | <------+ | 'test_notag': event 53 | |rsrc_tags.c:398:8: | 398 | ret = io_uring_peek_cqe(&ring, &cqe); /* nothing should be there */ | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (53) returning to 'test_notag' from 'io_uring_peek_cqe' | 'test_notag': event 54 | | 399 | assert(ret); | | ^~~~~~ | | | | | (54) following 'true' branch (when 'ret != 0')... | 'test_notag': event 55 | | 401 | io_uring_queue_exit(&ring); | | ^~~~~~~~~~~~~~~~~~~ | | | | | (55) ...to here | <------+ | 'main': events 56-57 | | 422 | ret = test_notag(); | | ^~~~~~~~~~~~ | | | | | (56) returning to 'main' from 'test_notag' | 423 | if (ret) { | | ~ | | | | | (57) following 'false' branch (when 'ret == 0')... | 'main': event 58 | |cc1: | (58): ...to here | 'main': events 59-61 | | 428 | for (i = 0; i < sizeof(ring_flags) / sizeof(ring_flags[0]); i++) { | | ^~~ | | | | | (59) following 'true' branch... | 429 | ret = test_files(ring_flags[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (61) calling 'test_files' from 'main' | | (60) ...to here | +--> 'test_files': events 62-65 | | 319 | static int test_files(int ring_flags) | | ^~~~~~~~~~ | | | | | (62) entry to 'test_files' |...... | 328 | for (i = 0; i < nr; ++i) { | | ~~~ | | | | | (63) following 'true' branch (when 'i != 50')... | 329 | files[i] = pipes[0]; | | ~~~~~ | | | | | (64) ...to here |...... | 333 | ret = test_tags_generic(nr, TEST_IORING_RSRC_FILE, files, ring_flags); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (65) calling 'test_tags_generic' from 'test_files' | +--> 'test_tags_generic': events 66-67 | | 99 | static int test_tags_generic(int nr, int type, void *rsrc, int ring_flags) | | ^~~~~~~~~~~~~~~~~ | | | | | (66) entry to 'test_tags_generic' |...... | 107 | if (!tags) | | ~ | | | | | (67) following 'false' branch (when 'tags' is non-NULL)... | 'test_tags_generic': event 68 | |cc1: | (68): ...to here | 'test_tags_generic': events 69-73 | | 109 | for (i = 0; i < nr; i++) | | ^~~ | | | | | (69) following 'true' branch (when 'i < nr')... | 110 | tags[i] = i + 1; | | ~~~~ | | | | | (70) ...to here | 111 | ret = io_uring_queue_init(1, &ring, 0); | 112 | if (ret) { | | ~ | | | | | (71) following 'false' branch (when 'ret == 0')... |...... | 117 | ret = register_rsrc(&ring, type, nr, rsrc, tags); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (73) calling 'register_rsrc' from 'test_tags_generic' | | (72) ...to here | +--> 'register_rsrc': events 74-76 | | 39 | static int register_rsrc(struct io_uring *ring, int type, int nr, | | ^~~~~~~~~~~~~ | | | | | (74) entry to 'register_rsrc' |...... | 51 | if (type != TEST_IORING_RSRC_FILE) | | ~ | | | | | (75) following 'false' branch (when 'type == 0')... |...... | 54 | ret = __sys_io_uring_register(ring->ring_fd, reg_type, | | ~~~ | | | | | (76) ...to here | <------+ | 'test_tags_generic': events 77-80 | | 117 | ret = register_rsrc(&ring, type, nr, rsrc, tags); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (77) returning to 'test_tags_generic' from 'register_rsrc' | 118 | if (ret) { | | ~ | | | | | (78) following 'false' branch (when 'ret == 0')... |...... | 124 | tags[0] = 666; | | ~~~~ | | | | | (79) ...to here | 125 | ret = update_rsrc(&ring, type, 1, 0, rsrc, &tags[0]); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (80) calling 'update_rsrc' from 'test_tags_generic' | +--> 'update_rsrc': events 81-86 | | 63 | static int update_rsrc(struct io_uring *ring, int type, int nr, int off, | | ^~~~~~~~~~~ | | | | | (81) entry to 'update_rsrc' |...... | 69 | memset(&up, 0, sizeof(up)); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (82) state of '': 'start' -> 'nonnull' (origin: NULL) |...... | 72 | up.tags = (__u64)(uintptr_t)tags; | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (83) state of 'up.tags': 'start' -> 'nonnull' (origin: '') |...... | 76 | if (type != TEST_IORING_RSRC_FILE) | | ~ | | | | | (84) following 'false' branch (when 'type == 0')... | 77 | up_type = IORING_REGISTER_BUFFERS_UPDATE; | 78 | ret = __sys_io_uring_register(ring->ring_fd, up_type, | | ~~~ | | | | | (85) ...to here | 79 | &up, sizeof(up)); | 80 | return ret < 0 ? -errno : ret; | | ~~~~~~~~~~~~~~~~~~~~~~ | | | | | (86) 'up.tags' leaks here | rsrc_tags.c: In function 'test_tags_generic': rsrc_tags.c:114:3: warning: leak of 'tags' [CWE-401] [-Wanalyzer-malloc-leak] 114 | return 1; | ^~~~~~ 'main': events 1-4 | | 405 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 410 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... | 411 | return 0; | 412 | if (!has_rsrc_update()) { | | ~~ ~~~~~~~~~~~~~~~~~ | | | | | | | (4) calling 'has_rsrc_update' from 'main' | | (3) ...to here | +--> 'has_rsrc_update': events 5-7 | | 83 | static bool has_rsrc_update(void) | | ^~~~~~~~~~~~~~~ | | | | | (5) entry to 'has_rsrc_update' |...... | 89 | if (ret) { | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 94 | ret = ring.features & IORING_FEAT_RSRC_TAGS; | | ~~~ | | | | | (7) ...to here | <------+ | 'main': events 8-13 | | 412 | if (!has_rsrc_update()) { | | ~ ^~~~~~~~~~~~~~~~~ | | | | | | | (8) returning to 'main' from 'has_rsrc_update' | | (9) following 'true' branch... |...... | 417 | if (pipe(pipes) < 0) { | | ~~ ~ | | | | | | | (11) following 'false' branch... | | (10) ...to here |...... | 422 | ret = test_notag(); | | ~~~ ~~~~~~~~~~~~ | | | | | | | (13) calling 'test_notag' from 'main' | | (12) ...to here | +--> 'test_notag': events 14-15 | | 371 | static int test_notag(void) | | ^~~~~~~~~~ | | | | | (14) entry to 'test_notag' |...... | 380 | if (ret) { | | ~ | | | | | (15) following 'false' branch (when 'ret == 0')... | 'test_notag': event 16 | |cc1: | (16): ...to here | 'test_notag': events 17-18 | | 384 | for (i = 0; i < nr; ++i) | | ^~~ | | | | | (17) following 'true' branch (when 'i != 50')... | 385 | files[i] = pipes[0]; | | ~~~~~ | | | | | (18) ...to here | 'test_notag': event 19 | | 388 | assert(!ret); | | ^~~~~~ | | | | | (19) following 'true' branch (when 'ret == 0')... | 'test_notag': event 20 | | 391 | fd = -1; | | ^~ | | | | | (20) ...to here | 'test_notag': event 21 | | 393 | assert(ret == 1); | | ^~~~~~ | | | | | (21) following 'true' branch (when 'ret == 1')... | 'test_notag': event 22 | | 394 | assert(check_cq_empty(&ring)); | | ^~~~~~ | | | | | (22) ...to here | 'test_notag': event 23 | | 394 | assert(check_cq_empty(&ring)); | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (23) calling 'check_cq_empty' from 'test_notag' | +--> 'check_cq_empty': events 24-25 | | 25 | static bool check_cq_empty(struct io_uring *ring) | | ^~~~~~~~~~~~~~ | | | | | (24) entry to 'check_cq_empty' |...... | 31 | ret = io_uring_peek_cqe(ring, &cqe); /* nothing should be there */ | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (25) calling 'io_uring_peek_cqe' from 'check_cq_empty' | +--> 'io_uring_peek_cqe': events 26-27 | |../src/include/liburing.h:1039:19: | 1039 | static inline int io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~ | | | | | (26) entry to 'io_uring_peek_cqe' |...... | 1042 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (27) calling '__io_uring_peek_cqe' from 'io_uring_peek_cqe' | +--> '__io_uring_peek_cqe': events 28-30 | | 993 | static inline int __io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (28) entry to '__io_uring_peek_cqe' |...... | 1030 | if (nr_available) | | ~ | | | | | (29) following 'false' branch (when 'nr_available' is NULL)... | 1031 | *nr_available = available; | 1032 | return err; | | ~~~~~~ | | | | | (30) ...to here | <------+ | 'io_uring_peek_cqe': events 31-34 | | 1042 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | | | | | (33) ...to here | | | | (34) following 'false' branch... | | | (31) returning to 'io_uring_peek_cqe' from '__io_uring_peek_cqe' | | (32) following 'true' branch... | 'io_uring_peek_cqe': event 35 | |cc1: | (35): ...to here | <------+ | 'check_cq_empty': event 36 | |rsrc_tags.c:31:8: | 31 | ret = io_uring_peek_cqe(ring, &cqe); /* nothing should be there */ | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (36) returning to 'check_cq_empty' from 'io_uring_peek_cqe' | <------+ | 'test_notag': event 37 | | 394 | assert(check_cq_empty(&ring)); | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (37) returning to 'test_notag' from 'check_cq_empty' | 'test_notag': event 38 | | 394 | assert(check_cq_empty(&ring)); | | ^~~~~~ | | | | | (38) following 'true' branch... | 'test_notag': event 39 | | 396 | ret = io_uring_unregister_files(&ring); | | ^~~ | | | | | (39) ...to here | 'test_notag': event 40 | | 397 | assert(!ret); | | ^~~~~~ | | | | | (40) following 'true' branch (when 'ret == 0')... | 'test_notag': events 41-42 | | 398 | ret = io_uring_peek_cqe(&ring, &cqe); /* nothing should be there */ | | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (42) calling 'io_uring_peek_cqe' from 'test_notag' | | (41) ...to here | +--> 'io_uring_peek_cqe': events 43-44 | |../src/include/liburing.h:1039:19: | 1039 | static inline int io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~ | | | | | (43) entry to 'io_uring_peek_cqe' |...... | 1042 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (44) calling '__io_uring_peek_cqe' from 'io_uring_peek_cqe' | +--> '__io_uring_peek_cqe': events 45-47 | | 993 | static inline int __io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (45) entry to '__io_uring_peek_cqe' |...... | 1030 | if (nr_available) | | ~ | | | | | (46) following 'false' branch (when 'nr_available' is NULL)... | 1031 | *nr_available = available; | 1032 | return err; | | ~~~~~~ | | | | | (47) ...to here | <------+ | 'io_uring_peek_cqe': events 48-51 | | 1042 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | | | | | (50) ...to here | | | | (51) following 'false' branch... | | | (48) returning to 'io_uring_peek_cqe' from '__io_uring_peek_cqe' | | (49) following 'true' branch... | 'io_uring_peek_cqe': event 52 | |cc1: | (52): ...to here | <------+ | 'test_notag': event 53 | |rsrc_tags.c:398:8: | 398 | ret = io_uring_peek_cqe(&ring, &cqe); /* nothing should be there */ | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (53) returning to 'test_notag' from 'io_uring_peek_cqe' | 'test_notag': event 54 | | 399 | assert(ret); | | ^~~~~~ | | | | | (54) following 'true' branch (when 'ret != 0')... | 'test_notag': event 55 | | 401 | io_uring_queue_exit(&ring); | | ^~~~~~~~~~~~~~~~~~~ | | | | | (55) ...to here | <------+ | 'main': events 56-57 | | 422 | ret = test_notag(); | | ^~~~~~~~~~~~ | | | | | (56) returning to 'main' from 'test_notag' | 423 | if (ret) { | | ~ | | | | | (57) following 'false' branch (when 'ret == 0')... | 'main': event 58 | |cc1: | (58): ...to here | 'main': events 59-61 | | 428 | for (i = 0; i < sizeof(ring_flags) / sizeof(ring_flags[0]); i++) { | | ^~~ | | | | | (59) following 'true' branch... | 429 | ret = test_files(ring_flags[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (61) calling 'test_files' from 'main' | | (60) ...to here | +--> 'test_files': events 62-65 | | 319 | static int test_files(int ring_flags) | | ^~~~~~~~~~ | | | | | (62) entry to 'test_files' |...... | 328 | for (i = 0; i < nr; ++i) { | | ~~~ | | | | | (63) following 'true' branch (when 'i != 50')... | 329 | files[i] = pipes[0]; | | ~~~~~ | | | | | (64) ...to here |...... | 333 | ret = test_tags_generic(nr, TEST_IORING_RSRC_FILE, files, ring_flags); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (65) calling 'test_tags_generic' from 'test_files' | +--> 'test_tags_generic': events 66-69 | | 99 | static int test_tags_generic(int nr, int type, void *rsrc, int ring_flags) | | ^~~~~~~~~~~~~~~~~ | | | | | (66) entry to 'test_tags_generic' | 100 | { | 101 | struct io_uring_cqe *cqe = NULL; | | ~~~~~~ | | | | | (67) allocated here |...... | 107 | if (!tags) | | ~ | | | | | (68) assuming 'tags' is non-NULL | | (69) following 'false' branch (when 'tags' is non-NULL)... | 'test_tags_generic': event 70 | |cc1: | (70): ...to here | 'test_tags_generic': events 71-75 | | 109 | for (i = 0; i < nr; i++) | | ^~~ | | | | | (71) following 'true' branch (when 'i < nr')... | 110 | tags[i] = i + 1; | | ~~~~ | | | | | (72) ...to here | 111 | ret = io_uring_queue_init(1, &ring, 0); | 112 | if (ret) { | | ~ | | | | | (73) following 'true' branch (when 'ret != 0')... | 113 | printf("ring setup failed\n"); | | ~~~~~~ | | | | | (74) ...to here | 114 | return 1; | | ~~~~~~ | | | | | (75) 'tags' leaks here; was allocated at (67) | rsrc_tags.c:120:3: warning: leak of 'tags' [CWE-401] [-Wanalyzer-malloc-leak] 120 | return 1; | ^~~~~~ 'main': events 1-4 | | 405 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 410 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... | 411 | return 0; | 412 | if (!has_rsrc_update()) { | | ~~ ~~~~~~~~~~~~~~~~~ | | | | | | | (4) calling 'has_rsrc_update' from 'main' | | (3) ...to here | +--> 'has_rsrc_update': events 5-7 | | 83 | static bool has_rsrc_update(void) | | ^~~~~~~~~~~~~~~ | | | | | (5) entry to 'has_rsrc_update' |...... | 89 | if (ret) { | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 94 | ret = ring.features & IORING_FEAT_RSRC_TAGS; | | ~~~ | | | | | (7) ...to here | <------+ | 'main': events 8-13 | | 412 | if (!has_rsrc_update()) { | | ~ ^~~~~~~~~~~~~~~~~ | | | | | | | (8) returning to 'main' from 'has_rsrc_update' | | (9) following 'true' branch... |...... | 417 | if (pipe(pipes) < 0) { | | ~~ ~ | | | | | | | (11) following 'false' branch... | | (10) ...to here |...... | 422 | ret = test_notag(); | | ~~~ ~~~~~~~~~~~~ | | | | | | | (13) calling 'test_notag' from 'main' | | (12) ...to here | +--> 'test_notag': events 14-15 | | 371 | static int test_notag(void) | | ^~~~~~~~~~ | | | | | (14) entry to 'test_notag' |...... | 380 | if (ret) { | | ~ | | | | | (15) following 'false' branch (when 'ret == 0')... | 'test_notag': event 16 | |cc1: | (16): ...to here | 'test_notag': events 17-18 | | 384 | for (i = 0; i < nr; ++i) | | ^~~ | | | | | (17) following 'true' branch (when 'i != 50')... | 385 | files[i] = pipes[0]; | | ~~~~~ | | | | | (18) ...to here | 'test_notag': event 19 | | 388 | assert(!ret); | | ^~~~~~ | | | | | (19) following 'true' branch (when 'ret == 0')... | 'test_notag': event 20 | | 391 | fd = -1; | | ^~ | | | | | (20) ...to here | 'test_notag': event 21 | | 393 | assert(ret == 1); | | ^~~~~~ | | | | | (21) following 'true' branch (when 'ret == 1')... | 'test_notag': event 22 | | 394 | assert(check_cq_empty(&ring)); | | ^~~~~~ | | | | | (22) ...to here | 'test_notag': event 23 | | 394 | assert(check_cq_empty(&ring)); | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (23) calling 'check_cq_empty' from 'test_notag' | +--> 'check_cq_empty': events 24-25 | | 25 | static bool check_cq_empty(struct io_uring *ring) | | ^~~~~~~~~~~~~~ | | | | | (24) entry to 'check_cq_empty' |...... | 31 | ret = io_uring_peek_cqe(ring, &cqe); /* nothing should be there */ | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (25) calling 'io_uring_peek_cqe' from 'check_cq_empty' | +--> 'io_uring_peek_cqe': events 26-27 | |../src/include/liburing.h:1039:19: | 1039 | static inline int io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~ | | | | | (26) entry to 'io_uring_peek_cqe' |...... | 1042 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (27) calling '__io_uring_peek_cqe' from 'io_uring_peek_cqe' | +--> '__io_uring_peek_cqe': events 28-30 | | 993 | static inline int __io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (28) entry to '__io_uring_peek_cqe' |...... | 1030 | if (nr_available) | | ~ | | | | | (29) following 'false' branch (when 'nr_available' is NULL)... | 1031 | *nr_available = available; | 1032 | return err; | | ~~~~~~ | | | | | (30) ...to here | <------+ | 'io_uring_peek_cqe': events 31-34 | | 1042 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | | | | | (33) ...to here | | | | (34) following 'false' branch... | | | (31) returning to 'io_uring_peek_cqe' from '__io_uring_peek_cqe' | | (32) following 'true' branch... | 'io_uring_peek_cqe': event 35 | |cc1: | (35): ...to here | <------+ | 'check_cq_empty': event 36 | |rsrc_tags.c:31:8: | 31 | ret = io_uring_peek_cqe(ring, &cqe); /* nothing should be there */ | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (36) returning to 'check_cq_empty' from 'io_uring_peek_cqe' | <------+ | 'test_notag': event 37 | | 394 | assert(check_cq_empty(&ring)); | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (37) returning to 'test_notag' from 'check_cq_empty' | 'test_notag': event 38 | | 394 | assert(check_cq_empty(&ring)); | | ^~~~~~ | | | | | (38) following 'true' branch... | 'test_notag': event 39 | | 396 | ret = io_uring_unregister_files(&ring); | | ^~~ | | | | | (39) ...to here | 'test_notag': event 40 | | 397 | assert(!ret); | | ^~~~~~ | | | | | (40) following 'true' branch (when 'ret == 0')... | 'test_notag': events 41-42 | | 398 | ret = io_uring_peek_cqe(&ring, &cqe); /* nothing should be there */ | | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (42) calling 'io_uring_peek_cqe' from 'test_notag' | | (41) ...to here | +--> 'io_uring_peek_cqe': events 43-44 | |../src/include/liburing.h:1039:19: | 1039 | static inline int io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~ | | | | | (43) entry to 'io_uring_peek_cqe' |...... | 1042 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (44) calling '__io_uring_peek_cqe' from 'io_uring_peek_cqe' | +--> '__io_uring_peek_cqe': events 45-47 | | 993 | static inline int __io_uring_peek_cqe(struct io_uring *ring, | | ^~~~~~~~~~~~~~~~~~~ | | | | | (45) entry to '__io_uring_peek_cqe' |...... | 1030 | if (nr_available) | | ~ | | | | | (46) following 'false' branch (when 'nr_available' is NULL)... | 1031 | *nr_available = available; | 1032 | return err; | | ~~~~~~ | | | | | (47) ...to here | <------+ | 'io_uring_peek_cqe': events 48-51 | | 1042 | if (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr) | | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | | | | | (50) ...to here | | | | (51) following 'false' branch... | | | (48) returning to 'io_uring_peek_cqe' from '__io_uring_peek_cqe' | | (49) following 'true' branch... | 'io_uring_peek_cqe': event 52 | |cc1: | (52): ...to here | <------+ | 'test_notag': event 53 | |rsrc_tags.c:398:8: | 398 | ret = io_uring_peek_cqe(&ring, &cqe); /* nothing should be there */ | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (53) returning to 'test_notag' from 'io_uring_peek_cqe' | 'test_notag': event 54 | | 399 | assert(ret); | | ^~~~~~ | | | | | (54) following 'true' branch (when 'ret != 0')... | 'test_notag': event 55 | | 401 | io_uring_queue_exit(&ring); | | ^~~~~~~~~~~~~~~~~~~ | | | | | (55) ...to here | <------+ | 'main': events 56-57 | | 422 | ret = test_notag(); | | ^~~~~~~~~~~~ | | | | | (56) returning to 'main' from 'test_notag' | 423 | if (ret) { | | ~ | | | | | (57) following 'false' branch (when 'ret == 0')... | 'main': event 58 | |cc1: | (58): ...to here | 'main': events 59-61 | | 428 | for (i = 0; i < sizeof(ring_flags) / sizeof(ring_flags[0]); i++) { | | ^~~ | | | | | (59) following 'true' branch... | 429 | ret = test_files(ring_flags[i]); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (61) calling 'test_files' from 'main' | | (60) ...to here | +--> 'test_files': events 62-65 | | 319 | static int test_files(int ring_flags) | | ^~~~~~~~~~ | | | | | (62) entry to 'test_files' |...... | 328 | for (i = 0; i < nr; ++i) { | | ~~~ | | | | | (63) following 'true' branch (when 'i != 50')... | 329 | files[i] = pipes[0]; | | ~~~~~ | | | | | (64) ...to here |...... | 333 | ret = test_tags_generic(nr, TEST_IORING_RSRC_FILE, files, ring_flags); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (65) calling 'test_tags_generic' from 'test_files' | +--> 'test_tags_generic': events 66-69 | | 99 | static int test_tags_generic(int nr, int type, void *rsrc, int ring_flags) | | ^~~~~~~~~~~~~~~~~ | | | | | (66) entry to 'test_tags_generic' | 100 | { | 101 | struct io_uring_cqe *cqe = NULL; | | ~~~~~~ | | | | | (67) allocated here |...... | 107 | if (!tags) | | ~ | | | | | (68) assuming 'tags' is non-NULL | | (69) following 'false' branch (when 'tags' is non-NULL)... | 'test_tags_generic': event 70 | |cc1: | (70): ...to here | 'test_tags_generic': events 71-75 | | 109 | for (i = 0; i < nr; i++) | | ^~~ | | | | | (71) following 'true' branch (when 'i < nr')... | 110 | tags[i] = i + 1; | | ~~~~ | | | | | (72) ...to here | 111 | ret = io_uring_queue_init(1, &ring, 0); | 112 | if (ret) { | | ~ | | | | | (73) following 'false' branch (when 'ret == 0')... |...... | 117 | ret = register_rsrc(&ring, type, nr, rsrc, tags); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (75) calling 'register_rsrc' from 'test_tags_generic' | | (74) ...to here | +--> 'register_rsrc': events 76-79 | | 39 | static int register_rsrc(struct io_uring *ring, int type, int nr, | | ^~~~~~~~~~~~~ | | | | | (76) entry to 'register_rsrc' |...... | 51 | if (type != TEST_IORING_RSRC_FILE) | | ~ | | | | | (77) following 'false' branch (when 'type == 0')... |...... | 54 | ret = __sys_io_uring_register(ring->ring_fd, reg_type, | | ~~~ | | | | | (78) ...to here | 55 | ®, sizeof(reg)); | 56 | return ret ? -errno : 0; | | ~~~~~~~~~~~~~~~~ | | | | | (79) following 'true' branch (when 'ret != 0')... | 'register_rsrc': event 80 | |cc1: | (80): ...to here | <------+ | 'test_tags_generic': events 81-84 | | 117 | ret = register_rsrc(&ring, type, nr, rsrc, tags); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (81) returning to 'test_tags_generic' from 'register_rsrc' | 118 | if (ret) { | | ~ | | | | | (82) following 'true' branch (when 'ret != 0')... | 119 | fprintf(stderr, "rsrc register failed %i\n", ret); | | ~~~~~~~ | | | | | (83) ...to here | 120 | return 1; | | ~~~~~~ | | | | | (84) 'tags' leaks here; was allocated at (67) | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o skip-cqe.t skip-cqe.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from skip-cqe.c:10: ../src/include/liburing.h: In function 'test_link_success': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-8 | |skip-cqe.c:306:5: | 306 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 313 | if (argc > 1) | | ~ | | | | | (2) following 'false' branch (when 'argc <= 1')... |...... | 316 | if (pipe(fds)) { | | ~~ ~ | | | | | | | (4) following 'false' branch... | | (3) ...to here |...... | 320 | ret = io_uring_queue_init(16, &ring, 0); | | ~~~ | | | | | (5) ...to here | 321 | if (ret) { | | ~ | | | | | (6) following 'false' branch (when 'ret == 0')... |...... | 326 | if (!(ring.features & IORING_FEAT_CQE_SKIP)) { | | ~~ ~ | | | | | | | (8) following 'false' branch... | | (7) ...to here | 'main': event 9 | |cc1: | (9): ...to here | 'main': event 10 | | 331 | for (i = 0; i < 4; i++) { | | ^~~ | | | | | (10) following 'true' branch (when 'i != 4')... | 'main': event 11 | | 332 | bool skip_last = i & 1; | | ^~~~ | | | | | (11) ...to here | 'main': event 12 | | 333 | int sz = (i & 2) ? LINK_SIZE : 1; | | ~~~~~~~~~~~~~~~~~~~~^~~ | | | | | (12) following 'false' branch... | 'main': event 13 | |cc1: | (13): ...to here | 'main': event 14 | | 335 | ret = test_link_success(&ring, sz, skip_last); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (14) calling 'test_link_success' from 'main' | +--> 'test_link_success': events 15-17 | | 23 | static int test_link_success(struct io_uring *ring, int nr, bool skip_last) | | ^~~~~~~~~~~~~~~~~ | | | | | (15) entry to 'test_link_success' |...... | 29 | for (i = 0; i < nr; ++i) { | | ~~~ | | | | | (16) following 'true' branch (when 'i < nr')... | 30 | sqe = io_uring_get_sqe(ring); | | ~~~ | | | | | (17) ...to here | 'test_link_success': event 18 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (18) calling '_io_uring_get_sqe' from 'test_link_success' | +--> '_io_uring_get_sqe': events 19-20 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (19) entry to '_io_uring_get_sqe' |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~ | | | | | (20) following 'false' branch... | '_io_uring_get_sqe': event 21 | |cc1: | (21): ...to here | '_io_uring_get_sqe': event 22 | |cc1: | (22): '' is NULL | <------+ | 'test_link_success': events 23-24 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (24) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (23) return of NULL to 'test_link_success' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o xattr.t xattr.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o read-write.t read-write.c helpers.o ../src/syscall.o -L../src/ -luring -lpthread In file included from helpers.h:12, from read-write.c:16: In function 'read_poll_link': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-2 | |read-write.c:733:5: | 733 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 752 | nr = has_nonvec_read() ? 32 : 16; | | ~~~~~~~~~~~~~~~~~ | | | | | (2) calling 'has_nonvec_read' from 'main' | +--> 'has_nonvec_read': events 3-7 | | 310 | static int has_nonvec_read(void) | | ^~~~~~~~~~~~~~~ | | | | | (3) entry to 'has_nonvec_read' |...... | 317 | if (ret) { | | ~ | | | | | (4) following 'false' branch (when 'ret == 0')... |...... | 322 | p = t_calloc(1, sizeof(*p) + 256 * sizeof(struct io_uring_probe_op)); | | ~ | | | | | (5) ...to here |...... | 325 | if (ret == -EINVAL) { | | ~ | | | | | (6) following 'false' branch (when 'ret != -22')... |...... | 329 | } else if (ret) { | | ~~ | | | | | (7) ...to here | <------+ | 'main': events 8-9 | | 752 | nr = has_nonvec_read() ? 32 : 16; | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (9) following 'false' branch... | | (8) returning to 'main' from 'has_nonvec_read' | 'main': event 10 | |cc1: | (10): ...to here | 'main': events 11-13 | | 754 | for (i = 0; i < nr; i++) { | | ^~~ | | | | | (11) following 'true' branch... | 755 | int write = (i & 1) != 0; | | ~~~ | | | | | (12) ...to here |...... | 761 | ret = test_io(fname, write, buffered, sqthread, fixed, nonvec, | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (13) calling 'test_io' from 'main' | 762 | BS); | | ~~~ | +--> 'test_io': events 14-17 | | 230 | static int test_io(const char *file, int write, int buffered, int sqthread, | | ^~~~~~~ | | | | | (14) entry to 'test_io' |...... | 236 | if (sqthread) | | ~ | | | | | (15) following 'false' branch (when 'sqthread == 0')... |...... | 239 | ret = t_create_ring(64, &ring, ring_flags); | | ~~~ | | | | | (16) ...to here | 240 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (17) following 'true' branch (when 'ret == 1')... | 'test_io': event 18 | |cc1: | (18): ...to here | <------+ | 'main': events 19-22 | | 754 | for (i = 0; i < nr; i++) { | | ~ | | | | | (21) ...to here |...... | 761 | ret = test_io(fname, write, buffered, sqthread, fixed, nonvec, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) returning to 'main' from 'test_io' | 762 | BS); | | ~~~ | 763 | if (ret) { | | ~ | | | | | (20) following 'false' branch (when 'ret == 0')... |...... | 770 | ret = test_buf_select(fname, 1); | | ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (22) calling 'test_buf_select' from 'main' | +--> 'test_buf_select': events 23-25 | | 465 | static int test_buf_select(const char *filename, int nonvec) | | ^~~~~~~~~~~~~~~ | | | | | (23) entry to 'test_buf_select' |...... | 472 | if (ret) { | | ~ | | | | | (24) following 'false' branch (when 'ret == 0')... |...... | 477 | p = io_uring_get_probe_ring(&ring); | | ~ | | | | | (25) ...to here | <------+ | 'main': events 26-29 | | 770 | ret = test_buf_select(fname, 1); | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (26) returning to 'main' from 'test_buf_select' | 771 | if (ret) { | | ~ | | | | | (27) following 'false' branch (when 'ret == 0')... |...... | 776 | ret = test_buf_select(fname, 0); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (29) calling 'test_buf_select' from 'main' | | (28) ...to here | +--> 'test_buf_select': events 30-32 | | 465 | static int test_buf_select(const char *filename, int nonvec) | | ^~~~~~~~~~~~~~~ | | | | | (30) entry to 'test_buf_select' |...... | 472 | if (ret) { | | ~ | | | | | (31) following 'false' branch (when 'ret == 0')... |...... | 477 | p = io_uring_get_probe_ring(&ring); | | ~ | | | | | (32) ...to here | <------+ | 'main': events 33-40 | | 392 | if (no_buf_select) | | ~ | | | | | (36) following 'true' branch... | | (38) following 'true' branch... |...... | 776 | ret = test_buf_select(fname, 0); | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (33) returning to 'main' from 'test_buf_select' | 777 | if (ret) { | | ~ | | | | | (34) following 'false' branch (when 'ret == 0')... |...... | 782 | ret = test_buf_select_short(fname, 1); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (37) ...to here | | (35) ...to here |...... | 788 | ret = test_buf_select_short(fname, 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (39) ...to here |...... | 794 | ret = test_eventfd_read(); | | ~~~~~~~~~~~~~~~~~~~ | | | | | (40) calling 'test_eventfd_read' from 'main' | +--> 'test_eventfd_read': events 41-42 | | 342 | static int test_eventfd_read(void) | | ^~~~~~~~~~~~~~~~~ | | | | | (41) entry to 'test_eventfd_read' |...... | 350 | if (no_read) | | ~ | | | | | (42) following 'true' branch... | 'test_eventfd_read': event 43 | |../src/include/liburing.h:242:3: | 242 | io_uring_cq_advance(ring, 1); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (43) ...to here | <------+ | 'main': events 44-47 | |read-write.c:794:8: | 794 | ret = test_eventfd_read(); | | ^~~~~~~~~~~~~~~~~~~ | | | | | (44) returning to 'main' from 'test_eventfd_read' | 795 | if (ret) { | | ~ | | | | | (45) following 'false' branch (when 'ret == 0')... |...... | 800 | ret = read_poll_link(fname); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (47) calling 'read_poll_link' from 'main' | | (46) ...to here | +--> 'read_poll_link': events 48-54 | | 253 | static int read_poll_link(const char *file) | | ^~~~~~~~~~~~~~ | | | | | (48) entry to 'read_poll_link' |...... | 262 | if (ret) | | ~ | | | | | (49) following 'false' branch (when 'ret == 0')... |...... | 265 | fd = open(file, O_WRONLY); | | ~~ | | | | | (50) ...to here | 266 | if (fd < 0) { | | ~ | | | | | (51) following 'false' branch... |...... | 271 | if (pipe(fds)) { | | ~~ ~ | | | | | | | (53) following 'false' branch... | | (52) ...to here |...... | 276 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (54) ...to here | 'read_poll_link': event 55 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (55) calling '_io_uring_get_sqe' from 'read_poll_link' | +--> '_io_uring_get_sqe': events 56-59 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (56) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (57) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (59) following 'false' branch... | | (58) ...to here | '_io_uring_get_sqe': event 60 | |cc1: | (60): ...to here | <------+ | 'read_poll_link': events 61-62 | | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (61) returning to 'read_poll_link' from '_io_uring_get_sqe' | | (62) calling '_io_uring_get_sqe' from 'read_poll_link' | +--> '_io_uring_get_sqe': events 63-66 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (63) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (64) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (66) following 'false' branch... | | (65) ...to here | '_io_uring_get_sqe': event 67 | |cc1: | (67): ...to here | <------+ | 'read_poll_link': events 68-69 | | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (68) returning to 'read_poll_link' from '_io_uring_get_sqe' | | (69) calling '_io_uring_get_sqe' from 'read_poll_link' | +--> '_io_uring_get_sqe': events 70-73 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (70) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (71) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (73) following 'false' branch... | | (72) ...to here | '_io_uring_get_sqe': event 74 | |cc1: | (74): ...to here | '_io_uring_get_sqe': event 75 | |cc1: | (75): '' is NULL | <------+ | 'read_poll_link': events 76-77 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (77) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (76) return of NULL to 'read_poll_link' from '_io_uring_get_sqe' | In function 'test_buf_select_short.part.0': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-2 | |read-write.c:733:5: | 733 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 752 | nr = has_nonvec_read() ? 32 : 16; | | ~~~~~~~~~~~~~~~~~ | | | | | (2) calling 'has_nonvec_read' from 'main' | +--> 'has_nonvec_read': events 3-7 | | 310 | static int has_nonvec_read(void) | | ^~~~~~~~~~~~~~~ | | | | | (3) entry to 'has_nonvec_read' |...... | 317 | if (ret) { | | ~ | | | | | (4) following 'false' branch (when 'ret == 0')... |...... | 322 | p = t_calloc(1, sizeof(*p) + 256 * sizeof(struct io_uring_probe_op)); | | ~ | | | | | (5) ...to here |...... | 325 | if (ret == -EINVAL) { | | ~ | | | | | (6) following 'true' branch (when 'ret == -22')... | 326 | out: | | ~~~ | | | | | (7) ...to here | <------+ | 'main': events 8-9 | | 752 | nr = has_nonvec_read() ? 32 : 16; | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (9) following 'false' branch... | | (8) returning to 'main' from 'has_nonvec_read' | 'main': event 10 | |cc1: | (10): ...to here | 'main': events 11-13 | | 754 | for (i = 0; i < nr; i++) { | | ^~~ | | | | | (11) following 'true' branch... | 755 | int write = (i & 1) != 0; | | ~~~ | | | | | (12) ...to here |...... | 761 | ret = test_io(fname, write, buffered, sqthread, fixed, nonvec, | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (13) calling 'test_io' from 'main' | 762 | BS); | | ~~~ | +--> 'test_io': events 14-17 | | 230 | static int test_io(const char *file, int write, int buffered, int sqthread, | | ^~~~~~~ | | | | | (14) entry to 'test_io' |...... | 236 | if (sqthread) | | ~ | | | | | (15) following 'false' branch (when 'sqthread == 0')... |...... | 239 | ret = t_create_ring(64, &ring, ring_flags); | | ~~~ | | | | | (16) ...to here | 240 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (17) following 'true' branch (when 'ret == 1')... | 'test_io': event 18 | |cc1: | (18): ...to here | <------+ | 'main': events 19-22 | | 754 | for (i = 0; i < nr; i++) { | | ~ | | | | | (21) ...to here |...... | 761 | ret = test_io(fname, write, buffered, sqthread, fixed, nonvec, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) returning to 'main' from 'test_io' | 762 | BS); | | ~~~ | 763 | if (ret) { | | ~ | | | | | (20) following 'false' branch (when 'ret == 0')... |...... | 770 | ret = test_buf_select(fname, 1); | | ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (22) calling 'test_buf_select' from 'main' | +--> 'test_buf_select': events 23-25 | | 465 | static int test_buf_select(const char *filename, int nonvec) | | ^~~~~~~~~~~~~~~ | | | | | (23) entry to 'test_buf_select' |...... | 472 | if (ret) { | | ~ | | | | | (24) following 'false' branch (when 'ret == 0')... |...... | 477 | p = io_uring_get_probe_ring(&ring); | | ~ | | | | | (25) ...to here | <------+ | 'main': events 26-29 | | 770 | ret = test_buf_select(fname, 1); | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (26) returning to 'main' from 'test_buf_select' | 771 | if (ret) { | | ~ | | | | | (27) following 'false' branch (when 'ret == 0')... |...... | 776 | ret = test_buf_select(fname, 0); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (29) calling 'test_buf_select' from 'main' | | (28) ...to here | +--> 'test_buf_select': events 30-32 | | 465 | static int test_buf_select(const char *filename, int nonvec) | | ^~~~~~~~~~~~~~~ | | | | | (30) entry to 'test_buf_select' |...... | 472 | if (ret) { | | ~ | | | | | (31) following 'false' branch (when 'ret == 0')... |...... | 477 | p = io_uring_get_probe_ring(&ring); | | ~ | | | | | (32) ...to here | <------+ | 'main': events 33-36 | | 392 | if (no_buf_select) | | ~ | | | | | (36) following 'false' branch... |...... | 776 | ret = test_buf_select(fname, 0); | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (33) returning to 'main' from 'test_buf_select' | 777 | if (ret) { | | ~ | | | | | (34) following 'false' branch (when 'ret == 0')... |...... | 782 | ret = test_buf_select_short(fname, 1); | | ~~~ | | | | | (35) ...to here | 'main': event 37 | |cc1: | (37): ...to here | 'main': event 38 | |cc1: | (38): calling 'test_buf_select_short.part.0' from 'main' | +--> 'test_buf_select_short.part.0': events 39-40 | | 385 | static int test_buf_select_short(const char *filename, int nonvec) | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (39) entry to 'test_buf_select_short.part.0' |...... | 396 | if (ret) { | | ~ | | | | | (40) following 'false' branch (when 'ret == 0')... | 'test_buf_select_short.part.0': event 41 | |cc1: | (41): ...to here | 'test_buf_select_short.part.0': events 42-43 | | 402 | for (i = 0; i < BUFFERS; i++) { | | ^~~ | | | | | (42) following 'true' branch (when 'i != 32')... | 403 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (43) ...to here | 'test_buf_select_short.part.0': event 44 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (44) calling '_io_uring_get_sqe' from 'test_buf_select_short.part.0' | +--> '_io_uring_get_sqe': events 45-46 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (45) entry to '_io_uring_get_sqe' |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~ | | | | | (46) following 'false' branch... | '_io_uring_get_sqe': event 47 | |cc1: | (47): ...to here | '_io_uring_get_sqe': event 48 | |cc1: | (48): '' is NULL | <------+ | 'test_buf_select_short.part.0': events 49-50 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (50) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (49) return of NULL to 'test_buf_select_short.part.0' from '_io_uring_get_sqe' | In function 'test_eventfd_read': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-2 | |read-write.c:733:5: | 733 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 752 | nr = has_nonvec_read() ? 32 : 16; | | ~~~~~~~~~~~~~~~~~ | | | | | (2) calling 'has_nonvec_read' from 'main' | +--> 'has_nonvec_read': events 3-7 | | 310 | static int has_nonvec_read(void) | | ^~~~~~~~~~~~~~~ | | | | | (3) entry to 'has_nonvec_read' |...... | 317 | if (ret) { | | ~ | | | | | (4) following 'false' branch (when 'ret == 0')... |...... | 322 | p = t_calloc(1, sizeof(*p) + 256 * sizeof(struct io_uring_probe_op)); | | ~ | | | | | (5) ...to here |...... | 325 | if (ret == -EINVAL) { | | ~ | | | | | (6) following 'true' branch (when 'ret == -22')... | 326 | out: | | ~~~ | | | | | (7) ...to here | <------+ | 'main': events 8-9 | | 752 | nr = has_nonvec_read() ? 32 : 16; | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (9) following 'false' branch... | | (8) returning to 'main' from 'has_nonvec_read' | 'main': event 10 | |cc1: | (10): ...to here | 'main': events 11-13 | | 754 | for (i = 0; i < nr; i++) { | | ^~~ | | | | | (11) following 'true' branch... | 755 | int write = (i & 1) != 0; | | ~~~ | | | | | (12) ...to here |...... | 761 | ret = test_io(fname, write, buffered, sqthread, fixed, nonvec, | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (13) calling 'test_io' from 'main' | 762 | BS); | | ~~~ | +--> 'test_io': events 14-17 | | 230 | static int test_io(const char *file, int write, int buffered, int sqthread, | | ^~~~~~~ | | | | | (14) entry to 'test_io' |...... | 236 | if (sqthread) | | ~ | | | | | (15) following 'false' branch (when 'sqthread == 0')... |...... | 239 | ret = t_create_ring(64, &ring, ring_flags); | | ~~~ | | | | | (16) ...to here | 240 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (17) following 'true' branch (when 'ret == 1')... | 'test_io': event 18 | |cc1: | (18): ...to here | <------+ | 'main': events 19-22 | | 754 | for (i = 0; i < nr; i++) { | | ~ | | | | | (21) ...to here |...... | 761 | ret = test_io(fname, write, buffered, sqthread, fixed, nonvec, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) returning to 'main' from 'test_io' | 762 | BS); | | ~~~ | 763 | if (ret) { | | ~ | | | | | (20) following 'false' branch (when 'ret == 0')... |...... | 770 | ret = test_buf_select(fname, 1); | | ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (22) calling 'test_buf_select' from 'main' | +--> 'test_buf_select': events 23-25 | | 465 | static int test_buf_select(const char *filename, int nonvec) | | ^~~~~~~~~~~~~~~ | | | | | (23) entry to 'test_buf_select' |...... | 472 | if (ret) { | | ~ | | | | | (24) following 'false' branch (when 'ret == 0')... |...... | 477 | p = io_uring_get_probe_ring(&ring); | | ~ | | | | | (25) ...to here | <------+ | 'main': events 26-29 | | 770 | ret = test_buf_select(fname, 1); | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (26) returning to 'main' from 'test_buf_select' | 771 | if (ret) { | | ~ | | | | | (27) following 'false' branch (when 'ret == 0')... |...... | 776 | ret = test_buf_select(fname, 0); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (29) calling 'test_buf_select' from 'main' | | (28) ...to here | +--> 'test_buf_select': events 30-32 | | 465 | static int test_buf_select(const char *filename, int nonvec) | | ^~~~~~~~~~~~~~~ | | | | | (30) entry to 'test_buf_select' |...... | 472 | if (ret) { | | ~ | | | | | (31) following 'false' branch (when 'ret == 0')... |...... | 477 | p = io_uring_get_probe_ring(&ring); | | ~ | | | | | (32) ...to here | <------+ | 'main': events 33-40 | | 392 | if (no_buf_select) | | ~ | | | | | (36) following 'true' branch... | | (38) following 'true' branch... |...... | 776 | ret = test_buf_select(fname, 0); | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (33) returning to 'main' from 'test_buf_select' | 777 | if (ret) { | | ~ | | | | | (34) following 'false' branch (when 'ret == 0')... |...... | 782 | ret = test_buf_select_short(fname, 1); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (37) ...to here | | (35) ...to here |...... | 788 | ret = test_buf_select_short(fname, 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (39) ...to here |...... | 794 | ret = test_eventfd_read(); | | ~~~~~~~~~~~~~~~~~~~ | | | | | (40) calling 'test_eventfd_read' from 'main' | +--> 'test_eventfd_read': events 41-47 | | 342 | static int test_eventfd_read(void) | | ^~~~~~~~~~~~~~~~~ | | | | | (41) entry to 'test_eventfd_read' |...... | 350 | if (no_read) | | ~ | | | | | (42) following 'false' branch... | 351 | return 0; | 352 | ret = io_uring_queue_init(8, &ring, 0); | | ~~~ | | | | | (43) ...to here | 353 | if (ret) | | ~ | | | | | (44) following 'false' branch (when 'ret == 0')... |...... | 356 | fd = eventfd(1, 0); | | ~~ | | | | | (45) ...to here | 357 | if (fd < 0) { | | ~ | | | | | (46) following 'false' branch (when 'fd >= 0')... |...... | 361 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (47) ...to here | 'test_eventfd_read': event 48 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (48) calling '_io_uring_get_sqe' from 'test_eventfd_read' | +--> '_io_uring_get_sqe': events 49-52 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (49) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (50) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (52) following 'false' branch... | | (51) ...to here | '_io_uring_get_sqe': event 53 | |cc1: | (53): ...to here | '_io_uring_get_sqe': event 54 | |cc1: | (54): '' is NULL | <------+ | 'test_eventfd_read': events 55-56 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (56) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (55) return of NULL to 'test_eventfd_read' from '_io_uring_get_sqe' | In function 'read_poll_link': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-2 | |read-write.c:733:5: | 733 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 752 | nr = has_nonvec_read() ? 32 : 16; | | ~~~~~~~~~~~~~~~~~ | | | | | (2) calling 'has_nonvec_read' from 'main' | +--> 'has_nonvec_read': events 3-7 | | 310 | static int has_nonvec_read(void) | | ^~~~~~~~~~~~~~~ | | | | | (3) entry to 'has_nonvec_read' |...... | 317 | if (ret) { | | ~ | | | | | (4) following 'false' branch (when 'ret == 0')... |...... | 322 | p = t_calloc(1, sizeof(*p) + 256 * sizeof(struct io_uring_probe_op)); | | ~ | | | | | (5) ...to here |...... | 325 | if (ret == -EINVAL) { | | ~ | | | | | (6) following 'true' branch (when 'ret == -22')... | 326 | out: | | ~~~ | | | | | (7) ...to here | <------+ | 'main': events 8-9 | | 752 | nr = has_nonvec_read() ? 32 : 16; | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (9) following 'false' branch... | | (8) returning to 'main' from 'has_nonvec_read' | 'main': event 10 | |cc1: | (10): ...to here | 'main': events 11-13 | | 754 | for (i = 0; i < nr; i++) { | | ^~~ | | | | | (11) following 'true' branch... | 755 | int write = (i & 1) != 0; | | ~~~ | | | | | (12) ...to here |...... | 761 | ret = test_io(fname, write, buffered, sqthread, fixed, nonvec, | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (13) calling 'test_io' from 'main' | 762 | BS); | | ~~~ | +--> 'test_io': events 14-17 | | 230 | static int test_io(const char *file, int write, int buffered, int sqthread, | | ^~~~~~~ | | | | | (14) entry to 'test_io' |...... | 236 | if (sqthread) | | ~ | | | | | (15) following 'false' branch (when 'sqthread == 0')... |...... | 239 | ret = t_create_ring(64, &ring, ring_flags); | | ~~~ | | | | | (16) ...to here | 240 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (17) following 'true' branch (when 'ret == 1')... | 'test_io': event 18 | |cc1: | (18): ...to here | <------+ | 'main': events 19-22 | | 754 | for (i = 0; i < nr; i++) { | | ~ | | | | | (21) ...to here |...... | 761 | ret = test_io(fname, write, buffered, sqthread, fixed, nonvec, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) returning to 'main' from 'test_io' | 762 | BS); | | ~~~ | 763 | if (ret) { | | ~ | | | | | (20) following 'false' branch (when 'ret == 0')... |...... | 770 | ret = test_buf_select(fname, 1); | | ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (22) calling 'test_buf_select' from 'main' | +--> 'test_buf_select': events 23-25 | | 465 | static int test_buf_select(const char *filename, int nonvec) | | ^~~~~~~~~~~~~~~ | | | | | (23) entry to 'test_buf_select' |...... | 472 | if (ret) { | | ~ | | | | | (24) following 'false' branch (when 'ret == 0')... |...... | 477 | p = io_uring_get_probe_ring(&ring); | | ~ | | | | | (25) ...to here | <------+ | 'main': events 26-29 | | 770 | ret = test_buf_select(fname, 1); | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (26) returning to 'main' from 'test_buf_select' | 771 | if (ret) { | | ~ | | | | | (27) following 'false' branch (when 'ret == 0')... |...... | 776 | ret = test_buf_select(fname, 0); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (29) calling 'test_buf_select' from 'main' | | (28) ...to here | +--> 'test_buf_select': events 30-32 | | 465 | static int test_buf_select(const char *filename, int nonvec) | | ^~~~~~~~~~~~~~~ | | | | | (30) entry to 'test_buf_select' |...... | 472 | if (ret) { | | ~ | | | | | (31) following 'false' branch (when 'ret == 0')... |...... | 477 | p = io_uring_get_probe_ring(&ring); | | ~ | | | | | (32) ...to here | <------+ | 'main': events 33-40 | | 392 | if (no_buf_select) | | ~ | | | | | (36) following 'true' branch... | | (38) following 'true' branch... |...... | 776 | ret = test_buf_select(fname, 0); | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (33) returning to 'main' from 'test_buf_select' | 777 | if (ret) { | | ~ | | | | | (34) following 'false' branch (when 'ret == 0')... |...... | 782 | ret = test_buf_select_short(fname, 1); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (37) ...to here | | (35) ...to here |...... | 788 | ret = test_buf_select_short(fname, 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (39) ...to here |...... | 794 | ret = test_eventfd_read(); | | ~~~~~~~~~~~~~~~~~~~ | | | | | (40) calling 'test_eventfd_read' from 'main' | +--> 'test_eventfd_read': events 41-42 | | 342 | static int test_eventfd_read(void) | | ^~~~~~~~~~~~~~~~~ | | | | | (41) entry to 'test_eventfd_read' |...... | 350 | if (no_read) | | ~ | | | | | (42) following 'true' branch... | 'test_eventfd_read': event 43 | |../src/include/liburing.h:242:3: | 242 | io_uring_cq_advance(ring, 1); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (43) ...to here | <------+ | 'main': events 44-47 | |read-write.c:794:8: | 794 | ret = test_eventfd_read(); | | ^~~~~~~~~~~~~~~~~~~ | | | | | (44) returning to 'main' from 'test_eventfd_read' | 795 | if (ret) { | | ~ | | | | | (45) following 'false' branch (when 'ret == 0')... |...... | 800 | ret = read_poll_link(fname); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (47) calling 'read_poll_link' from 'main' | | (46) ...to here | +--> 'read_poll_link': events 48-54 | | 253 | static int read_poll_link(const char *file) | | ^~~~~~~~~~~~~~ | | | | | (48) entry to 'read_poll_link' |...... | 262 | if (ret) | | ~ | | | | | (49) following 'false' branch (when 'ret == 0')... |...... | 265 | fd = open(file, O_WRONLY); | | ~~ | | | | | (50) ...to here | 266 | if (fd < 0) { | | ~ | | | | | (51) following 'false' branch... |...... | 271 | if (pipe(fds)) { | | ~~ ~ | | | | | | | (53) following 'false' branch... | | (52) ...to here |...... | 276 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (54) ...to here | 'read_poll_link': event 55 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (55) calling '_io_uring_get_sqe' from 'read_poll_link' | +--> '_io_uring_get_sqe': events 56-59 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (56) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (57) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (59) following 'false' branch... | | (58) ...to here | '_io_uring_get_sqe': event 60 | |cc1: | (60): ...to here | '_io_uring_get_sqe': event 61 | |cc1: | (61): '' is NULL | <------+ | 'read_poll_link': events 62-63 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (63) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (62) return of NULL to 'read_poll_link' from '_io_uring_get_sqe' | ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-2 | |read-write.c:733:5: | 733 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 752 | nr = has_nonvec_read() ? 32 : 16; | | ~~~~~~~~~~~~~~~~~ | | | | | (2) calling 'has_nonvec_read' from 'main' | +--> 'has_nonvec_read': events 3-7 | | 310 | static int has_nonvec_read(void) | | ^~~~~~~~~~~~~~~ | | | | | (3) entry to 'has_nonvec_read' |...... | 317 | if (ret) { | | ~ | | | | | (4) following 'false' branch (when 'ret == 0')... |...... | 322 | p = t_calloc(1, sizeof(*p) + 256 * sizeof(struct io_uring_probe_op)); | | ~ | | | | | (5) ...to here |...... | 325 | if (ret == -EINVAL) { | | ~ | | | | | (6) following 'true' branch (when 'ret == -22')... | 326 | out: | | ~~~ | | | | | (7) ...to here | <------+ | 'main': events 8-9 | | 752 | nr = has_nonvec_read() ? 32 : 16; | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (9) following 'false' branch... | | (8) returning to 'main' from 'has_nonvec_read' | 'main': event 10 | |cc1: | (10): ...to here | 'main': events 11-13 | | 754 | for (i = 0; i < nr; i++) { | | ^~~ | | | | | (11) following 'true' branch... | 755 | int write = (i & 1) != 0; | | ~~~ | | | | | (12) ...to here |...... | 761 | ret = test_io(fname, write, buffered, sqthread, fixed, nonvec, | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (13) calling 'test_io' from 'main' | 762 | BS); | | ~~~ | +--> 'test_io': events 14-17 | | 230 | static int test_io(const char *file, int write, int buffered, int sqthread, | | ^~~~~~~ | | | | | (14) entry to 'test_io' |...... | 236 | if (sqthread) | | ~ | | | | | (15) following 'false' branch (when 'sqthread == 0')... |...... | 239 | ret = t_create_ring(64, &ring, ring_flags); | | ~~~ | | | | | (16) ...to here | 240 | if (ret == T_SETUP_SKIP) | | ~ | | | | | (17) following 'true' branch (when 'ret == 1')... | 'test_io': event 18 | |cc1: | (18): ...to here | <------+ | 'main': events 19-22 | | 754 | for (i = 0; i < nr; i++) { | | ~ | | | | | (21) ...to here |...... | 761 | ret = test_io(fname, write, buffered, sqthread, fixed, nonvec, | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (19) returning to 'main' from 'test_io' | 762 | BS); | | ~~~ | 763 | if (ret) { | | ~ | | | | | (20) following 'false' branch (when 'ret == 0')... |...... | 770 | ret = test_buf_select(fname, 1); | | ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (22) calling 'test_buf_select' from 'main' | +--> 'test_buf_select': events 23-25 | | 465 | static int test_buf_select(const char *filename, int nonvec) | | ^~~~~~~~~~~~~~~ | | | | | (23) entry to 'test_buf_select' |...... | 472 | if (ret) { | | ~ | | | | | (24) following 'false' branch (when 'ret == 0')... |...... | 477 | p = io_uring_get_probe_ring(&ring); | | ~ | | | | | (25) ...to here | <------+ | 'main': events 26-29 | | 770 | ret = test_buf_select(fname, 1); | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (26) returning to 'main' from 'test_buf_select' | 771 | if (ret) { | | ~ | | | | | (27) following 'false' branch (when 'ret == 0')... |...... | 776 | ret = test_buf_select(fname, 0); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (29) calling 'test_buf_select' from 'main' | | (28) ...to here | +--> 'test_buf_select': events 30-32 | | 465 | static int test_buf_select(const char *filename, int nonvec) | | ^~~~~~~~~~~~~~~ | | | | | (30) entry to 'test_buf_select' |...... | 472 | if (ret) { | | ~ | | | | | (31) following 'false' branch (when 'ret == 0')... |...... | 477 | p = io_uring_get_probe_ring(&ring); | | ~ | | | | | (32) ...to here | <------+ | 'main': events 33-40 | | 392 | if (no_buf_select) | | ~ | | | | | (36) following 'true' branch... | | (38) following 'true' branch... |...... | 776 | ret = test_buf_select(fname, 0); | | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (33) returning to 'main' from 'test_buf_select' | 777 | if (ret) { | | ~ | | | | | (34) following 'false' branch (when 'ret == 0')... |...... | 782 | ret = test_buf_select_short(fname, 1); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (37) ...to here | | (35) ...to here |...... | 788 | ret = test_buf_select_short(fname, 0); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (39) ...to here |...... | 794 | ret = test_eventfd_read(); | | ~~~~~~~~~~~~~~~~~~~ | | | | | (40) calling 'test_eventfd_read' from 'main' | +--> 'test_eventfd_read': events 41-42 | | 342 | static int test_eventfd_read(void) | | ^~~~~~~~~~~~~~~~~ | | | | | (41) entry to 'test_eventfd_read' |...... | 350 | if (no_read) | | ~ | | | | | (42) following 'true' branch... | 'test_eventfd_read': event 43 | |../src/include/liburing.h:242:3: | 242 | io_uring_cq_advance(ring, 1); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (43) ...to here | <------+ | 'main': events 44-47 | |read-write.c:794:8: | 794 | ret = test_eventfd_read(); | | ^~~~~~~~~~~~~~~~~~~ | | | | | (44) returning to 'main' from 'test_eventfd_read' | 795 | if (ret) { | | ~ | | | | | (45) following 'false' branch (when 'ret == 0')... |...... | 800 | ret = read_poll_link(fname); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (47) calling 'read_poll_link' from 'main' | | (46) ...to here | +--> 'read_poll_link': events 48-54 | | 253 | static int read_poll_link(const char *file) | | ^~~~~~~~~~~~~~ | | | | | (48) entry to 'read_poll_link' |...... | 262 | if (ret) | | ~ | | | | | (49) following 'false' branch (when 'ret == 0')... |...... | 265 | fd = open(file, O_WRONLY); | | ~~ | | | | | (50) ...to here | 266 | if (fd < 0) { | | ~ | | | | | (51) following 'false' branch... |...... | 271 | if (pipe(fds)) { | | ~~ ~ | | | | | | | (53) following 'false' branch... | | (52) ...to here |...... | 276 | sqe = io_uring_get_sqe(&ring); | | ~~~ | | | | | (54) ...to here | 'read_poll_link': event 55 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (55) calling '_io_uring_get_sqe' from 'read_poll_link' | +--> '_io_uring_get_sqe': events 56-59 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (56) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (57) following 'true' branch... | 1076 | shift = 1; | | ~~~~~ | | | | | (58) ...to here | 1077 | | 1078 | if (next - head <= *sq->kring_entries) { | | ~ | | | | | (59) following 'false' branch... | '_io_uring_get_sqe': event 60 | |cc1: | (60): ...to here | <------+ | 'read_poll_link': events 61-62 | | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (61) returning to 'read_poll_link' from '_io_uring_get_sqe' | | (62) calling '_io_uring_get_sqe' from 'read_poll_link' | +--> '_io_uring_get_sqe': events 63-64 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (63) entry to '_io_uring_get_sqe' |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~ | | | | | (64) following 'false' branch... | '_io_uring_get_sqe': event 65 | |cc1: | (65): ...to here | '_io_uring_get_sqe': event 66 | |cc1: | (66): '' is NULL | <------+ | 'read_poll_link': events 67-68 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (68) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (67) return of NULL to 'read_poll_link' from '_io_uring_get_sqe' | gcc -D_GNU_SOURCE -I../src/include/ -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -o ucontext-cp ucontext-cp.c -L../src/ -luring ucontext-cp.c: In function 'main': ucontext-cp.c:229:17: warning: dereference of possibly-NULL 'pbundle' [CWE-690] [-Wanalyzer-possible-null-dereference] 229 | pbundle->pctx = pctx; | ~~~~~~~~~~~~~~^~~~~~ 'main': events 1-10 | | 189 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 195 | if (argc < 3) { | | ~ | | | | | (2) following 'false' branch (when 'argc > 2')... |...... | 200 | ret = io_uring_queue_init(QD, &ring, 0); | | ~~~ | | | | | (3) ...to here | 201 | if (ret < 0) { | | ~ | | | | | (4) following 'false' branch (when 'ret >= 0')... |...... | 206 | req_count = (argc - 1) / 2; | | ~~~~~~~~~ | | | | | (5) ...to here |...... | 209 | for (i = 1; i < argc; i += 2) { | | ~~~ | | | | | (6) following 'true' branch (when 'i < argc')... | 210 | int infd, outfd; | | ~~~ | | | | | (7) ...to here |...... | 214 | if (!pctx || setup_context(pctx, &ring)) | | ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (9) ...to here | | | (10) calling 'setup_context' from 'main' | | (8) following 'false' branch (when 'pctx' is non-NULL)... | +--> 'setup_context': events 11-15 | | 108 | static int setup_context(async_context *pctx, struct io_uring *ring) | | ^~~~~~~~~~~~~ | | | | | (11) entry to 'setup_context' |...... | 114 | if (ret < 0) { | | ~ | | | | | (12) following 'false' branch... |...... | 118 | pctx->stack_buf = malloc(SIGSTKSZ); | | ~~~~ | | | | | (13) ...to here | 119 | if (!pctx->stack_buf) { | | ~ | | | | | (14) following 'false' branch... |...... | 123 | pctx->ctx_fnew.uc_stack.ss_sp = pctx->stack_buf; | | ~~~~ | | | | | (15) ...to here | <------+ | 'main': events 16-24 | | 214 | if (!pctx || setup_context(pctx, &ring)) | | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (16) returning to 'main' from 'setup_context' | | (17) following 'false' branch... |...... | 217 | infd = open(argv[i], O_RDONLY); | | ~~~~ | | | | | (18) ...to here | 218 | if (infd < 0) { | | ~ | | | | | (19) following 'false' branch... |...... | 222 | outfd = open(argv[i + 1], O_WRONLY | O_CREAT | O_TRUNC, 0644); | | ~~~~~ | | | | | (20) ...to here | 223 | if (outfd < 0) { | | ~ | | | | | (21) following 'false' branch... |...... | 228 | arguments_bundle *pbundle = malloc(sizeof(*pbundle)); | | ~~~~~~~~~~~~~~~~ | | | | | (22) ...to here | | (23) this call could return NULL | 229 | pbundle->pctx = pctx; | | ~~~~~~~~~~~~~~~~~~~~ | | | | | (24) 'pbundle' could be NULL: unchecked value from (23) | gcc -D_GNU_SOURCE -I../src/include/ -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -o io_uring-test io_uring-test.c -L../src/ -luring gcc -D_GNU_SOURCE -I../src/include/ -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -o io_uring-cp io_uring-cp.c -L../src/ -luring gcc -D_GNU_SOURCE -I../src/include/ -pipe -frecord-gcc-switches -Wall -g -O2 -ffat-lto-objects -fanalyzer -o link-cp link-cp.c -L../src/ -luring In file included from link-cp.c:17: In function 'queue_rw_pair': ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-8 | |link-cp.c:160:5: | 160 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 166 | if (argc < 3) { | | ~ | | | | | (2) following 'false' branch (when 'argc > 2')... |...... | 171 | infd = open(argv[1], O_RDONLY); | | ~~~~ | | | | | (3) ...to here | 172 | if (infd < 0) { | | ~ | | | | | (4) following 'false' branch... |...... | 176 | outfd = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC, 0644); | | ~~~~~ | | | | | (5) ...to here | 177 | if (outfd < 0) { | | ~ | | | | | (6) following 'false' branch... |...... | 182 | if (setup_context(QD, &ring)) | | ~~ ~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (8) calling 'setup_context' from 'main' | | (7) ...to here | +--> 'setup_context': events 9-10 | | 31 | static int setup_context(unsigned entries, struct io_uring *ring) | | ^~~~~~~~~~~~~ | | | | | (9) entry to 'setup_context' |...... | 36 | if (ret < 0) { | | ~ | | | | | (10) following 'false' branch (when 'ret >= 0')... | 'setup_context': event 11 | |cc1: | (11): ...to here | <------+ | 'main': events 12-15 | | 182 | if (setup_context(QD, &ring)) | | ~^~~~~~~~~~~~~~~~~~~~~~~~ | | || | | |(12) returning to 'main' from 'setup_context' | | (13) following 'false' branch... | 183 | return 1; | 184 | if (get_file_size(infd, &insize)) | | ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (15) calling 'get_file_size' from 'main' | | (14) ...to here | +--> 'get_file_size': events 16-20 | | 44 | static int get_file_size(int fd, off_t *size) | | ^~~~~~~~~~~~~ | | | | | (16) entry to 'get_file_size' |...... | 48 | if (fstat(fd, &st) < 0) | | ~ | | | | | (17) following 'false' branch... | 49 | return -1; | 50 | if (S_ISREG(st.st_mode)) { | | ~~ ~ | | | | | | | (19) following 'true' branch... | | (18) ...to here | 51 | *size = st.st_size; | | ~ | | | | | (20) ...to here | <------+ | 'main': events 21-24 | | 184 | if (get_file_size(infd, &insize)) | | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | || | | |(21) returning to 'main' from 'get_file_size' | | (22) following 'false' branch... |...... | 187 | ret = copy_file(&ring, insize); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (24) calling 'copy_file' from 'main' | | (23) ...to here | +--> 'copy_file': events 25-28 | | 115 | static int copy_file(struct io_uring *ring, off_t insize) | | ^~~~~~~~~ | | | | | (25) entry to 'copy_file' |...... | 122 | while (insize) { | | ~ | | | | | (26) following 'true' branch (when 'insize != 0')... | 123 | int has_inflight = inflight; | | ~~~ | | | | | (27) ...to here |...... | 126 | while (insize && inflight < QD) { | | ~ | | | | | (28) following 'true' branch (when 'insize != 0')... | 'copy_file': event 29 | | 126 | while (insize && inflight < QD) { | | ^ | | | | | (29) ...to here | 'copy_file': events 30-34 | | 126 | while (insize && inflight < QD) { | | ^ | | | | | (30) following 'true' branch... | 127 | this_size = BS; | | ~~~~~~~~~ | | | | | (31) ...to here | 128 | if (this_size > insize) | | ~ | | | | | (32) following 'false' branch (when 'insize > 32767')... | 129 | this_size = insize; | 130 | queue_rw_pair(ring, this_size, offset); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (33) ...to here | | (34) calling 'queue_rw_pair' from 'copy_file' | +--> 'queue_rw_pair': event 35 | | 66 | static void queue_rw_pair(struct io_uring *ring, off_t size, off_t offset) | | ^~~~~~~~~~~~~ | | | | | (35) entry to 'queue_rw_pair' | 'queue_rw_pair': event 36 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (36) calling '_io_uring_get_sqe' from 'queue_rw_pair' | +--> '_io_uring_get_sqe': events 37-40 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (37) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (38) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (40) following 'false' branch... | | (39) ...to here | '_io_uring_get_sqe': event 41 | |cc1: | (41): ...to here | <------+ | 'queue_rw_pair': events 42-43 | | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (42) returning to 'queue_rw_pair' from '_io_uring_get_sqe' | | (43) calling '_io_uring_get_sqe' from 'queue_rw_pair' | +--> '_io_uring_get_sqe': events 44-47 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (44) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (45) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (47) following 'false' branch... | | (46) ...to here | '_io_uring_get_sqe': event 48 | |cc1: | (48): ...to here | '_io_uring_get_sqe': event 49 | |cc1: | (49): '' is NULL | <------+ | 'queue_rw_pair': events 50-51 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (51) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (50) return of NULL to 'queue_rw_pair' from '_io_uring_get_sqe' | ../src/include/liburing.h:301:14: warning: dereference of NULL '' [CWE-690] [-Wanalyzer-null-dereference] 301 | sqe->opcode = (__u8) op; | ~~~~~~~~~~~~^~~~~~~~~~~ 'main': events 1-8 | |link-cp.c:160:5: | 160 | int main(int argc, char *argv[]) | | ^~~~ | | | | | (1) entry to 'main' |...... | 166 | if (argc < 3) { | | ~ | | | | | (2) following 'false' branch (when 'argc > 2')... |...... | 171 | infd = open(argv[1], O_RDONLY); | | ~~~~ | | | | | (3) ...to here | 172 | if (infd < 0) { | | ~ | | | | | (4) following 'false' branch... |...... | 176 | outfd = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC, 0644); | | ~~~~~ | | | | | (5) ...to here | 177 | if (outfd < 0) { | | ~ | | | | | (6) following 'false' branch... |...... | 182 | if (setup_context(QD, &ring)) | | ~~ ~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (8) calling 'setup_context' from 'main' | | (7) ...to here | +--> 'setup_context': events 9-10 | | 31 | static int setup_context(unsigned entries, struct io_uring *ring) | | ^~~~~~~~~~~~~ | | | | | (9) entry to 'setup_context' |...... | 36 | if (ret < 0) { | | ~ | | | | | (10) following 'false' branch (when 'ret >= 0')... | 'setup_context': event 11 | |cc1: | (11): ...to here | <------+ | 'main': events 12-15 | | 182 | if (setup_context(QD, &ring)) | | ~^~~~~~~~~~~~~~~~~~~~~~~~ | | || | | |(12) returning to 'main' from 'setup_context' | | (13) following 'false' branch... | 183 | return 1; | 184 | if (get_file_size(infd, &insize)) | | ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (15) calling 'get_file_size' from 'main' | | (14) ...to here | +--> 'get_file_size': events 16-20 | | 44 | static int get_file_size(int fd, off_t *size) | | ^~~~~~~~~~~~~ | | | | | (16) entry to 'get_file_size' |...... | 48 | if (fstat(fd, &st) < 0) | | ~ | | | | | (17) following 'false' branch... | 49 | return -1; | 50 | if (S_ISREG(st.st_mode)) { | | ~~ ~ | | | | | | | (19) following 'true' branch... | | (18) ...to here | 51 | *size = st.st_size; | | ~ | | | | | (20) ...to here | <------+ | 'main': events 21-24 | | 184 | if (get_file_size(infd, &insize)) | | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | || | | |(21) returning to 'main' from 'get_file_size' | | (22) following 'false' branch... |...... | 187 | ret = copy_file(&ring, insize); | | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | (24) calling 'copy_file' from 'main' | | (23) ...to here | +--> 'copy_file': events 25-28 | | 115 | static int copy_file(struct io_uring *ring, off_t insize) | | ^~~~~~~~~ | | | | | (25) entry to 'copy_file' |...... | 122 | while (insize) { | | ~ | | | | | (26) following 'true' branch (when 'insize != 0')... | 123 | int has_inflight = inflight; | | ~~~ | | | | | (27) ...to here |...... | 126 | while (insize && inflight < QD) { | | ~ | | | | | (28) following 'true' branch (when 'insize != 0')... | 'copy_file': event 29 | | 126 | while (insize && inflight < QD) { | | ^ | | | | | (29) ...to here | 'copy_file': events 30-34 | | 126 | while (insize && inflight < QD) { | | ^ | | | | | (30) following 'true' branch... | 127 | this_size = BS; | | ~~~~~~~~~ | | | | | (31) ...to here | 128 | if (this_size > insize) | | ~ | | | | | (32) following 'false' branch (when 'insize > 32767')... | 129 | this_size = insize; | 130 | queue_rw_pair(ring, this_size, offset); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (33) ...to here | | (34) calling 'queue_rw_pair' from 'copy_file' | +--> 'queue_rw_pair': event 35 | | 66 | static void queue_rw_pair(struct io_uring *ring, off_t size, off_t offset) | | ^~~~~~~~~~~~~ | | | | | (35) entry to 'queue_rw_pair' | 'queue_rw_pair': event 36 | |../src/include/liburing.h:1148:9: | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (36) calling '_io_uring_get_sqe' from 'queue_rw_pair' | +--> '_io_uring_get_sqe': events 37-40 | | 1068 | static inline struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring) | | ^~~~~~~~~~~~~~~~~ | | | | | (37) entry to '_io_uring_get_sqe' |...... | 1075 | if (ring->flags & IORING_SETUP_SQE128) | | ~ | | | | | (38) following 'false' branch... |...... | 1078 | if (next - head <= *sq->kring_entries) { | | ~~ ~ | | | | | | | (40) following 'false' branch... | | (39) ...to here | '_io_uring_get_sqe': event 41 | |cc1: | (41): ...to here | '_io_uring_get_sqe': event 42 | |cc1: | (42): '' is NULL | <------+ | 'queue_rw_pair': events 43-44 | | 301 | sqe->opcode = (__u8) op; | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (44) dereference of NULL '' |...... | 1148 | return _io_uring_get_sqe(ring); | | ^~~~~~~~~~~~~~~~~~~~~~~ | | | | | (43) return of NULL to 'queue_rw_pair' from '_io_uring_get_sqe' | + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.24426 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/liburing-buildroot + : + /bin/rm -rf -- /usr/src/tmp/liburing-buildroot + PATH=/usr/libexec/rpm-build:/usr/src/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games + cd liburing-2.2 + make 'INSTALL=/usr/libexec/rpm-build/install -p' install DESTDIR=/usr/src/tmp/liburing-buildroot V=1 make: Entering directory '/usr/src/RPM/BUILD/liburing-2.2' sed -e "s%@prefix@%/usr%g" \ -e "s%@libdir@%/usr/lib64%g" \ -e "s%@includedir@%/usr/include%g" \ -e "s%@NAME@%liburing%g" \ -e "s%@VERSION@%2.2%g" \ liburing.pc.in >liburing.pc make[1]: Entering directory '/usr/src/RPM/BUILD/liburing-2.2/src' install -D -m 644 include/liburing/io_uring.h /usr/src/tmp/liburing-buildroot/usr/include/liburing/io_uring.h install -D -m 644 include/liburing.h /usr/src/tmp/liburing-buildroot/usr/include/liburing.h install -D -m 644 include/liburing/compat.h /usr/src/tmp/liburing-buildroot/usr/include/liburing/compat.h install -D -m 644 include/liburing/barrier.h /usr/src/tmp/liburing-buildroot/usr/include/liburing/barrier.h install -D -m 644 liburing.a /usr/src/tmp/liburing-buildroot/usr/lib64/liburing.a install -D -m 755 liburing.so.2.2 /usr/src/tmp/liburing-buildroot/usr/lib64/liburing.so.2.2 ln -sf liburing.so.2.2 /usr/src/tmp/liburing-buildroot/usr/lib64/liburing.so.2 ln -sf liburing.so.2.2 /usr/src/tmp/liburing-buildroot/usr/lib64/liburing.so make[1]: Leaving directory '/usr/src/RPM/BUILD/liburing-2.2/src' /usr/libexec/rpm-build/install -p -D -m 644 liburing.pc /usr/src/tmp/liburing-buildroot/usr/lib64/pkgconfig/liburing.pc /usr/libexec/rpm-build/install -p -m 755 -d /usr/src/tmp/liburing-buildroot/usr/share/man/man2 /usr/libexec/rpm-build/install -p -m 644 man/*.2 /usr/src/tmp/liburing-buildroot/usr/share/man/man2 /usr/libexec/rpm-build/install -p -m 755 -d /usr/src/tmp/liburing-buildroot/usr/share/man/man3 /usr/libexec/rpm-build/install -p -m 644 man/*.3 /usr/src/tmp/liburing-buildroot/usr/share/man/man3 /usr/libexec/rpm-build/install -p -m 755 -d /usr/src/tmp/liburing-buildroot/usr/share/man/man7 /usr/libexec/rpm-build/install -p -m 644 man/*.7 /usr/src/tmp/liburing-buildroot/usr/share/man/man7 make: Leaving directory '/usr/src/RPM/BUILD/liburing-2.2' + rm /usr/src/tmp/liburing-buildroot/usr/lib64/liburing.a + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/liburing-buildroot (auto) mode of './usr/lib64/liburing.so.2.2' changed from 0755 (rwxr-xr-x) to 0644 (rw-r--r--) Verifying and fixing files in /usr/src/tmp/liburing-buildroot (binconfig,pkgconfig,libtool,desktop,gnuconfig) /usr/lib64/pkgconfig/liburing.pc: Cflags: '-I${includedir}' --> '' /usr/lib64/pkgconfig/liburing.pc: Libs: '-L${libdir} -luring' --> '-luring' Checking contents of files in /usr/src/tmp/liburing-buildroot/ (default) Compressing files in /usr/src/tmp/liburing-buildroot (auto) Adjusting library links in /usr/src/tmp/liburing-buildroot ./usr/lib64: (from :0) liburing.so.2 -> liburing.so.2.2 Verifying ELF objects in /usr/src/tmp/liburing-buildroot (arch=strict,fhs=strict,lfs=strict,lint=strict,rpath=strict,stack=strict,textrel=strict,unresolved=strict) Executing(%check): /bin/sh -e /usr/src/tmp/rpm-tmp.81631 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd liburing-2.2 + test/probe.t + sort -u + grep -Po '{op.*?}' + strace -ve io_uring_register test/probe.t + column -t + TEST_EXCLUDE=' 500f9fbadef8.t accept.t cq-overflow.t eeed8b54e0df.t fc2a85cb02ef.t file-verify.t fpos.t io-cancel.t iopoll.t io_uring_register.t link-timeout.t personality.t read-before-exit.t read-write.t recv-msgall-stream.t ringbuf-read.t rsrc_tags.t sendmsg_fs_cve.t socket.t sq-poll-dup.t sq-poll-share.t xattr.t ' + make runtests make: Entering directory '/usr/src/RPM/BUILD/liburing-2.2' make[1]: Entering directory '/usr/src/RPM/BUILD/liburing-2.2/src' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/usr/src/RPM/BUILD/liburing-2.2/src' make[1]: Entering directory '/usr/src/RPM/BUILD/liburing-2.2/test' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/usr/src/RPM/BUILD/liburing-2.2/test' make[1]: Entering directory '/usr/src/RPM/BUILD/liburing-2.2/examples' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/usr/src/RPM/BUILD/liburing-2.2/examples' make[1]: Entering directory '/usr/src/RPM/BUILD/liburing-2.2/test' Running test 232c93d07b74.t 4 sec Running test 35fa71a030ca.t 5 sec Running test 500f9fbadef8.t Test skipped Running test 7ad0e4b2f83c.t 1 sec Running test 8a9973408177.t 0 sec Running test 917257daa0fe.t 0 sec Running test a0908ae19763.t 0 sec Running test a4c0b3decb33.t 12 sec Running test accept.t Test skipped Running test accept-link.t 0 sec Running test accept-reuse.t 0 sec Running test accept-test.t 0 sec Running test across-fork.t 0 sec Running test b19062a56726.t 0 sec Running test b5837bd5311d.t 0 sec Running test buf-ring.t 0 sec Running test ce593a6c480a.t 1 sec Running test close-opath.t 0 sec Running test connect.t 0 sec Running test cq-full.t 0 sec Running test cq-overflow.t Test skipped Running test cq-peek-batch.t 0 sec Running test cq-ready.t 0 sec Running test cq-size.t 0 sec Running test d4ae271dfaae.t open: Invalid argument 0 sec Running test d77a67ed5f27.t 0 sec Running test defer.t 3 sec Running test double-poll-crash.t 0 sec Running test drop-submit.t 0 sec Running test eeed8b54e0df.t Test skipped Running test empty-eownerdead.t 0 sec Running test eventfd.t 0 sec Running test eventfd-disable.t 0 sec Running test eventfd-reg.t 0 sec Running test eventfd-ring.t 0 sec Running test exec-target.t 0 sec Running test exit-no-cleanup.t 0 sec Running test fadvise.t 0 sec Running test fallocate.t 0 sec Running test fc2a85cb02ef.t Test skipped Running test file-register.t test_huge: No huge file set support, skipping 3 sec Running test files-exit-hang-poll.t 1 sec Running test files-exit-hang-timeout.t 1 sec Running test file-update.t 1 sec Running test file-verify.t Test skipped Running test fixed-buf-iter.t 0 sec Running test fixed-link.t 0 sec Running test fixed-reuse.t 0 sec Running test fpos.t Test skipped Running test fsync.t 0 sec Running test hardlink.t 0 sec Running test io-cancel.t Test skipped Running test iopoll.t Test skipped Running test io_uring_enter.t 0 sec Running test io_uring_register.t Test skipped Running test io_uring_setup.t 0 sec Running test lfs-openat.t 0 sec Running test lfs-openat-write.t 0 sec Running test link.t 0 sec Running test link_drain.t 0 sec Running test link-timeout.t Test skipped Running test madvise.t 0 sec Running test mkdir.t 0 sec Running test msg-ring.t 0 sec Running test multicqes_drain.t 10 sec Running test nop-all-sizes.t 0 sec Running test nop.t 0 sec Running test openat2.t 0 sec Running test open-close.t 0 sec Running test open-direct-link.t 0 sec Running test open-direct-pick.t 0 sec Running test personality.t Test skipped Running test pipe-eof.t 0 sec Running test pipe-reuse.t 0 sec Running test poll.t 0 sec Running test poll-cancel.t 0 sec Running test poll-cancel-all.t 0 sec Running test poll-cancel-ton.t 0 sec Running test poll-link.t 0 sec Running test poll-many.t poll-many: not enough files available (and not root), skipped 0 sec Running test poll-mshot-update.t poll-many: not enough files available (and not root), skipped 0 sec Running test poll-ring.t 0 sec Running test poll-v-poll.t 0 sec Running test pollfree.t 7 sec Running test probe.t 0 sec Running test read-before-exit.t Test skipped Running test read-write.t Test skipped Running test recv-msgall.t 0 sec Running test recv-msgall-stream.t Test skipped Running test register-restrictions.t 0 sec Running test rename.t 0 sec Running test ringbuf-read.t Test skipped Running test ring-leak2.t 1 sec Running test ring-leak.t 0 sec Running test rsrc_tags.t Test skipped Running test rw_merge_test.t 0 sec Running test self.t 0 sec Running test sendmsg_fs_cve.t Test skipped Running test send_recv.t 0 sec Running test send_recvmsg.t 0 sec Running test shared-wq.t 0 sec Running test short-read.t 0 sec Running test shutdown.t 0 sec Running test sigfd-deadlock.t 0 sec Running test skip-cqe.t 0 sec Running test socket.t Test skipped Running test socket-rw.t 0 sec Running test socket-rw-eagain.t 0 sec Running test socket-rw-offset.t 0 sec Running test splice.t 0 sec Running test sq-full.t 0 sec Running test sq-full-cpp.t 0 sec Running test sqpoll-cancel-hang.t 1 sec Running test sqpoll-disable-exit.t 0 sec Running test sq-poll-dup.t Test skipped Running test sqpoll-exit-hang.t 1 sec Running test sq-poll-kthread.t 2 sec Running test sq-poll-share.t Test skipped Running test sqpoll-sleep.t 0 sec Running test sq-space_left.t 0 sec Running test stdout.t This is a pipe test This is a fixed pipe test 0 sec Running test submit-link-fail.t 0 sec Running test submit-reuse.t 0 sec Running test symlink.t 0 sec Running test teardowns.t 0 sec Running test thread-exit.t 0 sec Running test timeout.t Test skipped Running test timeout-new.t 3 sec Running test timeout-overflow.t Skipping 0 sec Running test tty-write-dpoll.t 0 sec Running test unlink.t 0 sec Running test wakeup-hang.t 2 sec Running test xattr.t Test skipped Running test skip-cqe.t 0 sec [0] Running test statx.t 0 sec Running test sq-full-cpp.t 0 sec [0] Tests skipped: <500f9fbadef8.t> All tests passed make[1]: Leaving directory '/usr/src/RPM/BUILD/liburing-2.2/test' make: Leaving directory '/usr/src/RPM/BUILD/liburing-2.2' + exit 0 Processing files: liburing-2.2-alt1 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.25670 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd liburing-2.2 + DOCDIR=/usr/src/tmp/liburing-buildroot/usr/share/doc/liburing-2.2 + export DOCDIR + rm -rf /usr/src/tmp/liburing-buildroot/usr/share/doc/liburing-2.2 + /bin/mkdir -p /usr/src/tmp/liburing-buildroot/usr/share/doc/liburing-2.2 + cp -prL COPYING /usr/src/tmp/liburing-buildroot/usr/share/doc/liburing-2.2 + chmod -R go-w /usr/src/tmp/liburing-buildroot/usr/share/doc/liburing-2.2 + chmod -R a+rX /usr/src/tmp/liburing-buildroot/usr/share/doc/liburing-2.2 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.N85biU find-provides: running scripts (debuginfo,lib,pam,perl,pkgconfig,python,python3,shell) lib.prov: /usr/src/tmp/liburing-buildroot/usr/lib64/liburing.so.2: 43 symbols, 16 bpp Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.qKDnoV find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks,systemd-services) Provides: liburing.so.2()(64bit) = set:jdBZ48amRaEStWoZhxu9JGmcIiMckDBiFvwC2nxEJC6YqXmrmLczwg0fdKZu59WSy9XBvLKZJZa7Zck52YSUVZjKh2, liburing.so.2(LIBURING_2.0)(64bit), liburing.so.2(LIBURING_2.1)(64bit), liburing.so.2(LIBURING_2.2)(64bit) Requires: libc.so.6(GLIBC_2.2.5)(64bit), libc.so.6(GLIBC_2.4)(64bit), rtld(GNU_HASH) Finding debuginfo files (using /usr/lib/rpm/find-debuginfo-files) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.Z2gO2S Creating liburing-debuginfo package Processing files: liburing-devel-2.2-alt1 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.60916 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd liburing-2.2 + DOCDIR=/usr/src/tmp/liburing-buildroot/usr/share/doc/liburing-devel-2.2 + export DOCDIR + rm -rf /usr/src/tmp/liburing-buildroot/usr/share/doc/liburing-devel-2.2 + /bin/mkdir -p /usr/src/tmp/liburing-buildroot/usr/share/doc/liburing-devel-2.2 + cp -prL README LICENSE COPYING.GPL SECURITY.md CHANGELOG examples/io_uring-cp.c examples/io_uring-test.c examples/link-cp.c examples/ucontext-cp.c /usr/src/tmp/liburing-buildroot/usr/share/doc/liburing-devel-2.2 + chmod -R go-w /usr/src/tmp/liburing-buildroot/usr/share/doc/liburing-devel-2.2 + chmod -R a+rX /usr/src/tmp/liburing-buildroot/usr/share/doc/liburing-devel-2.2 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.JmnleU find-provides: running scripts (debuginfo,lib,pam,perl,pkgconfig,python,python3,shell) Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.KZurKS find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks,systemd-services) Provides: pkgconfig(liburing) = 2.2 Requires: /usr/lib64/liburing.so.2.2, /usr/lib64/pkgconfig, glibc-kernheaders-generic Finding debuginfo files (using /usr/lib/rpm/find-debuginfo-files) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.HegaLW Processing files: liburing-debuginfo-2.2-alt1 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.eTs7HV find-provides: running scripts (debuginfo) Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.47cFEV find-requires: running scripts (debuginfo) Provides: debug64(liburing.so.2) Requires: liburing = 2.2-alt1, debug64(libc.so.6) Adding to liburing-debuginfo a strict dependency on liburing Adding to liburing-devel a strict dependency on liburing Removing 1 extra deps from liburing-devel due to dependency on liburing Wrote: /usr/src/RPM/RPMS/x86_64/liburing-2.2-alt1.x86_64.rpm (w2.lzdio) Wrote: /usr/src/RPM/RPMS/x86_64/liburing-devel-2.2-alt1.x86_64.rpm (w2.lzdio) Wrote: /usr/src/RPM/RPMS/x86_64/liburing-debuginfo-2.2-alt1.x86_64.rpm (w2.lzdio) 64.78user 16.70system 1:17.60elapsed 105%CPU (0avgtext+0avgdata 259604maxresident)k 0inputs+0outputs (0major+3160731minor)pagefaults 0swaps 2.97user 1.17system 1:26.11elapsed 4%CPU (0avgtext+0avgdata 129380maxresident)k 0inputs+0outputs (0major+193679minor)pagefaults 0swaps --- liburing-2.2-alt1.x86_64.rpm.repo 2022-12-13 16:41:10.000000000 +0000 +++ liburing-2.2-alt1.x86_64.rpm.hasher 2024-01-07 03:09:38.074841125 +0000 @@ -14,5 +14,5 @@ File: /usr/lib64/liburing.so.2 120777 root:root liburing.so.2.2 -File: /usr/lib64/liburing.so.2.2 100644 root:root 00e4b83ace13e6260700894548442636 +File: /usr/lib64/liburing.so.2.2 100644 root:root eba81346b87a383b44c671a78b0f776b File: /usr/share/doc/liburing-2.2 40755 root:root File: /usr/share/doc/liburing-2.2/COPYING 100644 root:root 4b54a1fd55a448865a0b32d41598759d -RPMIdentity: 58db5b5b258d7d94a7dcbe60c1f154595e6c32ab9f4aeeeb16c63ad488d2d08987f66409fab288d94f9e644ab6891a091e1bf6940378bab81cade75dbc4db49c +RPMIdentity: 966b4a2313142996e8b0ff1ee5aec48480c7a13ddabe214c72394e42cbcc7f9a85d0d7c2064bee95f7e4cecc3cbd65921c9402061d7e6eccac9f1ab3ea2b628d --- liburing-debuginfo-2.2-alt1.x86_64.rpm.repo 2022-12-13 16:41:09.000000000 +0000 +++ liburing-debuginfo-2.2-alt1.x86_64.rpm.hasher 2024-01-07 03:09:38.252843190 +0000 @@ -1,4 +1,4 @@ -/usr/lib/debug/.build-id/10 40755 root:root -/usr/lib/debug/.build-id/10/2210753f7beb25c19af72321361e4d80496e7a 120777 root:root ../../../../lib64/liburing.so.2.2 -/usr/lib/debug/.build-id/10/2210753f7beb25c19af72321361e4d80496e7a.debug 120777 root:root ../../usr/lib64/liburing.so.2.2.debug +/usr/lib/debug/.build-id/35 40755 root:root +/usr/lib/debug/.build-id/35/2620c656bb4c44c20d641f6cb00f08be229def 120777 root:root ../../../../lib64/liburing.so.2.2 +/usr/lib/debug/.build-id/35/2620c656bb4c44c20d641f6cb00f08be229def.debug 120777 root:root ../../usr/lib64/liburing.so.2.2.debug /usr/lib/debug/usr/lib64/liburing.so.2.2.debug 100644 root:root @@ -27,6 +27,6 @@ Provides: liburing-debuginfo = 2.2-alt1:p10+307814.240.40.1 -File: /usr/lib/debug/.build-id/10 40755 root:root -File: /usr/lib/debug/.build-id/10/2210753f7beb25c19af72321361e4d80496e7a 120777 root:root ../../../../lib64/liburing.so.2.2 -File: /usr/lib/debug/.build-id/10/2210753f7beb25c19af72321361e4d80496e7a.debug 120777 root:root ../../usr/lib64/liburing.so.2.2.debug -File: /usr/lib/debug/usr/lib64/liburing.so.2.2.debug 100644 root:root 23cdbaec9ee97081eed541ed41b470ba +File: /usr/lib/debug/.build-id/35 40755 root:root +File: /usr/lib/debug/.build-id/35/2620c656bb4c44c20d641f6cb00f08be229def 120777 root:root ../../../../lib64/liburing.so.2.2 +File: /usr/lib/debug/.build-id/35/2620c656bb4c44c20d641f6cb00f08be229def.debug 120777 root:root ../../usr/lib64/liburing.so.2.2.debug +File: /usr/lib/debug/usr/lib64/liburing.so.2.2.debug 100644 root:root 561fc8a0d7c060b3f61d21445cb9a72c File: /usr/lib/debug/usr/lib64/liburing.so.2.debug 120777 root:root liburing.so.2.2.debug @@ -49,2 +49,2 @@ File: /usr/src/debug/liburing-2.2/src/syscall.h 100644 root:root cab4eb88a239138a3db5ba0dab9aa2dc -RPMIdentity: bed3ef5d250d4c91f949d6224be0af93c0e7ace73d0f6d378a11fabca485b307ee9d4e3731cf320982c29ef3dea5006328bc86b9792881aacf44a4d7f036000a +RPMIdentity: ffbea558f361593ce1b0d1558b2d4891742b2a72024691cbd0b2ba0ef80d93ea0a7165a9ca674a12199d430421355893b8db9a28f442848b971c25782231f555