René's URL Explorer Experiment


Title: Accessors of unions return dangling pointers for reinterpreted unions · Issue #311 · Cpp2Rust/cpp2rust · GitHub

Open Graph Title: Accessors of unions return dangling pointers for reinterpreted unions · Issue #311 · Cpp2Rust/cpp2rust

X Title: Accessors of unions return dangling pointers for reinterpreted unions · Issue #311 · Cpp2Rust/cpp2rust

Description: In refcount, when the union is reinterpreted, saving the pointer returned by a union accessor is resulting in a dangling pointer. For example: /* union U { int i; float f; }; */ pub struct U { __bytes: Value>, } impl U { pub fn...

Open Graph Description: In refcount, when the union is reinterpreted, saving the pointer returned by a union accessor is resulting in a dangling pointer. For example: /* union U { int i; float f; }; */ pub struct U { __by...

X Description: In refcount, when the union is reinterpreted, saving the pointer returned by a union accessor is resulting in a dangling pointer. For example: /* union U { int i; float f; }; */ pub struct U { __by...

Opengraph URL: https://github.com/Cpp2Rust/cpp2rust/issues/311

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Accessors of unions return dangling pointers for reinterpreted unions","articleBody":"In refcount, when the union is reinterpreted, saving the pointer returned by a union accessor is resulting in a dangling pointer. For example:\n\n```rs\n/*\nunion U {\n  int i;\n  float f;\n};\n*/\npub struct U {\n    __bytes: Value\u003cBox\u003c[u8]>>,\n}\n\nimpl U {\n    pub fn i(&self) -> Ptr\u003ci32> {\n        (self.__bytes.as_pointer() as Ptr\u003cu8>).reinterpret_cast()\n    }\n    pub fn f(&self) -> Ptr\u003cf32> {\n        (self.__bytes.as_pointer() as Ptr\u003cu8>).reinterpret_cast()\n    }\n}\n\nfn foo() {\n  let p: Ptr\u003c...> = ...;\n  let reinterpreted_u: Ptr\u003cU> = p.reinterpret_cast();\n  let p_i: Ptr\u003ci32> = reinterpreted_u.upgrade().deref().i();\n  ...\n  // p_i is dangling because reinterpreted_u.deref().upgrade() is creating a temporary union\n}\n```","author":{"url":"https://github.com/lucic71","@type":"Person","name":"lucic71"},"datePublished":"2026-08-17T13:15:38Z","url":"https://github.com/Cpp2Rust/cpp2rust/issues/311"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1510b728-835a-f395-955b-2257ad67c19c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id82AE:DB09F:451228C:57FE7D6:6B024744
html-safe-nonce900d89e91227403586fe13ea58c8853f6fe9cc51afb70819c8b13ec01e4644d1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkFFOkRCMDlGOjQ1MTIyOEM6NTdGRTdENjo2QjAyNDc0NCIsInZpc2l0b3JfaWQiOiI4MTY0NjMwMzY5NzI5NDMxNzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2fd0c4d8490cd2db4e98ece8ed42050a79d3f82c77af559580df4ee0577f9d4c
hovercard-subject-tagissue:5172290355
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Cpp2Rust/cpp2rust/311/issue_layout
twitter:imagehttps://opengraph.githubassets.com/349e53ceceae9b618e121461a5b3cd883fb16c0a35f6d2783990928f8ef3f1bc/Cpp2Rust/cpp2rust/issues/311
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/349e53ceceae9b618e121461a5b3cd883fb16c0a35f6d2783990928f8ef3f1bc/Cpp2Rust/cpp2rust/issues/311
og:image:altIn refcount, when the union is reinterpreted, saving the pointer returned by a union accessor is resulting in a dangling pointer. For example: /* union U { int i; float f; }; */ pub struct U { __by...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamelucic71
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/Cpp2Rust/cpp2rust git https://github.com/Cpp2Rust/cpp2rust.git
octolytics-dimension-user_id197474191
octolytics-dimension-user_loginCpp2Rust
octolytics-dimension-repository_id1183095779
octolytics-dimension-repository_nwoCpp2Rust/cpp2rust
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1183095779
octolytics-dimension-repository_network_root_nwoCpp2Rust/cpp2rust
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/Cpp2Rust/cpp2rust/issues/311#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FCpp2Rust%2Fcpp2rust%2Fissues%2F311
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%2FCpp2Rust%2Fcpp2rust%2Fissues%2F311
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=Cpp2Rust%2Fcpp2rust
Reloadhttps://github.com/Cpp2Rust/cpp2rust/issues/311
Reloadhttps://github.com/Cpp2Rust/cpp2rust/issues/311
Reloadhttps://github.com/Cpp2Rust/cpp2rust/issues/311
Cpp2Rusthttps://github.com/Cpp2Rust
cpp2rusthttps://github.com/Cpp2Rust/cpp2rust
Codehttps://github.com/Cpp2Rust/cpp2rust
Issues21 (21)https://github.com/Cpp2Rust/cpp2rust/issues
Pull requestshttps://github.com/Cpp2Rust/cpp2rust/pulls
Actionshttps://github.com/Cpp2Rust/cpp2rust/actions
Security and qualityhttps://github.com/Cpp2Rust/cpp2rust/security
Insightshttps://github.com/Cpp2Rust/cpp2rust/insights
https://github.com/Cpp2Rust/cpp2rust
New issuehttps://github.com/login?return_to=https://github.com/Cpp2Rust/cpp2rust/issues/311
New issuehttps://github.com/login?return_to=https://github.com/Cpp2Rust/cpp2rust/issues/311
#474https://github.com/Cpp2Rust/cpp2rust/pull/474
Accessors of unions return dangling pointers for reinterpreted unionshttps://github.com/Cpp2Rust/cpp2rust/issues/311#top
#474https://github.com/Cpp2Rust/cpp2rust/pull/474
https://github.com/lucic71
lucic71https://github.com/lucic71
on Aug 17, 2026https://github.com/Cpp2Rust/cpp2rust/issues/311#issue-5172290355
nunoplopeshttps://github.com/nunoplopes
completedhttps://github.com/Cpp2Rust/cpp2rust/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#474https://github.com/Cpp2Rust/cpp2rust/pull/474
on Oct 7, 2026https://github.com/Cpp2Rust/cpp2rust/issues/311#event-32684732390
lucic71https://github.com/lucic71
on Oct 7, 2026https://github.com/Cpp2Rust/cpp2rust/issues/311#event-32694906319
Access unions through `Ptr` (Cpp2Rust#474)https://github.com/lucic71/cpp2rust/commit/b6b847996d26b1d22f0f8e537159ee47e911e4cf
Cpp2Rust#474https://github.com/Cpp2Rust/cpp2rust/pull/474
https://docs.github.com/articles/closing-issues-via-commit-messages
b6b8479https://github.com/lucic71/cpp2rust/commit/b6b847996d26b1d22f0f8e537159ee47e911e4cf
joaotgouveiahttps://github.com/joaotgouveia
on Oct 27, 2026https://github.com/Cpp2Rust/cpp2rust/issues/311#event-34404048394
Access unions through `Ptr` (Cpp2Rust#474)https://github.com/joaotgouveia/cpp2rust/commit/8c3cee8e90107ec713f1c4dc6dcb5e169a147552
Cpp2Rust#474https://github.com/Cpp2Rust/cpp2rust/pull/474
https://docs.github.com/articles/closing-issues-via-commit-messages
8c3cee8https://github.com/joaotgouveia/cpp2rust/commit/8c3cee8e90107ec713f1c4dc6dcb5e169a147552
Sign up for freehttps://github.com/signup?return_to=https://github.com/Cpp2Rust/cpp2rust/issues/311
Sign in to commenthttps://github.com/login?return_to=https://github.com/Cpp2Rust/cpp2rust/issues/311
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.