Skip to content

syscall: fs_js.go accesses a fs.O_DIRECTORY constant that's not defined in browsers #70723

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

Closed
dmitshur opened this issue Dec 7, 2024 · 2 comments
Assignees
Labels
arch-wasm WebAssembly issues compiler/runtime Issues related to the Go compiler and/or runtime. FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done. OS-JS
Milestone

Comments

@dmitshur
Copy link
Member

dmitshur commented Dec 7, 2024

At Go tip, js/wasm programs inside a browser run into a panic during init of syscall package:

panic: syscall/js: call of Value.Int on undefined

goroutine 1 [running]:
syscall/js.Value.float({{}, 0x0, 0x0}, {0x1f10b5, 0x9})
	syscall/js/js.go:523 +0x10
syscall/js.Value.Int(...)
	syscall/js/js.go:540
syscall.init()
	syscall/fs_js.go:32 +0x37

I see the problem and sent CL 634455 to fix it.

CC @golang/js.

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. arch-wasm WebAssembly issues OS-JS FixPending Issues that have a fix which has not yet been reviewed or submitted. labels Dec 7, 2024
@dmitshur dmitshur added this to the Go1.24 milestone Dec 7, 2024
@dmitshur dmitshur self-assigned this Dec 7, 2024
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Dec 7, 2024
@gabyhelp
Copy link

gabyhelp commented Dec 7, 2024

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/634455 mentions this issue: lib/wasm: provide fs.constants.O_DIRECTORY definition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly issues compiler/runtime Issues related to the Go compiler and/or runtime. FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done. OS-JS
Projects
None yet
Development

No branches or pull requests

3 participants