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: wasm does not load successfully on 32bit X86 machine (out of memory) #34013

Closed
dingchaoyan1983 opened this issue Sep 2, 2019 · 5 comments

Comments

@dingchaoyan1983
Copy link

@dingchaoyan1983 dingchaoyan1983 commented Sep 2, 2019

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

$ go version

go version go1.12.7

Does this issue reproduce with the latest release?

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

Windows 7 and Windows8 32bit system

go env Output
$ go env

What did you do?

loading wasm is out of memory

What did you expect to see?

What did you see instead?

@ALTree

This comment has been minimized.

Copy link
Member

@ALTree ALTree commented Sep 2, 2019

Thanks for reporting this.

I suspect this may be related to #27462. Change 170950 was merged during the 1.13 development phase and it reduces the amount of memory initially allocated by wasm code.

I see you're on 1.12. Can you please try out the 1.13 release candidate (see https://groups.google.com/d/msg/golang-dev/EpB8KISgdEw/TOf9WHkHDgAJ) to see if it does fix your problem?

@ALTree ALTree changed the title Wasm does not load successfully on 32bit X86 machine cmd/compile: wasm does not load successfully on 32bit X86 machine (out of memory) Sep 2, 2019
@dingchaoyan1983

This comment has been minimized.

Copy link
Author

@dingchaoyan1983 dingchaoyan1983 commented Sep 3, 2019

@ALTree Thanks for feedback, I have done it by you suggestion, but I have this error messages
I use the go version is 1.13rc2

> GOOS=js GOARCH=wasm go build -o shared/wasm/main.wasm -i src/github.com/go-wasm/wasm.go

unexpected directory layout:
	import path: _/Users/betalpha/projects/bar-webapp/src/github.com/go-wasm/parser
	root: /Users/betalpha/projects/bar-webapp/src
	dir: /Users/betalpha/projects/bar-webapp/src/github.com/go-wasm/parser
	expand root: /Users/betalpha/projects/bar-webapp
	expand dir: /Users/betalpha/projects/bar-webapp/src/github.com/go-wasm/parser
	separator: /
@agnivade

This comment has been minimized.

Copy link
Contributor

@agnivade agnivade commented Sep 3, 2019

That is an unrelated issue and most probably due to where your code is placed in the filesystem. A google search gives some hits. Please look into those. Or reach out to the forums here.

And in future, please always fill the issue template in its entirety. That helps us debug the issue much faster.

@dingchaoyan1983

This comment has been minimized.

Copy link
Author

@dingchaoyan1983 dingchaoyan1983 commented Sep 3, 2019

@ALTree @agnivade the problem is resolved in version 1.13rc2, thanks very much

@agnivade agnivade closed this Sep 3, 2019
@ALTree

This comment has been minimized.

Copy link
Member

@ALTree ALTree commented Sep 3, 2019

@dingchaoyan1983 Nice! Thank you for checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.