René's URL Explorer Experiment


Title: reflect: Select panics if array length greater than 1<<16 · Issue #37350 · golang/go · GitHub

Open Graph Title: reflect: Select panics if array length greater than 1<<16 · Issue #37350 · golang/go

X Title: reflect: Select panics if array length greater than 1<<16 · Issue #37350 · golang/go

Description: What version of Go are you using (go version)? $ go version 1.13.7 Does this issue reproduce with the latest release? Yes, here is a go playground example What operating system and processor architecture are you using (go env)? go env Ou...

Open Graph Description: What version of Go are you using (go version)? $ go version 1.13.7 Does this issue reproduce with the latest release? Yes, here is a go playground example What operating system and processor archit...

X Description: What version of Go are you using (go version)? $ go version 1.13.7 Does this issue reproduce with the latest release? Yes, here is a go playground example What operating system and processor archit...

Opengraph URL: https://github.com/golang/go/issues/37350

X: @github

direct link

Domain: go.dev


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"reflect: Select panics if array length greater than 1\u003c\u003c16","articleBody":"### What version of Go are you using (`go version`)?\r\n\r\n\u003cpre\u003e\r\n$ go version\r\n1.13.7\r\n\u003c/pre\u003e\r\n\r\n### Does this issue reproduce with the latest release?\r\n\r\n[Yes, here is a go playground example](https://play.golang.org/p/88C_ON8hcrZ)\r\n\r\n### What operating system and processor architecture are you using (`go env`)?\r\n\r\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003ego env\u003c/code\u003e Output\u003c/summary\u003e\u003cbr\u003e\u003cpre\u003e\r\n$ go env\r\nGO111MODULE=\"\"\r\nGOARCH=\"amd64\"\r\nGOBIN=\"\"\r\nGOCACHE=\"/Users/milanpatel/Library/Caches/go-build\"\r\nGOENV=\"/Users/milanpatel/Library/Application Support/go/env\"\r\nGOEXE=\"\"\r\nGOFLAGS=\"\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"darwin\"\r\nGONOPROXY=\"\"\r\nGONOSUMDB=\"\"\r\nGOOS=\"darwin\"\r\nGOPATH=\"/Users/milanpatel/go\"\r\nGOPRIVATE=\"\"\r\nGOPROXY=\"https://proxy.golang.org,direct\"\r\nGOROOT=\"/usr/local/Cellar/go/1.13.7/libexec\"\r\nGOSUMDB=\"sum.golang.org\"\r\nGOTMPDIR=\"\"\r\nGOTOOLDIR=\"/usr/local/Cellar/go/1.13.7/libexec/pkg/tool/darwin_amd64\"\r\nGCCGO=\"gccgo\"\r\nAR=\"ar\"\r\nCC=\"clang\"\r\nCXX=\"clang++\"\r\nCGO_ENABLED=\"1\"\r\nGOMOD=\"\"\r\nCGO_CFLAGS=\"-g -O2\"\r\nCGO_CPPFLAGS=\"\"\r\nCGO_CXXFLAGS=\"-g -O2\"\r\nCGO_FFLAGS=\"-g -O2\"\r\nCGO_LDFLAGS=\"-g -O2\"\r\nPKG_CONFIG=\"pkg-config\"\r\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/gx/lcfzy_f56tlb_czrp7z2ptyc0000gn/T/go-build327901560=/tmp/go-build -gno-record-gcc-switches -fno-common\"\r\n\u003c/pre\u003e\u003c/details\u003e\r\n\r\n### What did you do?\r\n\r\nWe ran into an issue today where if the number of reflect cases in an array exceeds 1\u003c\u003c16, the call to `reflect.Select` panics. The function doc for the select implementation suggests that it's the length of the array that is used to recreate the pointer to the array, determined by a passed in variable `ncases`.\r\n\r\n```\r\n// selectgo implements the select statement.\r\n//\r\n// cas0 points to an array of type [ncases]scase, and order0 points to\r\n// an array of type [2*ncases]uint16. Both reside on the goroutine's\r\n// stack (regardless of any escaping in selectgo).\r\n//\r\n// selectgo returns the index of the chosen scase, which matches the\r\n// ordinal position of its respective select{recv,send,default} call.\r\n// Also, if the chosen scase was a receive operation, it reports whether\r\n// a value was received.\r\nfunc selectgo(cas0 *scase, order0 *uint16, ncases int) (int, bool) {\r\n```\r\nIn fact, that doesn't appear to be true:\r\n```\r\n\tcas1 := (*[1 \u003c\u003c 16]scase)(unsafe.Pointer(cas0))\r\n\t...\r\n\tscases := cas1[:ncases:ncases] // \u003c- panics here \r\n```","author":{"url":"https://github.com/thempatel","@type":"Person","name":"thempatel"},"datePublished":"2020-02-21T02:53:36.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/37350/go/issues/37350"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3dbdd678-1a6d-9cb7-c4ef-e86c6b53c7ea
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA7D2:34E071:1295C07:19B9673:6998B076
html-safe-nonce3e59a898d9a9b9f39ec9499b6bb2a5f0fadb3636eb014c1df4c2ab86249a580c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBN0QyOjM0RTA3MToxMjk1QzA3OjE5Qjk2NzM6Njk5OEIwNzYiLCJ2aXNpdG9yX2lkIjoiMzgxMzA0Mzk3OTkxODE3MzM0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac3880ec4a22bd422005d45d78b533da442e62405ff04db70f029190bdb1387ad1
hovercard-subject-tagissue:568703801
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/golang/go/37350/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a7722262b62d22018643c7530391fddd091a0d3287f1147a7a5d8ba136b1254c/golang/go/issues/37350
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a7722262b62d22018643c7530391fddd091a0d3287f1147a7a5d8ba136b1254c/golang/go/issues/37350
og:image:altWhat version of Go are you using (go version)? $ go version 1.13.7 Does this issue reproduce with the latest release? Yes, here is a go playground example What operating system and processor archit...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamethempatel
hostnamegithub.com
expected-hostnamegithub.com
None72431d48abd9a2a5f97f6bae9dcb0d31dc185683b82bb625088ffe6e99af17e6
turbo-cache-controlno-preview
go-importgithub.com/golang/go git https://github.com/golang/go.git
octolytics-dimension-user_id4314092
octolytics-dimension-user_logingolang
octolytics-dimension-repository_id23096959
octolytics-dimension-repository_nwogolang/go
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id23096959
octolytics-dimension-repository_network_root_nwogolang/go
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
releasefe6df8f2202abad7e4864b199d4819cb816b0863
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://go.dev/issue/37350#start-of-content
https://go.dev/
Sign in https://go.dev/login?return_to=https%3A%2F%2Fgithub.com%2Fgolang%2Fgo%2Fissues%2F37350
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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://go.dev/login?return_to=https%3A%2F%2Fgithub.com%2Fgolang%2Fgo%2Fissues%2F37350
Sign up https://go.dev/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=golang%2Fgo
Reloadhttps://go.dev/issue/37350
Reloadhttps://go.dev/issue/37350
Reloadhttps://go.dev/issue/37350
golang https://go.dev/golang
gohttps://go.dev/golang/go
Notifications https://go.dev/login?return_to=%2Fgolang%2Fgo
Fork 18.8k https://go.dev/login?return_to=%2Fgolang%2Fgo
Star 133k https://go.dev/login?return_to=%2Fgolang%2Fgo
Code https://go.dev/golang/go
Issues 5k+ https://go.dev/golang/go/issues
Pull requests 387 https://go.dev/golang/go/pulls
Discussions https://go.dev/golang/go/discussions
Actions https://go.dev/golang/go/actions
Projects 5 https://go.dev/golang/go/projects
Wiki https://go.dev/golang/go/wiki
Security 0 https://go.dev/golang/go/security
Insights https://go.dev/golang/go/pulse
Code https://go.dev/golang/go
Issues https://go.dev/golang/go/issues
Pull requests https://go.dev/golang/go/pulls
Discussions https://go.dev/golang/go/discussions
Actions https://go.dev/golang/go/actions
Projects https://go.dev/golang/go/projects
Wiki https://go.dev/golang/go/wiki
Security https://go.dev/golang/go/security
Insights https://go.dev/golang/go/pulse
New issuehttps://go.dev/login?return_to=https://github.com/golang/go/issues/37350
New issuehttps://go.dev/login?return_to=https://github.com/golang/go/issues/37350
reflect: Select panics if array length greater than 1<<16https://go.dev/issue/37350#top
FrozenDueToAgehttps://github.com/golang/go/issues?q=state%3Aopen%20label%3A%22FrozenDueToAge%22
NeedsFixThe path to resolution is known, but the work has not been done.https://github.com/golang/go/issues?q=state%3Aopen%20label%3A%22NeedsFix%22
help wantedhttps://github.com/golang/go/issues?q=state%3Aopen%20label%3A%22help%20wanted%22
Go1.15https://github.com/golang/go/milestone/114
https://github.com/thempatel
https://github.com/thempatel
thempatelhttps://github.com/thempatel
on Feb 21, 2020https://github.com/golang/go/issues/37350#issue-568703801
Yes, here is a go playground examplehttps://play.golang.org/p/88C_ON8hcrZ
FrozenDueToAgehttps://github.com/golang/go/issues?q=state%3Aopen%20label%3A%22FrozenDueToAge%22
NeedsFixThe path to resolution is known, but the work has not been done.https://github.com/golang/go/issues?q=state%3Aopen%20label%3A%22NeedsFix%22
help wantedhttps://github.com/golang/go/issues?q=state%3Aopen%20label%3A%22help%20wanted%22
Go1.15https://github.com/golang/go/milestone/114
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.