Skip to content

LLVM ERROR: Cannot select: intrinsic %llvm.coro.size #1653

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
ALTree opened this issue Feb 22, 2021 · 5 comments
Closed

LLVM ERROR: Cannot select: intrinsic %llvm.coro.size #1653

ALTree opened this issue Feb 22, 2021 · 5 comments
Labels
bug Something isn't working core

Comments

@ALTree
Copy link

ALTree commented Feb 22, 2021

$ tinygo version
tinygo version 0.16.0 linux/amd64 (using go version go1.15.8 and LLVM version 10.0.1)
package main

func main() {
	var ch chan string
	var m map[byte]string
	_ = m[0]
	_ = <-ch
}
$ tinygo build -o out crash.go 
LLVM ERROR: Cannot select: intrinsic %llvm.coro.size
@deadprogram
Copy link
Member

Is that actually valid Go code?

fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan receive (nil chan)]:
main.main()
	/tmp/sandbox401551102/prog.go:7 +0x65

Program exited: status 2.

@deadprogram deadprogram added the question Question about usage of TinyGo label Feb 24, 2021
@aykevl
Copy link
Member

aykevl commented Feb 24, 2021

It is valid in the sense that it is well defined: a program like this is defined to exit with a panic. This is certainly a compiler bug, either in TinyGo or in LLVM.

@ALTree
Copy link
Author

ALTree commented Feb 24, 2021

@deadprogram Yes, it's valid, in the sense that it conforms to the Go Specification.

As @aykevl pointed out, in general a compiler shouldn't crash when compiling valid -or invalid- Go code. Valid code should generate a binary, which then may or may not panic at runtime, like mine does; invalid Go code should print a compilation error. In this case LLVM is crashing while processing a valid Go program, so this can be classified as a compiler bug.

@aykevl aykevl added bug Something isn't working and removed question Question about usage of TinyGo labels Feb 24, 2021
@niaow
Copy link
Member

niaow commented Dec 14, 2021

This should be addressed now that coroutines are no longer used (and will be removed by #2174 )

@ALTree
Copy link
Author

ALTree commented Aug 20, 2022

Confirmed fixed on 0.25

@ALTree ALTree closed this as completed Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core
Projects
None yet
Development

No branches or pull requests

4 participants