{"$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",
                                          "fc2a85cb02ef.c",
                                          "-quiet",
                                          "-dumpbase",
                                          "fc2a85cb02ef.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/1956-CECe.sarif",
                                          "-o",
                                          "/tmp/ccCU4Qs4.s"],
                            "workingDirectory": {"uri": "/builddir/build/BUILD/liburing-2.13-build/liburing-2.13/test"},
                            "startTimeUtc": "2026-08-03T18:01:41Z",
                            "executionSuccessful": true,
                            "toolExecutionNotifications": [],
                            "endTimeUtc": "2026-08-03T18:01:42Z"}],
           "originalUriBaseIds": {"PWD": {"uri": "file:///builddir/build/BUILD/liburing-2.13-build/liburing-2.13/test/"}},
           "artifacts": [{"location": {"uri": "fc2a85cb02ef.c",
                                       "uriBaseId": "PWD"},
                          "sourceLanguage": "c",
                          "contents": {"text": "/* SPDX-License-Identifier: MIT */\n// https://syzkaller.appspot.com/bug?id=1f2ecd7a23dba87e5ca3505ec44514a462cfe8c0\n// autogenerated by syzkaller (https://github.com/google/syzkaller)\n\n#include <errno.h>\n#include <fcntl.h>\n#include <stdarg.h>\n#include <stdbool.h>\n#include <stdint.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <sys/socket.h>\n#include <sys/types.h>\n#include <sys/mman.h>\n#include <unistd.h>\n\n#include \"liburing.h\"\n#include \"helpers.h\"\n#include \"../src/syscall.h\"\n\nstatic bool write_file(const char* file, const char* what, ...)\n{\n  char buf[1024];\n  va_list args;\n  va_start(args, what);\n  vsnprintf(buf, sizeof(buf), what, args);\n  va_end(args);\n  buf[sizeof(buf) - 1] = 0;\n  int len = strlen(buf);\n  int fd = open(file, O_WRONLY | O_CLOEXEC);\n  if (fd == -1)\n    return false;\n  if (write(fd, buf, len) != len) {\n    int err = errno;\n    close(fd);\n    errno = err;\n    return false;\n  }\n  close(fd);\n  return true;\n}\n\nstatic int inject_fault(int nth)\n{\n  int fd;\n  fd = open(\"/proc/thread-self/fail-nth\", O_RDWR);\n  if (fd == -1)\n    exit(1);\n  char buf[16];\n  sprintf(buf, \"%d\", nth + 1);\n  if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf))\n    exit(1);\n  return fd;\n}\n\nstatic int setup_fault(void)\n{\n  static struct {\n    const char* file;\n    const char* val;\n    bool fatal;\n  } files[] = {\n      {\"/sys/kernel/debug/failslab/ignore-gfp-wait\", \"N\", true},\n      {\"/sys/kernel/debug/failslab/verbose\", \"0\", false},\n      {\"/sys/kernel/debug/fail_futex/ignore-private\", \"N\", false},\n      {\"/sys/kernel/debug/fail_page_alloc/verbose\", \"0\", false},\n      {\"/sys/kernel/debug/fail_page_alloc/ignore-gfp-highmem\", \"N\", false},\n      {\"/sys/kernel/debug/fail_page_alloc/ignore-gfp-wait\", \"N\", false},\n      {\"/sys/kernel/debug/fail_page_alloc/min-order\", \"0\", false},\n  };\n  unsigned i;\n  for (i = 0; i < sizeof(files) / sizeof(files[0]); i++) {\n    if (!write_file(files[i].file, files[i].val)) {\n      if (files[i].fatal)\n\treturn 1;\n    }\n  }\n  return 0;\n}\n\nstatic uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff};\n\nint main(int argc, char *argv[])\n{\n  if (argc > 1)\n    return T_EXIT_SKIP;\n  mmap((void *) 0x20000000ul, 0x1000000ul, 3ul, MAP_ANON|MAP_PRIVATE, -1, 0);\n  if (setup_fault()) {\n    printf(\"Test needs failslab/fail_futex/fail_page_alloc enabled, skipped\\n\");\n    return T_EXIT_SKIP;\n  }\n  intptr_t res = 0;\n  *(uint32_t*)0x20000000 = 0;\n  *(uint32_t*)0x20000004 = 0;\n  *(uint32_t*)0x20000008 = 0;\n  *(uint32_t*)0x2000000c = 0;\n  *(uint32_t*)0x20000010 = 0;\n  *(uint32_t*)0x20000014 = 0;\n  *(uint32_t*)0x20000018 = 0;\n  *(uint32_t*)0x2000001c = 0;\n  *(uint32_t*)0x20000020 = 0;\n  *(uint32_t*)0x20000024 = 0;\n  *(uint32_t*)0x20000028 = 0;\n  *(uint32_t*)0x2000002c = 0;\n  *(uint32_t*)0x20000030 = 0;\n  *(uint32_t*)0x20000034 = 0;\n  *(uint32_t*)0x20000038 = 0;\n  *(uint32_t*)0x2000003c = 0;\n  *(uint32_t*)0x20000040 = 0;\n  *(uint32_t*)0x20000044 = 0;\n  *(uint64_t*)0x20000048 = 0;\n  *(uint32_t*)0x20000050 = 0;\n  *(uint32_t*)0x20000054 = 0;\n  *(uint32_t*)0x20000058 = 0;\n  *(uint32_t*)0x2000005c = 0;\n  *(uint32_t*)0x20000060 = 0;\n  *(uint32_t*)0x20000064 = 0;\n  *(uint32_t*)0x20000068 = 0;\n  *(uint32_t*)0x2000006c = 0;\n  *(uint64_t*)0x20000070 = 0;\n  res = __sys_io_uring_setup(0x6a6, (struct io_uring_params *) 0x20000000ul);\n  if (res != -1)\n    r[0] = res;\n  res = socket(0x11ul, 2ul, 0x300ul);\n  if (res != -1)\n    r[1] = res;\n  *(uint32_t*)0x20000080 = r[1];\n  inject_fault(1);\n  __sys_io_uring_register(r[0], 2ul, (const void *) 0x20000080ul, 1ul);\n  return T_EXIT_PASS;\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": 372},
                                       "gcc/analyzer/saved_diagnostic/var": "open (\"/proc/thread-self/fail-nth\", 2)",
                                       "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_7 = open (\"/proc/thread-self/fail-nth\", 2);, _7)",
                                       "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                       "gcc/analyzer/saved_diagnostic/idx": 8,
                                       "gcc/analyzer/saved_diagnostic/duplicates": [{"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 200},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "open (\"/proc/thread-self/fail-nth\", 2)",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_7 = open (\"/proc/thread-self/fail-nth\", 2);, _7)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "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": 218},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "open (\"/proc/thread-self/fail-nth\", 2)",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_7 = open (\"/proc/thread-self/fail-nth\", 2);, _7)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "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": 218},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "open (\"/proc/thread-self/fail-nth\", 2)",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_7 = open (\"/proc/thread-self/fail-nth\", 2);, _7)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 5,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 200},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "open (\"/proc/thread-self/fail-nth\", 2)",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_7 = open (\"/proc/thread-self/fail-nth\", 2);, _7)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 0,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 372},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "open (\"/proc/thread-self/fail-nth\", 2)",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_7 = open (\"/proc/thread-self/fail-nth\", 2);, _7)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 9,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}}],
                                       "gcc/analyzer/pending_diagnostic/kind": "fd_leak"},
                        "level": "warning",
                        "message": {"text": "leak of file descriptor ‘open(\"/proc/thread-self/fail-nth\", 2)’"},
                        "locations": [{"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                 "uriBaseId": "PWD"},
                                                            "region": {"startLine": 51,
                                                                       "startColumn": 3,
                                                                       "endColumn": 30},
                                                            "contextRegion": {"startLine": 51,
                                                                              "snippet": {"text": "  sprintf(buf, \"%d\", nth + 1);\n"}}},
                                       "logicalLocations": [{"index": 0,
                                                             "fullyQualifiedName": "inject_fault"}]}],
                        "codeFlows": [{"threadFlows": [{"id": "main",
                                                        "locations": [{"properties": {"gcc/analyzer/checker_event/emission_id": "(1)",
                                                                                      "gcc/analyzer/checker_event/kind": "state_change"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 47,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 50},
                                                                                                         "contextRegion": {"startLine": 47,
                                                                                                                           "snippet": {"text": "  fd = open(\"/proc/thread-self/fail-nth\", O_RDWR);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "inject_fault"}],
                                                                                    "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": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 48,
                                                                                                                    "startColumn": 6,
                                                                                                                    "endColumn": 7},
                                                                                                         "contextRegion": {"startLine": 48,
                                                                                                                           "snippet": {"text": "  if (fd == -1)\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "inject_fault"}],
                                                                                    "message": {"text": "assuming ‘open(\"/proc/thread-self/fail-nth\", 2)’ 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": 88,
                                                                                                                                 "dst_id": 91}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 48,
                                                                                                                    "startColumn": 6,
                                                                                                                    "endColumn": 7},
                                                                                                         "contextRegion": {"startLine": 48,
                                                                                                                           "snippet": {"text": "  if (fd == -1)\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "inject_fault"}],
                                                                                    "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": 88,
                                                                                                                                 "dst_id": 91}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 51,
                                                                                                                    "startColumn": 3,
                                                                                                                    "endColumn": 30},
                                                                                                         "contextRegion": {"startLine": 51,
                                                                                                                           "snippet": {"text": "  sprintf(buf, \"%d\", nth + 1);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "inject_fault"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 4},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(5)",
                                                                                      "gcc/analyzer/checker_event/kind": "warning"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 51,
                                                                                                                    "startColumn": 3,
                                                                                                                    "endColumn": 30},
                                                                                                         "contextRegion": {"startLine": 51,
                                                                                                                           "snippet": {"text": "  sprintf(buf, \"%d\", nth + 1);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "inject_fault"}],
                                                                                    "message": {"text": "‘open(\"/proc/thread-self/fail-nth\", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)"}},
                                                                       "kinds": ["danger"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 5}]}]}]},
                       {"ruleId": "-Wanalyzer-fd-leak",
                        "taxa": [{"id": "775",
                                  "toolComponent": {"name": "cwe"}}],
                        "properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                       "gcc/analyzer/saved_diagnostic/ploc": {"enode": 206},
                                       "gcc/analyzer/saved_diagnostic/var": "<retval>",
                                       "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_7 = open (\"/proc/thread-self/fail-nth\", 2);, _7)",
                                       "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                       "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": 206},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "<retval>",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_7 = open (\"/proc/thread-self/fail-nth\", 2);, _7)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "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": 223},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "<retval>",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_7 = open (\"/proc/thread-self/fail-nth\", 2);, _7)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "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": 223},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "<retval>",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_7 = open (\"/proc/thread-self/fail-nth\", 2);, _7)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "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 ‘<return-value>’"},
                        "locations": [{"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                 "uriBaseId": "PWD"},
                                                            "region": {"startLine": 130,
                                                                       "startColumn": 27,
                                                                       "endColumn": 31},
                                                            "contextRegion": {"startLine": 130,
                                                                              "snippet": {"text": "  __sys_io_uring_register(r[0], 2ul, (const void *) 0x20000080ul, 1ul);\n"}}},
                                       "logicalLocations": [{"index": 0,
                                                             "fullyQualifiedName": "inject_fault"}]}],
                        "codeFlows": [{"threadFlows": [{"id": "main",
                                                        "locations": [{"properties": {"gcc/analyzer/checker_event/emission_id": "(1)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 84,
                                                                                                                    "startColumn": 5,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 84,
                                                                                                                           "snippet": {"text": "int main(int argc, char *argv[])\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "entry to ‘main’"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 1},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(2)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 1,
                                                                                                                                 "dst_id": 3}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 86,
                                                                                                                    "startColumn": 6,
                                                                                                                    "endColumn": 7},
                                                                                                         "contextRegion": {"startLine": 86,
                                                                                                                           "snippet": {"text": "  if (argc > 1)\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "following ‘false’ branch (when ‘argc <= 1’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 2},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(3)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 1,
                                                                                                                                 "dst_id": 3}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 88,
                                                                                                                    "startColumn": 3,
                                                                                                                    "endColumn": 77},
                                                                                                         "contextRegion": {"startLine": 88,
                                                                                                                           "snippet": {"text": "  mmap((void *) 0x20000000ul, 0x1000000ul, 3ul, MAP_ANON|MAP_PRIVATE, -1, 0);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 3},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(4)",
                                                                                      "gcc/analyzer/checker_event/kind": "call",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 4,
                                                                                                                                 "dst_id": 5}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 89,
                                                                                                                    "startColumn": 7,
                                                                                                                    "endColumn": 20},
                                                                                                         "contextRegion": {"startLine": 89,
                                                                                                                           "snippet": {"text": "  if (setup_fault()) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "calling ‘setup_fault’ from ‘main’"}},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 4},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(5)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 57,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 23},
                                                                                                         "contextRegion": {"startLine": 57,
                                                                                                                           "snippet": {"text": "static int setup_fault(void)\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "setup_fault"}],
                                                                                    "message": {"text": "entry to ‘setup_fault’"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 5},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(6)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 68,
                                                                                                                                 "dst_id": 69}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 73,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 51},
                                                                                                         "contextRegion": {"startLine": 73,
                                                                                                                           "snippet": {"text": "  for (i = 0; i < sizeof(files) / sizeof(files[0]); i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "setup_fault"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘i != 7’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 6},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(7)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 68,
                                                                                                                                 "dst_id": 69}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 74,
                                                                                                                    "startColumn": 10,
                                                                                                                    "endColumn": 49},
                                                                                                         "contextRegion": {"startLine": 74,
                                                                                                                           "snippet": {"text": "    if (!write_file(files[i].file, files[i].val)) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "setup_fault"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 7},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(8)",
                                                                                      "gcc/analyzer/checker_event/kind": "return"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 89,
                                                                                                                    "startColumn": 7,
                                                                                                                    "endColumn": 20},
                                                                                                         "contextRegion": {"startLine": 89,
                                                                                                                           "snippet": {"text": "  if (setup_fault()) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "returning to ‘main’ from ‘setup_fault’"}},
                                                                       "kinds": ["return",
                                                                                 "function"],
                                                                       "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": 5,
                                                                                                                                 "dst_id": 8}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 89,
                                                                                                                    "startColumn": 6,
                                                                                                                    "endColumn": 7},
                                                                                                         "contextRegion": {"startLine": 89,
                                                                                                                           "snippet": {"text": "  if (setup_fault()) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "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": 5,
                                                                                                                                 "dst_id": 8}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 94,
                                                                                                                    "startColumn": 3,
                                                                                                                    "endColumn": 29},
                                                                                                         "contextRegion": {"startLine": 94,
                                                                                                                           "snippet": {"text": "  *(uint32_t*)0x20000000 = 0;\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "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": "custom"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 125,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 37},
                                                                                                         "contextRegion": {"startLine": 125,
                                                                                                                           "snippet": {"text": "  res = socket(0x11ul, 2ul, 0x300ul);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "when ‘socket’ fails"}},
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 11},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(12)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 45,
                                                                                                                                 "dst_id": 49}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 126,
                                                                                                                    "startColumn": 6,
                                                                                                                    "endColumn": 7},
                                                                                                         "contextRegion": {"startLine": 126,
                                                                                                                           "snippet": {"text": "  if (res != -1)\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "following ‘false’ branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 12},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(13)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 45,
                                                                                                                                 "dst_id": 49}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 128,
                                                                                                                    "startColumn": 28,
                                                                                                                    "endColumn": 32},
                                                                                                         "contextRegion": {"startLine": 128,
                                                                                                                           "snippet": {"text": "  *(uint32_t*)0x20000080 = r[1];\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 13},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(14)",
                                                                                      "gcc/analyzer/checker_event/kind": "call",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 54,
                                                                                                                                 "dst_id": 55}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 129,
                                                                                                                    "startColumn": 3,
                                                                                                                    "endColumn": 18},
                                                                                                         "contextRegion": {"startLine": 129,
                                                                                                                           "snippet": {"text": "  inject_fault(1);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "calling ‘inject_fault’ from ‘main’"}},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 14},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(15)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 44,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 24},
                                                                                                         "contextRegion": {"startLine": 44,
                                                                                                                           "snippet": {"text": "static int inject_fault(int nth)\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "inject_fault"}],
                                                                                    "message": {"text": "entry to ‘inject_fault’"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 15},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(16)",
                                                                                      "gcc/analyzer/checker_event/kind": "state_change"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 47,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 50},
                                                                                                         "contextRegion": {"startLine": 47,
                                                                                                                           "snippet": {"text": "  fd = open(\"/proc/thread-self/fail-nth\", O_RDWR);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "inject_fault"}],
                                                                                    "message": {"text": "opened here"}},
                                                                       "kinds": ["acquire",
                                                                                 "resource"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 16},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(17)",
                                                                                      "gcc/analyzer/checker_event/kind": "state_change"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 48,
                                                                                                                    "startColumn": 6,
                                                                                                                    "endColumn": 7},
                                                                                                         "contextRegion": {"startLine": 48,
                                                                                                                           "snippet": {"text": "  if (fd == -1)\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "inject_fault"}],
                                                                                    "message": {"text": "assuming ‘open(\"/proc/thread-self/fail-nth\", 2)’ is a valid file descriptor (>= 0)"}},
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 17},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(18)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 88,
                                                                                                                                 "dst_id": 91}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 48,
                                                                                                                    "startColumn": 6,
                                                                                                                    "endColumn": 7},
                                                                                                         "contextRegion": {"startLine": 48,
                                                                                                                           "snippet": {"text": "  if (fd == -1)\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "inject_fault"}],
                                                                                    "message": {"text": "following ‘false’ branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 18},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(19)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 88,
                                                                                                                                 "dst_id": 91}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 51,
                                                                                                                    "startColumn": 3,
                                                                                                                    "endColumn": 30},
                                                                                                         "contextRegion": {"startLine": 51,
                                                                                                                           "snippet": {"text": "  sprintf(buf, \"%d\", nth + 1);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "inject_fault"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 19},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(20)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 97,
                                                                                                                                 "dst_id": 100}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 52,
                                                                                                                    "startColumn": 6,
                                                                                                                    "endColumn": 7},
                                                                                                         "contextRegion": {"startLine": 52,
                                                                                                                           "snippet": {"text": "  if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf))\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "inject_fault"}],
                                                                                    "message": {"text": "following ‘false’ branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 20},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(21)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 97,
                                                                                                                                 "dst_id": 100}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 54,
                                                                                                                    "startColumn": 10,
                                                                                                                    "endColumn": 12},
                                                                                                         "contextRegion": {"startLine": 54,
                                                                                                                           "snippet": {"text": "  return fd;\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "inject_fault"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 21},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(22)",
                                                                                      "gcc/analyzer/checker_event/kind": "warning"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fc2a85cb02ef.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 130,
                                                                                                                    "startColumn": 27,
                                                                                                                    "endColumn": 31},
                                                                                                         "contextRegion": {"startLine": 130,
                                                                                                                           "snippet": {"text": "  __sys_io_uring_register(r[0], 2ul, (const void *) 0x20000080ul, 1ul);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "main"}],
                                                                                    "message": {"text": "‘<return-value>’ leaks here; was opened at [(16)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/15)"}},
                                                                       "kinds": ["danger"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 22}]}]}]}],
           "logicalLocations": [{"name": "inject_fault",
                                 "fullyQualifiedName": "inject_fault",
                                 "decoratedName": "inject_fault",
                                 "kind": "function",
                                 "index": 0},
                                {"name": "main",
                                 "fullyQualifiedName": "main",
                                 "decoratedName": "main",
                                 "kind": "function",
                                 "index": 1},
                                {"name": "setup_fault",
                                 "fullyQualifiedName": "setup_fault",
                                 "decoratedName": "setup_fault",
                                 "kind": "function",
                                 "index": 2}]}]}
