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

Go flavorful runtime test failure #707

Closed
Mossaka opened this issue Oct 18, 2023 · 2 comments · Fixed by #708
Closed

Go flavorful runtime test failure #707

Mossaka opened this issue Oct 18, 2023 · 2 comments · Fixed by #708
Assignees
Labels
gen-tinygo Related to the TinyGo bindings generator

Comments

@Mossaka
Copy link
Member

Mossaka commented Oct 18, 2023

          cc @Mossaka, some example failures are:

https://github.com/bytecodealliance/wit-bindgen/actions/runs/6306187417/job/17120901531
https://github.com/bytecodealliance/wit-bindgen/actions/runs/6305130898/job/17117916779
https://github.com/bytecodealliance/wit-bindgen/actions/runs/6275880667/job/17044416959

where the last one looks like:

---- flavorful::run stdout ----
wasi adapter = "/home/runner/work/wit-bindgen/wit-bindgen/target/debug/build/test-artifacts-15b6250480c633e2/out/wasm32-unknown-unknown/release/wasi_snapshot_preview1.wasm"
rust core module = "/home/runner/work/wit-bindgen/wit-bindgen/target/debug/build/test-artifacts-15b6250480c633e2/out/wasm32-wasi/debug/flavorful.wasm"
rust component "/home/runner/work/wit-bindgen/wit-bindgen/target/runtime-tests/flavorful/rust.wasm"
"/home/runner/work/wit-bindgen/wit-bindgen/wasi-sdk-16.0/bin/clang" "--sysroot" "/home/runner/work/wit-bindgen/wit-bindgen/wasi-sdk-16.0/share/wasi-sysroot" "./tests/runtime/flavorful/wasm.c" "/home/runner/work/wit-bindgen/wit-bindgen/target/runtime-tests/flavorful/c-flavorful/flavorful.c" "/home/runner/work/wit-bindgen/wit-bindgen/target/runtime-tests/flavorful/c-flavorful/flavorful_component_type.o" "-I" "/home/runner/work/wit-bindgen/wit-bindgen/target/runtime-tests/flavorful/c-flavorful" "-Wall" "-Wextra" "-Werror" "-Wno-unused-parameter" "-mexec-model=reactor" "-g" "-o" "/home/runner/work/wit-bindgen/wit-bindgen/target/runtime-tests/flavorful/c-flavorful/c-wasm.wasm"
dir: /home/runner/work/wit-bindgen/wit-bindgen/target/runtime-tests/flavorful/go-flavorful
status: exit status: 2
stdout: ------------------------------------------

stderr: ------------------------------------------
panic: runtime error: index out of range [0] with length 0

goroutine 24 [running]:
github.com/tinygo-org/tinygo/compiler.(*builder).createFunctionStart(0xc001772780, 0x0)
	/__w/tinygo/tinygo/compiler/compiler.go:1219 +0x11f8
github.com/tinygo-org/tinygo/compiler.(*builder).createFunction(0xc001772780)
	/__w/tinygo/tinygo/compiler/compiler.go:1308 +0x2c
github.com/tinygo-org/tinygo/compiler.(*compilerContext).getFunction(0xc000158f00, 0xc0016cac00)
	/__w/tinygo/tinygo/compiler/symbol.go:224 +0xdaf
github.com/tinygo-org/tinygo/compiler.(*builder).createFunctionCall(0xc001772600, 0xc00173aac0)
	/__w/tinygo/tinygo/compiler/compiler.go:1883 +0x906
github.com/tinygo-org/tinygo/compiler.(*builder).createExpr(0xc001772600, {0x563ba30, 0xc00173aa80})
	/__w/tinygo/tinygo/compiler/compiler.go:2047 +0x4e5
github.com/tinygo-org/tinygo/compiler.(*builder).createInstruction(0xc001772600, {0x563b910?, 0xc00173aa80?})
	/__w/tinygo/tinygo/compiler/compiler.go:1460 +0xa37
github.com/tinygo-org/tinygo/compiler.(*builder).createFunction(0xc001772600)
	/__w/tinygo/tinygo/compiler/compiler.go:1349 +0xacc
github.com/tinygo-org/tinygo/compiler.(*compilerContext).createPackage(0xc000158f00, {0xc00162d500?}, 0xc00089b200)
	/__w/tinygo/tinygo/compiler/compiler.go:901 +0x8e5
github.com/tinygo-org/tinygo/compiler.CompilePackage({0xc00031e8e8?, 0x5a?}, 0xc0001d5c20, 0xc00089b200, {0x183cabd6d61d5593?}, 0x55a15af?, 0xcd?)
	/__w/tinygo/tinygo/compiler/compiler.go:312 +0x42a
github.com/tinygo-org/tinygo/builder.Build.func3(0xc001644000)
	/__w/tinygo/tinygo/builder/build.go:365 +0x1f4
github.com/tinygo-org/tinygo/builder.runJob(0xc001644000, 0x0?)
	/__w/tinygo/tinygo/builder/jobs.go:222 +0x4d
created by github.com/tinygo-org/tinygo/builder.runJobs in goroutine 1
	/__w/tinygo/tinygo/builder/jobs.go:123 +0x5bd

thread 'flavorful::run' panicked at 'failed to compile', tests/runtime/main.rs:273:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    flavorful::run

Originally posted by @alexcrichton in #679 (comment)

@Mossaka Mossaka self-assigned this Oct 18, 2023
@Mossaka Mossaka added the gen-tinygo Related to the TinyGo bindings generator label Oct 18, 2023
@Mossaka
Copy link
Member Author

Mossaka commented Oct 18, 2023

Do you remember were these CI failures sporadic or consistent? I've run the CI on a newer version of TinyGo on both my forked repo and #708, they seem to do fine. @alexcrichton

@alexcrichton
Copy link
Member

IIRC it was sporadic, so seems fine to reenable as green and see how it goes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gen-tinygo Related to the TinyGo bindings generator
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants