René's URL Explorer Experiment


Title: `.map_unchecked_mut()` is unsound for self-referential types · Issue #9 · microsoft/stackfuture · GitHub

Open Graph Title: `.map_unchecked_mut()` is unsound for self-referential types · Issue #9 · microsoft/stackfuture

X Title: `.map_unchecked_mut()` is unsound for self-referential types · Issue #9 · microsoft/stackfuture

Description: Hi! I’ve recently created a similar crate, but without dynamic dispatch and with automatic size calculation and Send/Sync inference, and found a problem with using .map_unchecked_mut() in .poll(). This line: https://github.com/microsoft/...

Open Graph Description: Hi! I’ve recently created a similar crate, but without dynamic dispatch and with automatic size calculation and Send/Sync inference, and found a problem with using .map_unchecked_mut() in .poll(). ...

X Description: Hi! I’ve recently created a similar crate, but without dynamic dispatch and with automatic size calculation and Send/Sync inference, and found a problem with using .map_unchecked_mut() in .poll(). ...

Opengraph URL: https://github.com/microsoft/stackfuture/issues/9

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`.map_unchecked_mut()` is unsound for self-referential types","articleBody":"Hi! I’ve recently created [a similar crate](https://github.com/GoldsteinE/name-it), but without dynamic dispatch and with automatic size calculation and Send/Sync inference, and found [a problem](https://github.com/GoldsteinE/name-it/issues/11) with using `.map_unchecked_mut()` in `.poll()`.\r\n\r\nThis line:\r\n\r\nhttps://github.com/microsoft/stackfuture/blob/ae58939/src/lib.rs#L207\r\n\r\ncauses a retag of the whole byte array, invalidating all internal references inside of a future. To prevent this, you should directly transmute `Pin\u003c\u0026mut MaybeUninit[u8; _]\u003e` instead of mapping.\r\n\r\nThis is a simple testcase that fails under Miri (adapted from `futures-rs` test suite):\r\n\r\n```rust\r\nuse futures::{\r\n    channel::mpsc,\r\n    executor::block_on,\r\n    sink::SinkExt as _,\r\n    stream::{Stream, StreamExt as _},\r\n};\r\nuse stackfuture::StackFuture;\r\nuse std::thread;\r\n\r\n#[test]\r\nfn stress_drop_sender() {\r\n    const ITER: usize = if cfg!(miri) { 100 } else { 10000 };\r\n\r\n    fn list() -\u003e impl Stream\u003cItem = i32\u003e {\r\n        let (tx, rx) = mpsc::channel(1);\r\n        thread::spawn(move || {\r\n            block_on(send_one_two_three(tx));\r\n        });\r\n        rx\r\n    }\r\n\r\n    for _ in 0..ITER {\r\n        let v: Vec\u003c_\u003e = block_on(list().collect());\r\n        assert_eq!(v, vec![1, 2, 3]);\r\n    }\r\n}\r\n\r\nfn send_one_two_three(mut tx: mpsc::Sender\u003ci32\u003e) -\u003e StackFuture\u003c'static, (), 512\u003e {\r\n    StackFuture::from(async move {\r\n        for i in 1..=3 {\r\n            tx.send(i).await.unwrap();\r\n        }\r\n    })\r\n}\r\n```","author":{"url":"https://github.com/GoldsteinE","@type":"Person","name":"GoldsteinE"},"datePublished":"2022-08-12T06:51:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/9/stackfuture/issues/9"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:31918b14-9a36-d663-703e-4d3d1285f199
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC1DC:2088C9:5AA736:79DD12:6A629226
html-safe-nonce35758b007a4857de8cfce554add794d23291fe434cab05b2837c11fc644e42dd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMURDOjIwODhDOTo1QUE3MzY6NzlERDEyOjZBNjI5MjI2IiwidmlzaXRvcl9pZCI6IjY3NjEzMTIyMDgzNTI4NzUwNDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0799ac1e8f10b2d55cc37c5fbe834b7a333293621d6a9084c505365cf90ee3b4
hovercard-subject-tagissue:1336823285
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/microsoft/stackfuture/9/issue_layout
twitter:imagehttps://opengraph.githubassets.com/08dc91a413756fc3b1865d2c92edcdfdf936adcd44df843a40b003dcee53c218/microsoft/stackfuture/issues/9
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/08dc91a413756fc3b1865d2c92edcdfdf936adcd44df843a40b003dcee53c218/microsoft/stackfuture/issues/9
og:image:altHi! I’ve recently created a similar crate, but without dynamic dispatch and with automatic size calculation and Send/Sync inference, and found a problem with using .map_unchecked_mut() in .poll(). ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameGoldsteinE
hostnamegithub.com
expected-hostnamegithub.com
Noneac2209d8cb6970a1bd08cb0a3f821d7166ac544c2ca1c87819c335bb84310ecd
turbo-cache-controlno-preview
go-importgithub.com/microsoft/stackfuture git https://github.com/microsoft/stackfuture.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id515774180
octolytics-dimension-repository_nwomicrosoft/stackfuture
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id515774180
octolytics-dimension-repository_network_root_nwomicrosoft/stackfuture
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
release2fca8cd598678aaa64706088ad13b4e19177e108
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/stackfuture/issues/9#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fstackfuture%2Fissues%2F9
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fstackfuture%2Fissues%2F9
Sign up https://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=microsoft%2Fstackfuture
Reloadhttps://github.com/microsoft/stackfuture/issues/9
Reloadhttps://github.com/microsoft/stackfuture/issues/9
Reloadhttps://github.com/microsoft/stackfuture/issues/9
Please reload this pagehttps://github.com/microsoft/stackfuture/issues/9
microsoft https://github.com/microsoft
stackfuturehttps://github.com/microsoft/stackfuture
Notifications https://github.com/login?return_to=%2Fmicrosoft%2Fstackfuture
Fork 15 https://github.com/login?return_to=%2Fmicrosoft%2Fstackfuture
Star 310 https://github.com/login?return_to=%2Fmicrosoft%2Fstackfuture
Code https://github.com/microsoft/stackfuture
Issues 3 https://github.com/microsoft/stackfuture/issues
Pull requests 1 https://github.com/microsoft/stackfuture/pulls
Actions https://github.com/microsoft/stackfuture/actions
Projects https://github.com/microsoft/stackfuture/projects
Models https://github.com/microsoft/stackfuture/models
Security and quality 0 https://github.com/microsoft/stackfuture/security
Insights https://github.com/microsoft/stackfuture/pulse
Code https://github.com/microsoft/stackfuture
Issues https://github.com/microsoft/stackfuture/issues
Pull requests https://github.com/microsoft/stackfuture/pulls
Actions https://github.com/microsoft/stackfuture/actions
Projects https://github.com/microsoft/stackfuture/projects
Models https://github.com/microsoft/stackfuture/models
Security and quality https://github.com/microsoft/stackfuture/security
Insights https://github.com/microsoft/stackfuture/pulse
#11https://github.com/microsoft/stackfuture/pull/11
.map_unchecked_mut() is unsound for self-referential typeshttps://github.com/microsoft/stackfuture/issues/9#top
#11https://github.com/microsoft/stackfuture/pull/11
https://github.com/GoldsteinE
GoldsteinEhttps://github.com/GoldsteinE
on Aug 12, 2022https://github.com/microsoft/stackfuture/issues/9#issue-1336823285
a similar cratehttps://github.com/GoldsteinE/name-it
a problemhttps://github.com/GoldsteinE/name-it/issues/11
https://github.com/microsoft/stackfuture/blob/ae58939/src/lib.rs#L207https://github.com/microsoft/stackfuture/blob/ae58939/src/lib.rs#L207
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.