[PATCH] D73151: [analyzer] Fix handle leak false positive when the handle dies too early

2020-07-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/fuchsia_handle.cpp:80 + zx_status_t status = zx_channel_create(0, &sa, &sb); + // expected-note@-1 {{Handle allocated through 2nd parameter}} + if (status == 0) { // expected-note {{Assuming 'status' is equal to 0}} --

[PATCH] D73151: [analyzer] Fix handle leak false positive when the handle dies too early

2020-07-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/fuchsia_handle.cpp:80 + zx_status_t status = zx_channel_create(0, &sa, &sb); + // expected-note@-1 {{Handle allocated through 2nd parameter}} + if (status == 0) { // expected-note {{Assuming 'status' is equal to 0}} --

[PATCH] D73151: [analyzer] Fix handle leak false positive when the handle dies too early

2020-07-28 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: clang/test/Analysis/fuchsia_handle.cpp:80 + zx_status_t status = zx_channel_create(0, &sa, &sb); + // expected-note@-1 {{Handle allocated through 2nd parameter}} + if (status == 0) { // expected-note {{Assuming 'status' is equal to 0

[PATCH] D73151: [analyzer] Fix handle leak false positive when the handle dies too early

2020-07-28 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs added subscribers: dcoughlin, jroelofs. jroelofs added inline comments. Herald added subscribers: ASDenysPetrov, martong. Comment at: clang/test/Analysis/fuchsia_handle.cpp:80 + zx_status_t status = zx_channel_create(0, &sa, &sb); + // expected-note@-1 {{Handle allocat

[PATCH] D73151: [analyzer] Fix handle leak false positive when the handle dies too early

2020-01-27 Thread Gábor Horváth via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc98d98ba9b0f: [analyzer] Fix handle leak false positive when the handle dies too early (authored by xazax.hun). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D73151: [analyzer] Fix handle leak false positive when the handle dies too early

2020-01-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Yay, it actually worked! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73151/new/ https://reviews.llvm.org/D73151 ___ cfe-commits mailing list

[PATCH] D73151: [analyzer] Fix handle leak false positive when the handle dies too early

2020-01-27 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I've rerun this on Fuchsia and it got the same results as the previous approach :). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73151/new/ https://reviews.llvm.org/D73151 ___ cfe-commits mailing list cfe-commit

[PATCH] D73151: [analyzer] Fix handle leak false positive when the handle dies too early

2020-01-24 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 240337. xazax.hun added a comment. - Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73151/new/ https://reviews.llvm.org/D73151 Files: clang/lib/StaticAnalyzer/Checkers/FuchsiaHandleChecker.cpp clang/test/Analysis/fuchs

[PATCH] D73151: [analyzer] Fix handle leak false positive when the handle dies too early

2020-01-24 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun marked 4 inline comments as done. xazax.hun added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/FuchsiaHandleChecker.cpp:133-135 + static HandleState getWithoutError(HandleState S) { +return HandleState(S.K, nullptr); + } xazax.hu

[PATCH] D73151: [analyzer] Fix handle leak false positive when the handle dies too early

2020-01-24 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun marked 2 inline comments as done. xazax.hun added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/FuchsiaHandleChecker.cpp:133-135 + static HandleState getWithoutError(HandleState S) { +return HandleState(S.K, nullptr); + } NoQ wrot

[PATCH] D73151: [analyzer] Fix handle leak false positive when the handle dies too early

2020-01-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/FuchsiaHandleChecker.cpp:133-135 + static HandleState getWithoutError(HandleState S) { +return HandleState(S.K, nullptr); + } It already makes me mildly uncomfortable that our data is

[PATCH] D73151: [analyzer] Fix handle leak false positive when the handle dies too early

2020-01-21 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 239469. xazax.hun added a comment. - Minor refactoring. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73151/new/ https://reviews.llvm.org/D73151 Files: clang/lib/StaticAnalyzer/Checkers/FuchsiaHandleChecker.cpp clang/test/Analysis/fuchsia_han

[PATCH] D73151: [analyzer] Fix handle leak false positive when the handle dies too early

2020-01-21 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. xazax.hun added reviewers: NoQ, haowei. xazax.hun added a project: clang. Herald added subscribers: Charusso, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. In case the handle symbol dies too early, even