{"$schema": "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json",
 "version": "2.1.0",
 "runs": [{"tool": {"driver": {"name": "GNU C23",
                               "fullName": "GNU C23 (GCC) version 16.1.1 20260703 (Red Hat 16.1.1-4) (x86_64-redhat-linux)",
                               "version": "16.1.1 20260703 (Red Hat 16.1.1-4)",
                               "informationUri": "https://gcc.gnu.org/gcc-16/",
                               "rules": [{"id": "-Wanalyzer-fd-leak",
                                          "helpUri": "https://gcc.gnu.org/onlinedocs/gcc-16.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-fd-leak"}]}},
           "taxonomies": [{"name": "CWE",
                           "version": "4.7",
                           "organization": "MITRE",
                           "shortDescription": {"text": "The MITRE Common Weakness Enumeration"},
                           "taxa": [{"id": "775",
                                     "helpUri": "https://cwe.mitre.org/data/definitions/775.html"}]}],
           "invocations": [{"arguments": ["/usr/libexec/gcc/x86_64-redhat-linux/16/cc1",
                                          "-quiet",
                                          "-I",
                                          "../src/include/",
                                          "-D",
                                          "_GNU_SOURCE",
                                          "-D",
                                          "__SANE_USERSPACE_TYPES__",
                                          "-D",
                                          "_LARGEFILE_SOURCE",
                                          "-D",
                                          "_FILE_OFFSET_BITS=64",
                                          "-D",
                                          "LIBURING_BUILD_TEST",
                                          "-include",
                                          "../config-host.h",
                                          "sq-poll-share.c",
                                          "-quiet",
                                          "-dumpbase",
                                          "sq-poll-share.c",
                                          "-dumpbase-ext",
                                          ".c",
                                          "-m64",
                                          "-mtune=generic",
                                          "-march=x86-64",
                                          "-mtls-dialect=gnu2",
                                          "-O2",
                                          "-Wno-unused-parameter",
                                          "-Wno-sign-compare",
                                          "-Wno-unknown-pragmas",
                                          "-flto=auto",
                                          "-ffat-lto-objects",
                                          "-fexceptions",
                                          "-fstack-protector-strong",
                                          "-fasynchronous-unwind-tables",
                                          "-fstack-clash-protection",
                                          "-fcf-protection=full",
                                          "-fno-omit-frame-pointer",
                                          "-fanalyzer",
                                          "-fdiagnostics-path-format=separate-events",
                                          "-fno-diagnostics-show-caret",
                                          "-fno-lto",
                                          "-fanalyzer-assume-nothrow",
                                          "-fdiagnostics-text-art-charset=none",
                                          "-fdiagnostics-set-output=sarif:file=/builddir/gcc-results/5255-ekR7.sarif",
                                          "-o",
                                          "/tmp/cchw8ITh.s"],
                            "workingDirectory": {"uri": "/builddir/build/BUILD/liburing-2.13-build/liburing-2.13/test"},
                            "startTimeUtc": "2026-08-03T18:02:03Z",
                            "executionSuccessful": true,
                            "toolExecutionNotifications": [],
                            "endTimeUtc": "2026-08-03T18:02:04Z"}],
           "originalUriBaseIds": {"PWD": {"uri": "file:///builddir/build/BUILD/liburing-2.13-build/liburing-2.13/test/"}},
           "artifacts": [{"location": {"uri": "sq-poll-share.c",
                                       "uriBaseId": "PWD"},
                          "sourceLanguage": "c",
                          "contents": {"text": "/* SPDX-License-Identifier: MIT */\n/*\n * Description: test SQPOLL with IORING_SETUP_ATTACH_WQ\n */\n#include <errno.h>\n#include <stdio.h>\n#include <unistd.h>\n#include <stdlib.h>\n#include <string.h>\n#include <fcntl.h>\n#include <sys/types.h>\n#include <poll.h>\n#include <sys/eventfd.h>\n#include <sys/resource.h>\n\n#include \"helpers.h\"\n#include \"liburing.h\"\n\n#define FILE_SIZE\t(128 * 1024 * 1024)\n#define BS\t\t4096\n#define BUFFERS\t\t64\n\n#define NR_RINGS\t4\n\nstatic struct iovec *vecs;\n\nstatic int wait_io(struct io_uring *ring, int nr_ios)\n{\n\tstruct io_uring_cqe *cqe;\n\n\twhile (nr_ios) {\n\t\tint ret = io_uring_wait_cqe(ring, &cqe);\n\n\t\tif (ret == -EAGAIN) {\n\t\t\tcontinue;\n\t\t} else if (ret) {\n\t\t\tfprintf(stderr, \"io_uring_wait_cqe failed %i\\n\", ret);\n\t\t\treturn 1;\n\t\t}\n\t\tif (cqe->res != BS) {\n\t\t\tfprintf(stderr, \"Unexpected ret %d\\n\", cqe->res);\n\t\t\treturn 1;\n\t\t}\n\t\tio_uring_cqe_seen(ring, cqe);\n\t\tnr_ios--;\n\t}\n\n\treturn 0;\n}\n\nstatic int queue_io(struct io_uring *ring, int fd, int nr_ios)\n{\n\tunsigned long off;\n\tint i;\n\n\ti = 0;\n\toff = 0;\n\twhile (nr_ios) {\n\t\tstruct io_uring_sqe *sqe;\n\n\t\tsqe = io_uring_get_sqe(ring);\n\t\tif (!sqe)\n\t\t\tbreak;\n\t\tio_uring_prep_read(sqe, fd, vecs[i].iov_base, vecs[i].iov_len, off);\n\t\tnr_ios--;\n\t\ti++;\n\t\toff += BS;\n\t}\n\n\tio_uring_submit(ring);\n\treturn i;\n}\n\nint main(int argc, char *argv[])\n{\n\tstruct io_uring rings[NR_RINGS];\n\tint rets[NR_RINGS];\n\tunsigned long ios;\n\tint i, ret, fd;\n\tchar *fname;\n\n\tif (argc > 1) {\n\t\tfname = argv[1];\n\t} else {\n\t\tfname = \".basic-rw-poll-share\";\n\t\tt_create_file(fname, FILE_SIZE);\n\t}\n\n\tvecs = t_create_buffers(BUFFERS, BS);\n\n\tfd = open(fname, O_RDONLY | O_DIRECT);\n\tif (fd < 0) {\n\t\tif (errno == EPERM || errno == EACCES || errno == EINVAL)\n\t\t\treturn T_EXIT_SKIP;\n\t\tperror(\"open\");\n\t\treturn -1;\n\t}\n\n\tif (fname != argv[1])\n\t\tunlink(fname);\n\n\tfor (i = 0; i < NR_RINGS; i++) {\n\t\tstruct io_uring_params p = { };\n\n\t\tp.flags = IORING_SETUP_SQPOLL;\n\t\tif (i) {\n\t\t\tp.wq_fd = rings[0].ring_fd;\n\t\t\tp.flags |= IORING_SETUP_ATTACH_WQ;\n\t\t}\n\t\tret = io_uring_queue_init_params(BUFFERS, &rings[i], &p);\n\t\tif (ret) {\n\t\t\tfprintf(stderr, \"queue_init: %d/%d\\n\", ret, i);\n\t\t\tgoto err;\n\t\t}\n\t\t/* no sharing for non-fixed either */\n\t\tif (!(p.features & IORING_FEAT_SQPOLL_NONFIXED)) {\n\t\t\tfprintf(stdout, \"No SQPOLL sharing, skipping\\n\");\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\tios = 0;\n\twhile (ios < (FILE_SIZE / BS)) {\n\t\tfor (i = 0; i < NR_RINGS; i++) {\n\t\t\tret = queue_io(&rings[i], fd, BUFFERS);\n\t\t\tif (ret < 0)\n\t\t\t\tgoto err;\n\t\t\trets[i] = ret;\n\t\t}\n\t\tfor (i = 0; i < NR_RINGS; i++) {\n\t\t\tif (wait_io(&rings[i], rets[i]))\n\t\t\t\tgoto err;\n\t\t}\n\t\tios += BUFFERS;\n\t}\n\n\treturn 0;\nerr:\n\treturn 1;\n}\n"},
                          "roles": ["analysisTarget",
                                    "tracedFile"]}],
           "results": [{"ruleId": "-Wanalyzer-fd-leak",
                        "taxa": [{"id": "775",
                                  "toolComponent": {"name": "cwe"}}],
                        "properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                       "gcc/analyzer/saved_diagnostic/ploc": {"enode": 58},
                                       "gcc/analyzer/saved_diagnostic/var": "open (fname_20, 16384)",
                                       "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_39 = open (fname_20, 16384);, _39)",
                                       "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-only",
                                       "gcc/analyzer/saved_diagnostic/idx": 0,
                                       "gcc/analyzer/saved_diagnostic/duplicates": [{"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 58},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "open (fname_20, 16384)",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_39 = open (fname_20, 16384);, _39)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-only",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 1,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 86},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "open (fname_20, 16384)",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_39 = open (fname_20, 16384);, _39)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-only",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 4,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 86},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "open (fname_20, 16384)",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_39 = open (fname_20, 16384);, _39)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-only",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 5,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}}],
                                       "gcc/analyzer/pending_diagnostic/kind": "fd_leak"},
                        "level": "warning",
                        "message": {"text": "leak of file descriptor ‘open(fname, 16384)’"},
                        "locations": [{"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                 "uriBaseId": "PWD"},
                                                            "region": {"startLine": 99,
                                                                       "startColumn": 22,
                                                                       "endColumn": 29},
                                                            "contextRegion": {"startLine": 99,
                                                                              "snippet": {"text": "\tif (fname != argv[1])\n"}}},
                                       "logicalLocations": [{"index": 0,
                                                             "fullyQualifiedName": "main"}]}],
                        "codeFlows": [{"threadFlows": [{"id": "main",
                                                        "locations": [{"properties": {"gcc/analyzer/checker_event/emission_id": "(1)",
                                                                                      "gcc/analyzer/checker_event/kind": "state_change"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 91,
                                                                                                                    "startColumn": 14,
                                                                                                                    "endColumn": 46},
                                                                                                         "contextRegion": {"startLine": 91,
                                                                                                                           "snippet": {"text": "\tfd = open(fname, O_RDONLY | O_DIRECT);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "opened here"}},
                                                                       "kinds": ["acquire",
                                                                                 "resource"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 1},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(2)",
                                                                                      "gcc/analyzer/checker_event/kind": "state_change"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 92,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 92,
                                                                                                                           "snippet": {"text": "\tif (fd < 0) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "assuming ‘open(fname, 16384)’ is a valid file descriptor (>= 0)"}},
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 2},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(3)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 21,
                                                                                                                                 "dst_id": 31}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 92,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 92,
                                                                                                                           "snippet": {"text": "\tif (fd < 0) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "following ‘false’ branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 3},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(4)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 21,
                                                                                                                                 "dst_id": 31}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 99,
                                                                                                                    "startColumn": 22,
                                                                                                                    "endColumn": 29},
                                                                                                         "contextRegion": {"startLine": 99,
                                                                                                                           "snippet": {"text": "\tif (fname != argv[1])\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 4},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(5)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 41,
                                                                                                                                 "dst_id": 42}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 102,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 26},
                                                                                                         "contextRegion": {"startLine": 102,
                                                                                                                           "snippet": {"text": "\tfor (i = 0; i < NR_RINGS; i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘i != 4’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 5},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(6)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 41,
                                                                                                                                 "dst_id": 42}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 103,
                                                                                                                    "startColumn": 40,
                                                                                                                    "endColumn": 41},
                                                                                                         "contextRegion": {"startLine": 103,
                                                                                                                           "snippet": {"text": "\t\tstruct io_uring_params p = { };\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 6},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(7)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 44,
                                                                                                                                 "dst_id": 50}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 106,
                                                                                                                    "startColumn": 20,
                                                                                                                    "endColumn": 21},
                                                                                                         "contextRegion": {"startLine": 106,
                                                                                                                           "snippet": {"text": "\t\tif (i) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "following ‘false’ branch (when ‘i == 0’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 7},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(8)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 44,
                                                                                                                                 "dst_id": 50}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 110,
                                                                                                                    "startColumn": 23,
                                                                                                                    "endColumn": 73},
                                                                                                         "contextRegion": {"startLine": 110,
                                                                                                                           "snippet": {"text": "\t\tret = io_uring_queue_init_params(BUFFERS, &rings[i], &p);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 8},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(9)",
                                                                                      "gcc/analyzer/checker_event/kind": "warning"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 99,
                                                                                                                    "startColumn": 22,
                                                                                                                    "endColumn": 29},
                                                                                                         "contextRegion": {"startLine": 99,
                                                                                                                           "snippet": {"text": "\tif (fname != argv[1])\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "‘open(fname, 16384)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)"}},
                                                                       "kinds": ["danger"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 9}]}]}]},
                       {"ruleId": "-Wanalyzer-fd-leak",
                        "taxa": [{"id": "775",
                                  "toolComponent": {"name": "cwe"}}],
                        "properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                       "gcc/analyzer/saved_diagnostic/ploc": {"enode": 62},
                                       "gcc/analyzer/saved_diagnostic/var": "open (fname_20, 16384)",
                                       "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_39 = open (fname_20, 16384);, _39)",
                                       "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-only",
                                       "gcc/analyzer/saved_diagnostic/idx": 2,
                                       "gcc/analyzer/saved_diagnostic/duplicates": [{"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 62},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "open (fname_20, 16384)",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_39 = open (fname_20, 16384);, _39)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-only",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 3,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 90},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "open (fname_20, 16384)",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_39 = open (fname_20, 16384);, _39)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-only",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 6,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 90},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "open (fname_20, 16384)",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_39 = open (fname_20, 16384);, _39)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-only",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 7,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}}],
                                       "gcc/analyzer/pending_diagnostic/kind": "fd_leak"},
                        "level": "warning",
                        "message": {"text": "leak of file descriptor ‘open(fname, 16384)’"},
                        "locations": [{"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                 "uriBaseId": "PWD"},
                                                            "region": {"startLine": 99,
                                                                       "startColumn": 22,
                                                                       "endColumn": 29},
                                                            "contextRegion": {"startLine": 99,
                                                                              "snippet": {"text": "\tif (fname != argv[1])\n"}}},
                                       "logicalLocations": [{"index": 0,
                                                             "fullyQualifiedName": "main"}]}],
                        "codeFlows": [{"threadFlows": [{"id": "main",
                                                        "locations": [{"properties": {"gcc/analyzer/checker_event/emission_id": "(1)",
                                                                                      "gcc/analyzer/checker_event/kind": "state_change"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 91,
                                                                                                                    "startColumn": 14,
                                                                                                                    "endColumn": 46},
                                                                                                         "contextRegion": {"startLine": 91,
                                                                                                                           "snippet": {"text": "\tfd = open(fname, O_RDONLY | O_DIRECT);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "opened here"}},
                                                                       "kinds": ["acquire",
                                                                                 "resource"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 1},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(2)",
                                                                                      "gcc/analyzer/checker_event/kind": "state_change"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 92,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 92,
                                                                                                                           "snippet": {"text": "\tif (fd < 0) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "assuming ‘open(fname, 16384)’ is a valid file descriptor (>= 0)"}},
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 2},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(3)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 21,
                                                                                                                                 "dst_id": 31}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 92,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 92,
                                                                                                                           "snippet": {"text": "\tif (fd < 0) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "following ‘false’ branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 3},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(4)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 21,
                                                                                                                                 "dst_id": 31}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 99,
                                                                                                                    "startColumn": 22,
                                                                                                                    "endColumn": 29},
                                                                                                         "contextRegion": {"startLine": 99,
                                                                                                                           "snippet": {"text": "\tif (fname != argv[1])\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 4},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(5)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 41,
                                                                                                                                 "dst_id": 42}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 102,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 26},
                                                                                                         "contextRegion": {"startLine": 102,
                                                                                                                           "snippet": {"text": "\tfor (i = 0; i < NR_RINGS; i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘i != 4’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 5},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(6)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 41,
                                                                                                                                 "dst_id": 42}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 103,
                                                                                                                    "startColumn": 40,
                                                                                                                    "endColumn": 41},
                                                                                                         "contextRegion": {"startLine": 103,
                                                                                                                           "snippet": {"text": "\t\tstruct io_uring_params p = { };\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 6},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(7)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 44,
                                                                                                                                 "dst_id": 50}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 106,
                                                                                                                    "startColumn": 20,
                                                                                                                    "endColumn": 21},
                                                                                                         "contextRegion": {"startLine": 106,
                                                                                                                           "snippet": {"text": "\t\tif (i) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "following ‘false’ branch (when ‘i == 0’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 7},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(8)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 44,
                                                                                                                                 "dst_id": 50}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 110,
                                                                                                                    "startColumn": 23,
                                                                                                                    "endColumn": 73},
                                                                                                         "contextRegion": {"startLine": 110,
                                                                                                                           "snippet": {"text": "\t\tret = io_uring_queue_init_params(BUFFERS, &rings[i], &p);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 8},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(9)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 54,
                                                                                                                                 "dst_id": 60}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 111,
                                                                                                                    "startColumn": 20,
                                                                                                                    "endColumn": 21},
                                                                                                         "contextRegion": {"startLine": 111,
                                                                                                                           "snippet": {"text": "\t\tif (ret) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "following ‘false’ branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 9},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(10)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 54,
                                                                                                                                 "dst_id": 60}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 116,
                                                                                                                    "startColumn": 23,
                                                                                                                    "endColumn": 33},
                                                                                                         "contextRegion": {"startLine": 116,
                                                                                                                           "snippet": {"text": "\t\tif (!(p.features & IORING_FEAT_SQPOLL_NONFIXED)) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 10},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(11)",
                                                                                      "gcc/analyzer/checker_event/kind": "warning"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "sq-poll-share.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 99,
                                                                                                                    "startColumn": 22,
                                                                                                                    "endColumn": 29},
                                                                                                         "contextRegion": {"startLine": 99,
                                                                                                                           "snippet": {"text": "\tif (fname != argv[1])\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "‘open(fname, 16384)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)"}},
                                                                       "kinds": ["danger"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 11}]}]}]}],
           "logicalLocations": [{"name": "main",
                                 "fullyQualifiedName": "main",
                                 "decoratedName": "main",
                                 "kind": "function",
                                 "index": 0}]}]}
