Title: `RULE-25-21`, others: Consider something like a library TracesToExplicit
Open Graph Title: `RULE-25-21`, others: Consider something like a library TracesToExplicit
X Title: `RULE-25-21`, others: Consider something like a library TracesToExplicit
Description: 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 i...
Open Graph Description: 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 ove...
X Description: 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...
Opengraph URL: https://github.com/github/codeql-coding-standards/issues/848
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`RULE-25-21`, others: Consider something like a library TracesToExplicit\u003cT\u003e","articleBody":"### Affected rules\n - `RULE-25-21`\n - Likely others, haven't researched\n\n### Description\n\nRule `25-21` requires that the `atomic_*_explicit` operations use the memory order `memory_order_seq_cst`.\n\nIt 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.\n\nDoing 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.\n\nWouldn't be terribly hard to write a library such as `TracesToExplicit\u003cT\u003e` 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.","author":{"url":"https://github.com/MichaelRFairhurst","@type":"Person","name":"MichaelRFairhurst"},"datePublished":"2025-01-27T23:37:09.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/848/codeql-coding-standards/issues/848"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c981cdba-5e17-70aa-8664-d7d8db9738bc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E874:144C17:32DA05B:429703B:6964A77C |
| html-safe-nonce | 9f2b194f7dab212b2e47136f6d762eab669399df6d30e5e44527428971863d26 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODc0OjE0NEMxNzozMkRBMDVCOjQyOTcwM0I6Njk2NEE3N0MiLCJ2aXNpdG9yX2lkIjoiNTk0NTQ5NzY1NzM4NTcyMzc3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7ef2858fae0d6c6f6fdc74e4b188a26f68f27d0618eec9cd7afa425e57d69bfa |
| hovercard-subject-tag | issue:2814290690 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/codeql-coding-standards/848/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b96fd2d964279a19aac3cc26b514ccc6b7964b3c5aaa04c6b6d40e1af5294c20/github/codeql-coding-standards/issues/848 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b96fd2d964279a19aac3cc26b514ccc6b7964b3c5aaa04c6b6d40e1af5294c20/github/codeql-coding-standards/issues/848 |
| og:image:alt | 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 ove... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MichaelRFairhurst |
| hostname | github.com |
| expected-hostname | github.com |
| None | 15579c46431b7fd25941c3b09010f74fd1890c7a35226839bbbf40ce70fb3057 |
| turbo-cache-control | no-preview |
| go-import | github.com/github/codeql-coding-standards git https://github.com/github/codeql-coding-standards.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 513154248 |
| octolytics-dimension-repository_nwo | github/codeql-coding-standards |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 513154248 |
| octolytics-dimension-repository_network_root_nwo | github/codeql-coding-standards |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 499abb347cb197601d399c346cfeb4b3fa135d5c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width