`RULE-25-21`, others: Consider something like a library TracesToExplicit<T>
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 bằng cách kiểm tra phần triển khai và các bài kiểm thử cho RULE-25-21 cũng như cách xử lý các thao tác atomic_*_explicit. Xác định các trường hợp truy vết ngược được hỗ trợ cho phép gán, tham số và lệnh gọi hoặc giá trị trả về của hàm, sau đó xác định cách báo cáo các đường dẫn không hợp lệ. Công việc được xem là hoàn tất khi thư viện tracing được đề xuất xử lý các gốc hợp lệ và từ chối các giá trị không thể truy vết đến memory_order_seq_cst.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Affected rules
RULE-25-21- Likely others, haven't researched
Description
Rule 25-21 requires that the atomic_*_explicit operations use the memory order memory_order_seq_cst.
It would probably be overly restrictive to require an explicit inline written memory_order_seq_cst at the call site. However, it's probably too accepting to merely allow any dynamically computed value. Ideally, we can support basic indirection like variable assignment, parameter values, function calls/returns, and report cases that don't trace back to an acceptable root.
Doing this as a typical flow analysis is backwards. We can easily track flow from memory_order_seq_cst exprs to atomic_*_explicit calls, but the existence of such a flow doesn't preclude that invalid values also flow to the call. Alternatively, there are potential performance issues if we consider all exprs which are not memory_order_seq_cst to be sources in the flow analysis.
Wouldn't be terribly hard to write a library such as TracesToExplicit<T> that is a very simple global flow analysis made for this purpose, starting from sinks and doing only very obvious backwards tracking of values through function calls and variable assignments. If that doesn't track back to an acceptable value, we can report it. Ideally we can report it as a path-problem though this makes such a library more complex to implement.
- 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ự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
use-agent-os/agent-os#3314 ·
-
Implement GitHub Issue templates Đang mởdocumentation low-priority templates
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
jesseray718/openroot#87 ·
-
factory-active factory-automatic task-bug-reproduction-cannot-reproduce task-identify-harness-labels-done task-identify-issue-type-done
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
danielmiessler/LifeOS#2218 ·
-
in-progress proposal
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
uibcdf/molsyssuite#36 ·