Task #92212 - added.err
back to task #92212download
Error: GCC_ANALYZER_WARNING (CWE-775):
zix-0.8.0/test/test_filesystem.c:72:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "wb")’
zix-0.8.0/test/test_filesystem.c:69:21: acquire_resource: opened here
zix-0.8.0/test/test_filesystem.c:70:6: branch_true: following ‘true’ branch...
zix-0.8.0/test/test_filesystem.c:71:5: branch_true: ...to here
zix-0.8.0/test/test_filesystem.c:72:11: throw: if ‘fflush’ throws an exception...
zix-0.8.0/test/test_filesystem.c:72:11: danger: ‘fopen(path, "wb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 70| if (f) {
# 71| fwrite(contents, 1, strlen(contents), f);
# 72|-> ret = fflush(f) ? errno : ferror(f) ? EBADF : 0;
# 73| ret = (fclose(f) && !ret) ? errno : ret;
# 74| }
Error: GCC_ANALYZER_WARNING (CWE-775):
zix-0.8.0/test/test_filesystem.c:312:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(zix_path_join(0, create_temp_dir("zixXXXXXX"), "zix_test_file"), "a+b")’
zix-0.8.0/test/test_filesystem.c:300:1: enter_function: entry to ‘test_flock’
zix-0.8.0/test/test_filesystem.c:302:27: call_function: calling ‘create_temp_dir’ from ‘test_flock’
zix-0.8.0/test/test_filesystem.c:302:27: return_function: returning to ‘test_flock’ from ‘create_temp_dir’
zix-0.8.0/test/test_filesystem.c:304:3: branch_false: following ‘false’ branch...
zix-0.8.0/test/test_filesystem.c:306:20: branch_false: ...to here
zix-0.8.0/test/test_filesystem.c:307:20: acquire_resource: opened here
zix-0.8.0/test/test_filesystem.c:309:3: branch_false: following ‘false’ branch...
zix-0.8.0/test/test_filesystem.c:310:3: branch_false: ...to here
zix-0.8.0/test/test_filesystem.c:310:3: branch_false: following ‘false’ branch...
zix-0.8.0/test/test_filesystem.c:312:18: branch_false: ...to here
zix-0.8.0/test/test_filesystem.c:312:18: throw: if ‘zix_file_lock’ throws an exception...
zix-0.8.0/test/test_filesystem.c:312:18: danger: ‘fopen(zix_path_join(0, create_temp_dir("zixXXXXXX"), "zix_test_file"), "a+b")’ leaks here; was opened at [(16)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/15)
# 310| assert(f2);
# 311|
# 312|-> ZixStatus st = zix_file_lock(f1, ZIX_FILE_LOCK_TRY);
# 313| assert(!st || st == ZIX_STATUS_NOT_SUPPORTED);
# 314|
Error: GCC_ANALYZER_WARNING (CWE-775):
zix-0.8.0/test/test_filesystem.c:312:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(zix_path_join(0, create_temp_dir("zixXXXXXX"), "zix_test_file"), "wb")’
zix-0.8.0/test/test_filesystem.c:300:1: enter_function: entry to ‘test_flock’
zix-0.8.0/test/test_filesystem.c:302:27: call_function: calling ‘create_temp_dir’ from ‘test_flock’
zix-0.8.0/test/test_filesystem.c:302:27: return_function: returning to ‘test_flock’ from ‘create_temp_dir’
zix-0.8.0/test/test_filesystem.c:304:3: branch_false: following ‘false’ branch...
zix-0.8.0/test/test_filesystem.c:306:20: branch_false: ...to here
zix-0.8.0/test/test_filesystem.c:306:20: acquire_resource: opened here
zix-0.8.0/test/test_filesystem.c:309:3: branch_false: following ‘false’ branch...
zix-0.8.0/test/test_filesystem.c:310:3: branch_false: ...to here
zix-0.8.0/test/test_filesystem.c:310:3: branch_false: following ‘false’ branch...
zix-0.8.0/test/test_filesystem.c:312:18: branch_false: ...to here
zix-0.8.0/test/test_filesystem.c:312:18: throw: if ‘zix_file_lock’ throws an exception...
zix-0.8.0/test/test_filesystem.c:312:18: danger: ‘fopen(zix_path_join(0, create_temp_dir("zixXXXXXX"), "zix_test_file"), "wb")’ leaks here; was opened at [(16)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/15)
# 310| assert(f2);
# 311|
# 312|-> ZixStatus st = zix_file_lock(f1, ZIX_FILE_LOCK_TRY);
# 313| assert(!st || st == ZIX_STATUS_NOT_SUPPORTED);
# 314|
Error: GCC_ANALYZER_WARNING (CWE-775):
zix-0.8.0/test/test_filesystem.c:313:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(zix_path_join(0, create_temp_dir("zixXXXXXX"), "zix_test_file"), "a+b")’
zix-0.8.0/test/test_filesystem.c:300:1: enter_function: entry to ‘test_flock’
zix-0.8.0/test/test_filesystem.c:302:27: call_function: calling ‘create_temp_dir’ from ‘test_flock’
zix-0.8.0/test/test_filesystem.c:302:27: return_function: returning to ‘test_flock’ from ‘create_temp_dir’
zix-0.8.0/test/test_filesystem.c:304:3: branch_false: following ‘false’ branch...
zix-0.8.0/test/test_filesystem.c:306:20: branch_false: ...to here
zix-0.8.0/test/test_filesystem.c:307:20: acquire_resource: opened here
zix-0.8.0/test/test_filesystem.c:309:3: branch_false: following ‘false’ branch...
zix-0.8.0/test/test_filesystem.c:310:3: branch_false: ...to here
zix-0.8.0/test/test_filesystem.c:310:3: branch_false: following ‘false’ branch...
zix-0.8.0/test/test_filesystem.c:312:18: branch_false: ...to here
zix-0.8.0/test/test_filesystem.c:313:3: branch_false: following ‘false’ branch...
zix-0.8.0/test/test_filesystem.c:315:6: branch_false: ...to here
zix-0.8.0/test/test_filesystem.c:315:6: branch_true: following ‘true’ branch...
zix-0.8.0/test/test_filesystem.c:316:5: branch_true: ...to here
zix-0.8.0/test/test_filesystem.c:316:5: throw: if ‘zix_file_lock’ throws an exception...
zix-0.8.0/test/test_filesystem.c:313:3: danger: ‘fopen(zix_path_join(0, create_temp_dir("zixXXXXXX"), "zix_test_file"), "a+b")’ leaks here; was opened at [(16)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/15)
# 311|
# 312| ZixStatus st = zix_file_lock(f1, ZIX_FILE_LOCK_TRY);
# 313|-> assert(!st || st == ZIX_STATUS_NOT_SUPPORTED);
# 314|
# 315| if (!st) {