René's URL Explorer Experiment


Title: Migrate Rust to shared control-flow graph by hvitved · Pull Request #22864 · github/codeql · GitHub

Open Graph Title: Migrate Rust to shared control-flow graph by hvitved · Pull Request #22864 · github/codeql

X Title: Migrate Rust to shared control-flow graph by hvitved · Pull Request #22864 · github/codeql

Description: Rust still used its bespoke completion-tree and CFG-splitting implementation, which duplicated infrastructure now shared by other language frontends. This migrates Rust to the common codeql.controlflow.ControlFlowGraph framework so it can share the same CFG construction, consistency checks, and maintenance path. Approach Build the Rust CFG through the shared Make0/Make1/Make2 pipeline while preserving Rust-specific semantics for patterns, match, let-else, loops, value-carrying break, and ?. Remove the legacy completion and splitting implementation and adapt the public CFG, basic-block, printing, and diagnostics APIs. Update SSA and data-flow consumers to use the shared CFG's unique injects(...) relation for semantic AST associations. Rework unreachable-code reporting for the shared CFG's reachable-only node model, including correct handling of returning macros and compile-time const/static declarations. The generated CFG and basic-block baselines change substantially because the shared framework exposes canonical before, in, after, and conditional-after nodes.

Open Graph Description: Rust still used its bespoke completion-tree and CFG-splitting implementation, which duplicated infrastructure now shared by other language frontends. This migrates Rust to the common codeql.control...

X Description: Rust still used its bespoke completion-tree and CFG-splitting implementation, which duplicated infrastructure now shared by other language frontends. This migrates Rust to the common codeql.control...

Opengraph URL: https://github.com/github/codeql/pull/22864

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:3035e5dd-b14b-1d4c-460b-335011fa914a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idEB3E:186C54:1427231:1A9CE0F:6AF89135
html-safe-nonce0dca7981201af885922dbf5ef90e2a111f7a088c19f02d58e2e23dce87542a49
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjNFOjE4NkM1NDoxNDI3MjMxOjFBOUNFMEY6NkFGODkxMzUiLCJ2aXNpdG9yX2lkIjoiMTI4ODM1MDc3NTk1NjI0NjgzOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac0c664b49ddc01a8c674820a5d485c02902f207a2322ecb8e0a8a2d3d4bd6f618
hovercard-subject-tagpull_request:4951569151
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/github/codeql/pull/22864/files
twitter:imagehttps://avatars.githubusercontent.com/u/3667920?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/3667920?s=400&v=4
og:image:altRust still used its bespoke completion-tree and CFG-splitting implementation, which duplicated infrastructure now shared by other language frontends. This migrates Rust to the common codeql.control...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/github/codeql git https://github.com/github/codeql.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id143040428
octolytics-dimension-repository_nwogithub/codeql
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id143040428
octolytics-dimension-repository_network_root_nwogithub/codeql
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release072e34035c13c31543fba9f025cbbbda4210dae4
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql/pull/22864/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F22864%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F22864%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=github%2Fcodeql
Reloadhttps://github.com/github/codeql/pull/22864/files
Reloadhttps://github.com/github/codeql/pull/22864/files
Reloadhttps://github.com/github/codeql/pull/22864/files
githubhttps://github.com/github
codeqlhttps://github.com/github/codeql
Codehttps://github.com/github/codeql
Issues1k (1k)https://github.com/github/codeql/issues
Pull requests516 (516)https://github.com/github/codeql/pulls
Discussionshttps://github.com/github/codeql/discussions
Actionshttps://github.com/github/codeql/actions
Projectshttps://github.com/github/codeql/projects
Security and qualityhttps://github.com/github/codeql/security
Insightshttps://github.com/github/codeql/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fgithub%2Fcodeql%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgithub%2Fcodeql%2Fissues%2Fnew%2Fchoose
hvitvedhttps://github.com/hvitved
github:mainhttps://github.com/github/codeql/tree/main
hvitved:hvitved-rust-shared-cfghttps://github.com/hvitved/codeql/tree/hvitved-rust-shared-cfg
Conversation 4 https://github.com/github/codeql/pull/22864
Commits 4 https://github.com/github/codeql/pull/22864/commits
Checks 13 https://github.com/github/codeql/pull/22864/checks
Findings https://github.com/github/codeql/pull/22864/findings
Files changed https://github.com/github/codeql/pull/22864/files
Please reload this pagehttps://github.com/github/codeql/pull/22864/files
Migrate Rust to shared control-flow graph https://github.com/github/codeql/pull/22864/files#top
Show all changes 4 commits https://github.com/github/codeql/pull/22864/files
52dd410 Migrate Rust to shared control-flow graph hvitved Nov 2, 2026 https://github.com/github/codeql/pull/22864/commits/52dd4100e35b25fc53d9addc64e089dc843733ec
cafa4bf wip hvitved Nov 6, 2026 https://github.com/github/codeql/pull/22864/commits/cafa4bf59c87587f8e021fef00ccbdc21e350a42
ed9bb74 Update Rust CFG baselines hvitved Nov 6, 2026 https://github.com/github/codeql/pull/22864/commits/ed9bb745105763f88ce2ac87c58857ea88bc8797
7bc53c7 Fix async block CFG value propagation hvitved Nov 9, 2026 https://github.com/github/codeql/pull/22864/commits/7bc53c7e5a2312781bbb06ea8d81bd4fb627c882
Clear filters https://github.com/github/codeql/pull/22864/files
Please reload this pagehttps://github.com/github/codeql/pull/22864/files
Please reload this pagehttps://github.com/github/codeql/pull/22864/files
BasicBlocks.qll https://github.com/github/codeql/pull/22864/files#diff-4b1f54c1471f11bc09f50a3d81ae4a93c1f1358bfdd641e6e347917c647a111f
CfgNodes.qll https://github.com/github/codeql/pull/22864/files#diff-0c77468b260fc974d535a92eb98c088218efdd4c5ce33835eee15f1c8157fcd0
ControlFlowGraph.qll https://github.com/github/codeql/pull/22864/files#diff-1e3fd0447283bfa8eb9816ab0b5debf800aeeb36b58812e213c049245f1c33f8
CfgConsistency.qll https://github.com/github/codeql/pull/22864/files#diff-e5ae7d0b42abd65d668b0c05f54a2d89f7bb38b2fa5245b2d62a16fede1734e1
CfgNodes.qll https://github.com/github/codeql/pull/22864/files#diff-598ce8a0eb361fad3c9246da464064d2d2025a4d30ccae1141e83674c22685aa
Completion.qll https://github.com/github/codeql/pull/22864/files#diff-ce5956a6b7f045c3b06d673c4405b12e4c79a403c25329baa52da5d5b861071e
ControlFlowGraphImpl.qll https://github.com/github/codeql/pull/22864/files#diff-e124c684bf632aacfe9c8727b456377093e9697bf8a4a9c875b7d8e028cc712b
Scope.qll https://github.com/github/codeql/pull/22864/files#diff-fdd7f0c5e4f8a8297bc55c6cf3e10664f328e23b445bb9ea1c29ba7fa56cbce3
Splitting.qll https://github.com/github/codeql/pull/22864/files#diff-279760867a1ad9e4610cf791e4b439a83889beb7b86042db5d1a5d99b0b793e3
Ssa.qll https://github.com/github/codeql/pull/22864/files#diff-277f9d024c2365f22a352ca2129d1c98a3a6708b63c69c4c16baacb2604a4c1d
DataFlowConsistency.qll https://github.com/github/codeql/pull/22864/files#diff-cb074d37a88c0da303a8bcd72b814c0c3c862a948ab7d11ec3cfdeb79dab2d03
DataFlowImpl.qll https://github.com/github/codeql/pull/22864/files#diff-895728d1efcea2f6c062c690b085321596447c884837815727bb1497d705757c
Node.qll https://github.com/github/codeql/pull/22864/files#diff-13fa12de69c5271274d45433f53c144b010c199cee20f1be6b45846ae11185fb
SsaImpl.qll https://github.com/github/codeql/pull/22864/files#diff-54950f040ef7da436017e1af930e2b01971a1199f2f144589133e3a1aa95ca30
AstNodeImpl.qll https://github.com/github/codeql/pull/22864/files#diff-c112f5bf1ddfa24770e39ad11523b0a2b93ecd301caf001d113d41008b1d088b
CachedStages.qll https://github.com/github/codeql/pull/22864/files#diff-113c30eec7c49aeed45147f5f357e304044411cd4a859c17fc161e26c0273700
InsecureCookieExtensions.qll https://github.com/github/codeql/pull/22864/files#diff-df926c8f1444113369f15438cab1e2c739d5e5e9b29a4911b1291f21c2ac255a
PrintCfg.ql https://github.com/github/codeql/pull/22864/files#diff-beccbe116fd0b905c420ba90459b9993e93491d234baa1add7747af21a4bcfed
UnreachableCode.ql https://github.com/github/codeql/pull/22864/files#diff-e0e4ecc6fa756e3a991eba6ead400284f0c0c9cc01f5def4a6e03284a4ef0068
Cfg.expected https://github.com/github/codeql/pull/22864/files#diff-db1b3bfbc97bb5c7d35d8c187826c141e24507fb2b08abb531febc42eee15e5d
BasicBlocks.expected https://github.com/github/codeql/pull/22864/files#diff-6bdb961f7b899aa442a2859e65fb0a641ef8e1ca064f4713fd526393701c61ea
Cfg.expected https://github.com/github/codeql/pull/22864/files#diff-7c2877201f76e8c40696b62f56dd2dbe6e6f97241531952c499f341a069fa321
Cfg.expected https://github.com/github/codeql/pull/22864/files#diff-cca50dfee06d61a8623760b7fe2c7be5ea27af762e5383a41a125f053108bcf2
Ssa.expected https://github.com/github/codeql/pull/22864/files#diff-e1af6fe37a57b5a355e9d419899411eab4523d1090d0023c86347a844e6bd1d0
CfgConsistencyCounts.expected https://github.com/github/codeql/pull/22864/files#diff-699d8652f5df701448a07696d735bdc3c5d8271d64741ac2fd2942157b0936ba
UnreachableCode.expected https://github.com/github/codeql/pull/22864/files#diff-8709e62667a538354451170014119a46ba8e48b1a207e0a00f10851ee0a503f7
unreachable.rs https://github.com/github/codeql/pull/22864/files#diff-2a431bbe5abdcfbdcac8b0d00bb168ea559e9b4e9be65c9305d35dee05515539
Cfg.ql https://github.com/github/codeql/pull/22864/files#diff-db76889f99b4fdb2bfcc912196ee759ea76d19df973f2877d8bc3a9c8c5ed7c2
https://github.com/github/codeql/blob/main/CODEOWNERS#L23
rust/ql/lib/codeql/rust/controlflow/BasicBlocks.qllhttps://github.com/github/codeql/pull/22864/files#diff-4b1f54c1471f11bc09f50a3d81ae4a93c1f1358bfdd641e6e347917c647a111f
View file https://github.com/github/codeql/blob/7bc53c7e5a2312781bbb06ea8d81bd4fb627c882/rust/ql/lib/codeql/rust/controlflow/BasicBlocks.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22864/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L23
rust/ql/lib/codeql/rust/controlflow/CfgNodes.qllhttps://github.com/github/codeql/pull/22864/files#diff-0c77468b260fc974d535a92eb98c088218efdd4c5ce33835eee15f1c8157fcd0
View file https://github.com/github/codeql/blob/7bc53c7e5a2312781bbb06ea8d81bd4fb627c882/rust/ql/lib/codeql/rust/controlflow/CfgNodes.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22864/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22864/files#diff-0c77468b260fc974d535a92eb98c088218efdd4c5ce33835eee15f1c8157fcd0
https://github.com/github/codeql/pull/22864/files#diff-0c77468b260fc974d535a92eb98c088218efdd4c5ce33835eee15f1c8157fcd0
https://github.com/github/codeql/blob/main/CODEOWNERS#L23
rust/ql/lib/codeql/rust/controlflow/ControlFlowGraph.qllhttps://github.com/github/codeql/pull/22864/files#diff-1e3fd0447283bfa8eb9816ab0b5debf800aeeb36b58812e213c049245f1c33f8
View file https://github.com/github/codeql/blob/7bc53c7e5a2312781bbb06ea8d81bd4fb627c882/rust/ql/lib/codeql/rust/controlflow/ControlFlowGraph.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22864/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L23
rust/ql/lib/codeql/rust/controlflow/internal/CfgConsistency.qllhttps://github.com/github/codeql/pull/22864/files#diff-e5ae7d0b42abd65d668b0c05f54a2d89f7bb38b2fa5245b2d62a16fede1734e1
View file https://github.com/github/codeql/blob/7bc53c7e5a2312781bbb06ea8d81bd4fb627c882/rust/ql/lib/codeql/rust/controlflow/internal/CfgConsistency.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22864/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22864/files#diff-e5ae7d0b42abd65d668b0c05f54a2d89f7bb38b2fa5245b2d62a16fede1734e1
Please reload this pagehttps://github.com/github/codeql/pull/22864/files
Please reload this pagehttps://github.com/github/codeql/pull/22864/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.