`ReadOfUninitializedMemory`: Improve overall precision and recall
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu với truy vấn ReadOfUninitializedMemory và so sánh triển khai hiện tại với phần công việc trên branch được tham chiếu try-use-subobjects-lib-in-rule-11-6-2. Xem lại các ví dụ unit test cho false positive và false negative đã được báo cáo, sau đó xác định liệu truy vấn được cải thiện có tăng precision và recall đồng thời giải quyết các quyết định còn lại về việc khởi tạo field và array hay không.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Affected rules
- RULE-11-6-2
- RULE-9-1
- A8-5-0
- EXP33-C
- EXP53-CPP
Description
this query makes use of approximations that underrepresent uninitialized variables and over represent definition locations. it is in the idea of only reporting cases where results are more certain, however a potential audit version of the query could be constructed that improves the potential case detection and catch some FPs and FNs that are currently not detected.
work has been done on this effort in this branch.
this improved query has benefits of:
- reuses more existing modelling
- models allocated objects in a way that reuses more out of the box library as well
- increases cases handled that involved subobjects (both potential field analysis and also array analysis)
the current improved query needs more effort on:
- still uses some approximations around field initialization (see below comment for one such improvement/but still heurisitic)
- determination on if array subobject cases should be included or not (see below comment as well for potential adjustment to align omission more with current version of query)
Example
one FP case within the unit test that will be improved is:
int *p1 = new int;
*p1 = 0; // COMPLIANT[FALSE_POSITIVE] -- this is not found bc this is not an
// lvalue access
use(p1); // COMPLIANT[FALSE_POSITIVE] -- the pointee of p1 has been
// initialized
these cases will no longer be found with the improved version of the query
one FN case within the unit test that will be improved is:
S s1;
S s2 = {1};
auto i1 = s1.m1; // NON_COMPLIANT[FALSE_NEGATIVE] - rule currently is not
// field sensitive
this cases will be found with the improved version of the query
the examples given are run with the optional additions listed below in the comment
- Ngôn ngữ chính
- CodeQL
- Star
- 227
- Fork
- 82
- Merge trung bình
- 6 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 9
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/codeql-coding-standards
-
false positive/false negative Stardard-MISRA-C++
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/codeql-coding-standards#1172 ·
-
Difficulty-Low false positive/false negative false-negative Impact-Low Standard-MISRA-C
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Difficulty-Medium false positive/false negative false-positive Impact-Medium Standard-CERT-C
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
github/codeql-coding-standards#1200 ·
-
`RULE-0-0-1`: "unreachable statement" false positives due to over-pruning of the control-flow graph Đang mởfalse positive/false negative
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
github/codeql-coding-standards#1190 ·
-
false positive/false negative
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
github/codeql-coding-standards#1175 ·
Tất cả issue của github/codeql-coding-standards
Issue tương tự
-
ZCode 3.14.3 に対応する Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
supermomonga/zcode-acp#24 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
learningequality/ricecooker#747 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
KhronosGroup/glTF-Blender-IO#2769 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100