Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: SIGSEGV on NaCl when accessing implicit-zero elements in a large slice #33893

Closed
johnrichardrinehart opened this issue Aug 28, 2019 · 5 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@johnrichardrinehart
Copy link

johnrichardrinehart commented Aug 28, 2019

The playground seems to trigger SIGSEGV runtime exceptions when accessing undefined elements in a large slice. I could not reproduce this locally (I get compile-time too-much-required-memory errors for large slices and normal runtime behavior for smaller slices).

What version of Go are you using (go version)?

Go 1.12.9

Does this issue reproduce with the latest release?

Not on a local machine, only on the playground.

What operating system and processor architecture are you using (go env)?

Native Client, NaCl.

What did you do?

I ran the following 3 programs.

  1. https://goplay.space/#Rbv05s_S5ax
  2. https://goplay.space/#Maqi_gYFakb
  3. https://goplay.space/#NIfrZa_IIxb

What did you expect to see?

  1. Not a SIGSEGV
  2. I got what I expected.
  3. I got what I expected.

What did you see instead?

  1. A SIGSEGV runtime exception.
  2. What I expected.
  3. What I expected.
@johnrichardrinehart johnrichardrinehart changed the title play.golang.org playground triggers SIGSEGV for large slices accessed sparsely. Aug 28, 2019
@johnrichardrinehart johnrichardrinehart changed the title playground triggers SIGSEGV for large slices accessed sparsely. playground triggers SIGSEGV Aug 28, 2019
@agnivade
Copy link
Contributor

I do get a seg fault when running locally, although not with the full stack trace.

GOOS=nacl GOARCH=amd64p32 go run foo.go 
signal: segmentation fault

@cuonglm
Copy link
Member

cuonglm commented Aug 28, 2019

I do get a seg fault when running locally, although not with the full stack trace.

GOOS=nacl GOARCH=amd64p32 go run foo.go 
signal: segmentation fault

You have to setup this https://github.com/golang/go/tree/master/misc/nacl for running nacl

@agnivade
Copy link
Contributor

Woops, thanks @cuonglm. I never ran a basic program to check whether it works or not.

@bcmills
Copy link
Contributor

bcmills commented Aug 28, 2019

Note that the NaCl port is on its way out anyway: see #30439 and #25224.

@bcmills bcmills changed the title playground triggers SIGSEGV cmd/compile: SIGSEGV on NaCl when accessing implicit-zero elements in a large slice Aug 28, 2019
@bcmills bcmills added this to the Unplanned milestone Aug 28, 2019
@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 28, 2019
@johnrichardrinehart
Copy link
Author

Oh, these are old issues. Sorry, @bcmills: I didn't do my due diligence. I'll go ahead and close this. No point in issuing a fix.

@golang golang locked and limited conversation to collaborators Aug 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants