Skip to content

stack overflow building wasm #1848

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
mayocream opened this issue May 1, 2021 · 19 comments
Closed

stack overflow building wasm #1848

mayocream opened this issue May 1, 2021 · 19 comments
Labels
bug Something isn't working wasm WebAssembly

Comments

@mayocream
Copy link

mayocream commented May 1, 2021

failed building wasm importing package "github.com/yuin/goldmark/parser"

runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc0353003b8 stack=[0xc035300000, 0xc055300000]
fatal error: stack overflow

runtime stack:
runtime.throw(0x4e8ceeb, 0xe)
        /usr/local/go/src/runtime/panic.go:1116 +0x72
runtime.newstack()
        /usr/local/go/src/runtime/stack.go:1042 +0x6ce
runtime.morestack()
        /usr/local/go/src/runtime/asm_amd64.s:449 +0x8f

goroutine 12 [running]:
runtime.heapBitsSetType(0xc014c05138, 0x8, 0x8, 0x4e862e0)
        /usr/local/go/src/runtime/mbitmap.go:947 +0xa4d fp=0xc0353003c8 sp=0xc0353003c0 pc=0xae882d
runtime.mallocgc(0x8, 0x4e862e0, 0x1, 0x0)
        /usr/local/go/src/runtime/malloc.go:1066 +0x53e fp=0xc035300468 sp=0xc0353003c8 pc=0xadea0e
runtime.growslice(0x4e862e0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0xc016c5e300)
        /usr/local/go/src/runtime/slice.go:181 +0x1e2 fp=0xc0353004d0 sp=0xc035300468 pc=0xb1c582
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1061 +0x3e1 fp=0xc0353005b0 sp=0xc0353004d0 pc=0xe35191
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc0353006f8 sp=0xc0353005b0 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc0353007d8 sp=0xc0353006f8 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035300920 sp=0xc0353007d8 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035300a00 sp=0xc035300920 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035300b48 sp=0xc035300a00 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035300c28 sp=0xc035300b48 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035300d70 sp=0xc035300c28 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035300e50 sp=0xc035300d70 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035300f98 sp=0xc035300e50 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035301078 sp=0xc035300f98 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc0353011c0 sp=0xc035301078 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc0353012a0 sp=0xc0353011c0 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc0353013e8 sp=0xc0353012a0 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc0353014c8 sp=0xc0353013e8 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035301610 sp=0xc0353014c8 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc0353016f0 sp=0xc035301610 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035301838 sp=0xc0353016f0 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035301918 sp=0xc035301838 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035301a60 sp=0xc035301918 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035301b40 sp=0xc035301a60 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035301c88 sp=0xc035301b40 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035301d68 sp=0xc035301c88 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035301eb0 sp=0xc035301d68 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035301f90 sp=0xc035301eb0 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc0353020d8 sp=0xc035301f90 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc0353021b8 sp=0xc0353020d8 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035302300 sp=0xc0353021b8 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc0353023e0 sp=0xc035302300 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035302528 sp=0xc0353023e0 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035302608 sp=0xc035302528 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035302750 sp=0xc035302608 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035302830 sp=0xc035302750 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035302978 sp=0xc035302830 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035302a58 sp=0xc035302978 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035302ba0 sp=0xc035302a58 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035302c80 sp=0xc035302ba0 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035302dc8 sp=0xc035302c80 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035302ea8 sp=0xc035302dc8 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035302ff0 sp=0xc035302ea8 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc0353030d0 sp=0xc035302ff0 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035303218 sp=0xc0353030d0 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc0353032f8 sp=0xc035303218 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035303440 sp=0xc0353032f8 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035303520 sp=0xc035303440 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035303668 sp=0xc035303520 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035303748 sp=0xc035303668 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035303890 sp=0xc035303748 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035303970 sp=0xc035303890 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035303ab8 sp=0xc035303970 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035303b98 sp=0xc035303ab8 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035303ce0 sp=0xc035303b98 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035303dc0 sp=0xc035303ce0 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035303f08 sp=0xc035303dc0 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035303fe8 sp=0xc035303f08 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035304130 sp=0xc035303fe8 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035304210 sp=0xc035304130 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035304358 sp=0xc035304210 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035304438 sp=0xc035304358 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035304580 sp=0xc035304438 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035304660 sp=0xc035304580 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc0353047a8 sp=0xc035304660 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035304888 sp=0xc0353047a8 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc0353049d0 sp=0xc035304888 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035304ab0 sp=0xc0353049d0 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035304bf8 sp=0xc035304ab0 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035304cd8 sp=0xc035304bf8 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035304e20 sp=0xc035304cd8 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035304f00 sp=0xc035304e20 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035305048 sp=0xc035304f00 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035305128 sp=0xc035305048 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035305270 sp=0xc035305128 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035305350 sp=0xc035305270 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035305498 sp=0xc035305350 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035305578 sp=0xc035305498 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc0353056c0 sp=0xc035305578 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc0353057a0 sp=0xc0353056c0 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc0353058e8 sp=0xc0353057a0 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc0353059c8 sp=0xc0353058e8 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035305b10 sp=0xc0353059c8 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035305bf0 sp=0xc035305b10 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035305d38 sp=0xc035305bf0 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035305e18 sp=0xc035305d38 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035305f60 sp=0xc035305e18 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035306040 sp=0xc035305f60 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035306188 sp=0xc035306040 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035306268 sp=0xc035306188 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc0353063b0 sp=0xc035306268 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035306490 sp=0xc0353063b0 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc0353065d8 sp=0xc035306490 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc0353066b8 sp=0xc0353065d8 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035306800 sp=0xc0353066b8 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc0353068e0 sp=0xc035306800 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035306a28 sp=0xc0353068e0 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035306b08 sp=0xc035306a28 pc=0xe34f23
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue(0x4e6f00000040, 0x0, 0xc016c9adb0, 0x7f5650011d90)
        /home/circleci/project/interp/memory.go:521 +0x742 fp=0xc035306c50 sp=0xc035306b08 pc=0xe32002
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue(0xc016cad500, 0x70, 0x70, 0xc016c9adb0, 0x70)
        /home/circleci/project/interp/memory.go:1045 +0x173 fp=0xc035306d30 sp=0xc035306c50 pc=0xe34f23
...additional frames elided...
created by github.com/tinygo-org/tinygo/builder.runJobs
        /home/circleci/project/builder/jobs.go:73 +0xc5

goroutine 1 [chan receive]:
github.com/tinygo-org/tinygo/builder.runJobs(0xc000636c80, 0x4, 0x4, 0x0, 0x0)
        /home/circleci/project/builder/jobs.go:105 +0x12f
github.com/tinygo-org/tinygo/builder.Build(0x7ffc98e5940a, 0x10, 0x4e87e89, 0x4, 0xc0000e9e00, 0xc008411b78, 0x0, 0x0)
        /home/circleci/project/builder/build.go:327 +0x18dc
main.Run(0x7ffc98e5940a, 0x10, 0xc00022e000, 0xe, 0x0)
        /home/circleci/project/main.go:519 +0xaf
main.main()
        /home/circleci/project/main.go:986 +0x10e3

goroutine 9 [chan receive]:
github.com/tinygo-org/tinygo/builder.jobWorker(0xc000f5e780, 0xc000f5e720)
        /home/circleci/project/builder/jobs.go:151 +0x91
created by github.com/tinygo-org/tinygo/builder.runJobs
        /home/circleci/project/builder/jobs.go:73 +0xc5

goroutine 10 [chan receive]:
github.com/tinygo-org/tinygo/builder.jobWorker(0xc000f5e780, 0xc000f5e720)
        /home/circleci/project/builder/jobs.go:151 +0x91
created by github.com/tinygo-org/tinygo/builder.runJobs
        /home/circleci/project/builder/jobs.go:73 +0xc5

goroutine 11 [chan receive]:
github.com/tinygo-org/tinygo/builder.jobWorker(0xc000f5e780, 0xc000f5e720)
        /home/circleci/project/builder/jobs.go:151 +0x91
created by github.com/tinygo-org/tinygo/builder.runJobs
        /home/circleci/project/builder/jobs.go:73 +0xc5

test code:

package main

import (
	_ "github.com/yuin/goldmark/parser"
)

func main() {
	println("test")
}
tinygo build -o md.wasm -target wasm -no-debug main.go
@aykevl
Copy link
Member

aykevl commented May 2, 2021

I can confirm this issue. In the dev branch, there is also a different bug that triggers before the infinite recursion in this issue which I have a fix for.

@dkegel-fastly
Copy link
Contributor

This is still happening here on the dev branch (v0.18.0-78-ge02f308), and is blocking compilation of a real app.

@dkegel-fastly
Copy link
Contributor

Another test case, boiled down from the app I was trying to build:

package main

import ac "github.com/cloudflare/ahocorasick"

var foo = ac.NewStringMatcher([]string{
	"x",
})

func main() {
	println("test")
}

@aykevl
Copy link
Member

aykevl commented Jun 25, 2021

If I had to guess it's this line that is causing trouble:

https://github.com/yuin/goldmark/blob/master/util/util.go#L765

var emailDomainRegexp = regexp.MustCompile(`^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*`)

And in the case of github.com/cloudflare/ahocorasick, a quick glance at the code of NewStringMatcher seems to suggest it indeed creates some sort of tree-like structure.

@aykevl
Copy link
Member

aykevl commented Jun 25, 2021

Right now, fixing this is a bit complicated because of the special casing in here:

tinygo/interp/memory.go

Lines 793 to 801 in 1646326

if elementType.TypeKind() == llvm.StructTypeKind {
// There are some special pointer types that should be used as a
// ptrtoint, so that they can be used in certain optimizations.
name := elementType.StructName()
if name == "runtime.typecodeID" || name == "runtime.funcValueWithSignature" {
uintptrType := ctx.IntType(int(mem.r.pointerSize) * 8)
field = llvm.ConstPtrToInt(field, uintptrType)
}
}

But perhaps it's still possible without much more refactoring.

@dkegel-fastly
Copy link
Contributor

dkegel-fastly commented Jun 25, 2021

Thanks for the update!

Fortunately, I was able to pin an earlier version of a dependency in my app and avoid the explosion for now, but it's tech debt we'd like to address sooner or later. (Plus, we control that dependency, and if using sync.Once lazy initialization fixes things, we're probably ok.)

@aykevl
Copy link
Member

aykevl commented Jul 9, 2021

I have a fix for this bug that I will submit shortly. It's relatively big.

@aykevl
Copy link
Member

aykevl commented Jul 15, 2021

Finishing this fix took a little bit longer than expected. It definitely works, I just need to polish it and add tests etc. so it's reviewable.

@aykevl
Copy link
Member

aykevl commented Jul 15, 2021

The PR #2001 fixes the test case in #1848 (comment) but sadly doesn't yet fix the issue in the issue description.

@dkegel-fastly
Copy link
Contributor

Tested PR #2001, verified that it fixes the app I boiled down the ahocorasick test case from.

@nirui
Copy link

nirui commented Oct 3, 2021

Oopie! I don't think this is over just yet :Z

Here is my program:

$ cat main.go 
package main

import (
	"fmt"
	"regexp"
)

var (
	nameFormatRegExp = regexp.MustCompile(
		`^([[:alnum:] ]+) ` +
			`([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(\-[[:alnum:]]+){0,1}) ` +
			`\(C\) ([[:alnum:] ]+) (\<([[:alnum:]\@\.\_\-]+)\> ){0,1}` +
			`([[:digit:]]+)$`)
)

func main() {
	fmt.Println(nameFormatRegExp.String())
}

Go runs as normal:

$ go run main.go 
^([[:alnum:] ]+) ([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(\-[[:alnum:]]+){0,1}) \(C\) ([[:alnum:] ]+) (\<([[:alnum:]\@\.\_\-]+)\> ){0,1}([[:digit:]]+)$

But TinyGo does not:

$ (export $(go env | grep "GOROOT" | tr -d '"'); tinygo version; tinygo run main.go)
tinygo version 0.20.0 linux/amd64 (using go version go1.17.1 and LLVM version 11.0.0)
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc025a00398 stack=[0xc025a00000, 0xc045a00000]
fatal error: stack overflow

runtime stack:
runtime.throw({0x4488e9e, 0x5f0a740})
	/usr/local/go/src/runtime/panic.go:1198 +0x71
runtime.newstack()
	/usr/local/go/src/runtime/stack.go:1088 +0x5ac
runtime.morestack()
	/usr/local/go/src/runtime/asm_amd64.s:461 +0x8b

goroutine 24 [running]:
github.com/tinygo-org/tinygo/interp.(*memoryView).get(0xc002346900, 0x895)
	/home/circleci/project/interp/memory.go:227 +0x327 fp=0xc025a003a8 sp=0xc025a003a0 pc=0xd25de7
github.com/tinygo-org/tinygo/interp.pointerValue.llvmValue(...)
	/home/circleci/project/interp/memory.go:518
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b5f00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:526 +0x5b fp=0xc025a00568 sp=0xc025a003a8 pc=0xd2775b
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a006e8}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a00658 sp=0xc025a00568 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b5e00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a00818 sp=0xc025a00658 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a00998}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a00908 sp=0xc025a00818 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b5d00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a00ac8 sp=0xc025a00908 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0x4f99494b0623b}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a00bb8 sp=0xc025a00ac8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b5c00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a00d78 sp=0xc025a00bb8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a00ef8}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a00e68 sp=0xc025a00d78 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b5b00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a01028 sp=0xc025a00e68 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a011a8}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a01118 sp=0xc025a01028 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b5a00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a012d8 sp=0xc025a01118 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a01458}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a013c8 sp=0xc025a012d8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x7f8ae0001218}, {0xc0041b5900}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a01588 sp=0xc025a013c8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a01708}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a01678 sp=0xc025a01588 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b5800}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a01838 sp=0xc025a01678 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0x4f99494acdae9}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a01928 sp=0xc025a01838 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b5700}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a01ae8 sp=0xc025a01928 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a01c68}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a01bd8 sp=0xc025a01ae8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b5600}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a01d98 sp=0xc025a01bd8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a01f18}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a01e88 sp=0xc025a01d98 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b5500}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a02048 sp=0xc025a01e88 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a021c8}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a02138 sp=0xc025a02048 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b5400}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a022f8 sp=0xc025a02138 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a02478}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a023e8 sp=0xc025a022f8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b5300}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a025a8 sp=0xc025a023e8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a02728}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a02698 sp=0xc025a025a8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b5200}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a02858 sp=0xc025a02698 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a029d8}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a02948 sp=0xc025a02858 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b5100}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a02b08 sp=0xc025a02948 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a02c88}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a02bf8 sp=0xc025a02b08 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b5000}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a02db8 sp=0xc025a02bf8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0x4f99494a81906}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a02ea8 sp=0xc025a02db8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b4f00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a03068 sp=0xc025a02ea8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a031e8}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a03158 sp=0xc025a03068 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b4e00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a03318 sp=0xc025a03158 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a03498}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a03408 sp=0xc025a03318 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b4d00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a035c8 sp=0xc025a03408 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a03748}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a036b8 sp=0xc025a035c8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b4c00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a03878 sp=0xc025a036b8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a039f8}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a03968 sp=0xc025a03878 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b4b00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a03b28 sp=0xc025a03968 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a03ca8}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a03c18 sp=0xc025a03b28 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b4a00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a03dd8 sp=0xc025a03c18 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a03f58}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a03ec8 sp=0xc025a03dd8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b4900}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a04088 sp=0xc025a03ec8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a04208}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a04178 sp=0xc025a04088 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b4800}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a04338 sp=0xc025a04178 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0x4f99494a36f6b}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a04428 sp=0xc025a04338 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b4700}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a045e8 sp=0xc025a04428 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a04768}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a046d8 sp=0xc025a045e8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b4600}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a04898 sp=0xc025a046d8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a04a18}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a04988 sp=0xc025a04898 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b4500}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a04b48 sp=0xc025a04988 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a04cc8}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a04c38 sp=0xc025a04b48 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b4400}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a04df8 sp=0xc025a04c38 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a04f78}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a04ee8 sp=0xc025a04df8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b4300}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a050a8 sp=0xc025a04ee8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a05228}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a05198 sp=0xc025a050a8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b4200}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a05358 sp=0xc025a05198 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a054d8}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a05448 sp=0xc025a05358 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b4100}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a05608 sp=0xc025a05448 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a05788}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a056f8 sp=0xc025a05608 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041b4000}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a058b8 sp=0xc025a056f8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0x4f994949e9ce3}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a059a8 sp=0xc025a058b8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a1f00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a05b68 sp=0xc025a059a8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a05ce8}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a05c58 sp=0xc025a05b68 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a1e00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a05e18 sp=0xc025a05c58 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a05f98}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a05f08 sp=0xc025a05e18 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a1d00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a060c8 sp=0xc025a05f08 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a06248}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a061b8 sp=0xc025a060c8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a1c00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a06378 sp=0xc025a061b8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a064f8}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a06468 sp=0xc025a06378 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a1b00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a06628 sp=0xc025a06468 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a067a8}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a06718 sp=0xc025a06628 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a1a00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a068d8 sp=0xc025a06718 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a06a58}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a069c8 sp=0xc025a068d8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a1900}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a06b88 sp=0xc025a069c8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a06d08}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a06c78 sp=0xc025a06b88 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a1800}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a06e38 sp=0xc025a06c78 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0x4f9949499d6a2}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a06f28 sp=0xc025a06e38 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a1700}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a070e8 sp=0xc025a06f28 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a07268}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a071d8 sp=0xc025a070e8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a1600}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a07398 sp=0xc025a071d8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a07518}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a07488 sp=0xc025a07398 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a1500}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a07648 sp=0xc025a07488 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a077c8}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a07738 sp=0xc025a07648 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a1400}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a078f8 sp=0xc025a07738 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a07a78}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a079e8 sp=0xc025a078f8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a1300}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a07ba8 sp=0xc025a079e8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a07d28}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a07c98 sp=0xc025a07ba8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a1200}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a07e58 sp=0xc025a07c98 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a07fd8}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a07f48 sp=0xc025a07e58 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a1100}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a08108 sp=0xc025a07f48 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a08288}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a081f8 sp=0xc025a08108 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a1000}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a083b8 sp=0xc025a081f8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0x4f99494951179}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a084a8 sp=0xc025a083b8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a0f00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a08668 sp=0xc025a084a8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc0039e4e00, 0x895, 0xc025a087e8}}, 0xc002346900)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025a08758 sp=0xc025a08668 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0041a0e00}, 0xc002346900)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025a08918 sp=0xc025a08758 pc=0xd278c5
created by github.com/tinygo-org/tinygo/builder.runJobs
	/home/circleci/project/builder/jobs.go:101 +0x1a5

goroutine 1 [chan receive]:
github.com/tinygo-org/tinygo/builder.runJobs(0x4430300)
	/home/circleci/project/builder/jobs.go:133 +0x285
github.com/tinygo-org/tinygo/builder.Build({0x7ffcdfbc9d56, 0x7}, {0x4483aba, 0xc00010fae8}, 0xc00016cff0, 0xc0061c1ad8)
	/home/circleci/project/builder/build.go:639 +0x2870
main.Run({0x7ffcdfbc9d56, 0x7}, 0x4488b80)
	/home/circleci/project/main.go:604 +0x75
main.main()
	/home/circleci/project/main.go:1270 +0x1cf5

goroutine 23 [chan receive]:
github.com/tinygo-org/tinygo/builder.jobWorker(0x0, 0x0)
	/home/circleci/project/builder/jobs.go:179 +0x5e
created by github.com/tinygo-org/tinygo/builder.runJobs
	/home/circleci/project/builder/jobs.go:101 +0x1a5

Now if I simplify the program to:

$ cat main.go 
package main

import (
	"fmt"
	"regexp"
)

var (
	nameFormatRegExp = regexp.MustCompile(`^\(C\)$`)
)

func main() {
	fmt.Println(nameFormatRegExp.String())
}

I then got,

$ (export $(go env | grep "GOROOT" | tr -d '"'); tinygo version; tinygo run main.go)
tinygo version 0.20.0 linux/amd64 (using go version go1.17.1 and LLVM version 11.0.0)
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x39b7b17]

runtime stack:
runtime.throw({0x4498341, 0x7f2f6c0029d0})
	/usr/local/go/src/runtime/panic.go:1198 +0x71
runtime.sigpanic()
	/usr/local/go/src/runtime/signal_unix.go:719 +0x396

goroutine 9 [syscall]:
runtime.cgocall(0xd8e270, 0xc003f61938)
	/usr/local/go/src/runtime/cgocall.go:156 +0x5c fp=0xc003f61910 sp=0xc003f618d8 pc=0xa6b2fc
tinygo.org/x/go-llvm._Cfunc_LLVMRunPassManager(0x7f2f6c010ff0, 0x7f2f70002940)
	_cgo_gotypes.go:8888 +0x4c fp=0xc003f61938 sp=0xc003f61910 pc=0xc4d34c
tinygo.org/x/go-llvm.PassManager.Run.func1({0xc6bc79}, {0xc003f61998})
	/go/pkg/mod/tinygo.org/x/[email protected]/ir.go:1998 +0x70 fp=0xc003f61978 sp=0xc003f61938 pc=0xc69f50
tinygo.org/x/go-llvm.PassManager.Run({0x7f2f6c010ff0}, {0x448a29e})
	/go/pkg/mod/tinygo.org/x/[email protected]/ir.go:1998 +0x19 fp=0xc003f61998 sp=0xc003f61978 pc=0xc69e99
github.com/tinygo-org/tinygo/transform.Optimize({0xc003bf7dc8}, 0xc000202ae0, 0x2, 0x0, 0x5)
	/home/circleci/project/transform/optimizer.go:64 +0x28c fp=0xc003f61d90 sp=0xc003f61998 pc=0xd42d6c
github.com/tinygo-org/tinygo/builder.optimizeProgram({0x4435520}, 0xc000202ae0)
	/home/circleci/project/builder/build.go:740 +0x1ed fp=0xc003f61df0 sp=0xc003f61d90 pc=0xd566cd
github.com/tinygo-org/tinygo/builder.Build.func2(0x0)
	/home/circleci/project/builder/build.go:386 +0x657 fp=0xc003f61f58 sp=0xc003f61df0 pc=0xd556b7
github.com/tinygo-org/tinygo/builder.jobWorker(0x0, 0x0)
	/home/circleci/project/builder/jobs.go:182 +0xad fp=0xc003f61fc0 sp=0xc003f61f58 pc=0xd5e3ad
github.com/tinygo-org/tinygo/builder.runJobs·dwrap·14()
	/home/circleci/project/builder/jobs.go:101 +0x2a fp=0xc003f61fe0 sp=0xc003f61fc0 pc=0xd5e06a
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc003f61fe8 sp=0xc003f61fe0 pc=0xacafa1
created by github.com/tinygo-org/tinygo/builder.runJobs
	/home/circleci/project/builder/jobs.go:101 +0x1a5

goroutine 1 [chan receive]:
github.com/tinygo-org/tinygo/builder.runJobs(0x4430300)
	/home/circleci/project/builder/jobs.go:133 +0x285
github.com/tinygo-org/tinygo/builder.Build({0x7ffc71d2ad56, 0x7}, {0x4483aba, 0xc000091ae8}, 0xc000202ae0, 0xc003c21ad8)
	/home/circleci/project/builder/build.go:639 +0x2870
main.Run({0x7ffc71d2ad56, 0x7}, 0x4488b80)
	/home/circleci/project/main.go:604 +0x75
main.main()
	/home/circleci/project/main.go:1270 +0x1cf5

goroutine 8 [chan receive]:
github.com/tinygo-org/tinygo/builder.jobWorker(0xbf716d, 0x0)
	/home/circleci/project/builder/jobs.go:179 +0x5e
created by github.com/tinygo-org/tinygo/builder.runJobs
	/home/circleci/project/builder/jobs.go:101 +0x1a5

I also tried setting GOROOT to point to Go1.16 rather than my current 1.17, the error is almost the same:

$ (export GOROOT=...go1.16/go; tinygo version; tinygo run main.go)
tinygo version 0.20.0 linux/amd64 (using go version go1.16.8 and LLVM version 11.0.0)
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc025980398 stack=[0xc025980000, 0xc045980000]
fatal error: stack overflow

runtime stack:
runtime.throw({0x4488e9e, 0x5f0a740})
	/usr/local/go/src/runtime/panic.go:1198 +0x71
runtime.newstack()
	/usr/local/go/src/runtime/stack.go:1088 +0x5ac
runtime.morestack()
	/usr/local/go/src/runtime/asm_amd64.s:461 +0x8b

goroutine 23 [running]:
github.com/tinygo-org/tinygo/interp.(*memoryView).get(0xc002355860, 0x895)
	/home/circleci/project/interp/memory.go:227 +0x327 fp=0xc0259803a8 sp=0xc0259803a0 pc=0xd25de7
github.com/tinygo-org/tinygo/interp.pointerValue.llvmValue(...)
	/home/circleci/project/interp/memory.go:518
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0019e3800}, 0xc002355860)
	/home/circleci/project/interp/memory.go:526 +0x5b fp=0xc025980568 sp=0xc0259803a8 pc=0xd2775b
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc00020ce00, 0x895, 0x4fb5caee268d0}}, 0xc002355860)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025980658 sp=0xc025980568 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0019e3700}, 0xc002355860)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025980818 sp=0xc025980658 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc00020ce00, 0x895, 0xc025980998}}, 0xc002355860)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025980908 sp=0xc025980818 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0019e3600}, 0xc002355860)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025980ac8 sp=0xc025980908 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc00020ce00, 0x895, 0xc025980c48}}, 0xc002355860)
	/home/circleci/project/interp/memory.go:802 +0x1d9 fp=0xc025980bb8 sp=0xc025980ac8 pc=0xd28959
github.com/tinygo-org/tinygo/interp.pointerValue.toLLVMValue({0x0}, {0xc0019e3500}, 0xc002355860)
	/home/circleci/project/interp/memory.go:535 +0x1c5 fp=0xc025980d78 sp=0xc025980bb8 pc=0xd278c5
github.com/tinygo-org/tinygo/interp.rawValue.rawLLVMValue({{0xc00020ce00, 0x895, 0xc025980ef8}}, 0xc002355860)
....

@fgsch
Copy link
Contributor

fgsch commented Oct 3, 2021

@nirui is that with the fix in #2001? That is not merged yet.

@nirui
Copy link

nirui commented Oct 4, 2021

@fgsch Thanks for the info.

So I tried the code in precise-alloc branch. It stopped the panic related to interp.rawValue.rawLLVMValue it seems, but the program still panics and throwing out:

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x3fd5c67]

runtime stack:
runtime.throw({0x4c12ded, 0x7774449371333600})
	.../go1.17/src/runtime/panic.go:1198 +0x71
runtime.sigpanic()
	.../go1.17/src/runtime/signal_unix.go:719 +0x396

goroutine 8 [syscall]:
runtime.cgocall(0xd04200, 0xc0052f5938)
	.../go1.17/src/runtime/cgocall.go:156 +0x5c fp=0xc0052f5910 sp=0xc0052f58d8 pc=0x9db85c
tinygo.org/x/go-llvm._Cfunc_LLVMRunPassManager(0x7fd4bdebcd50, 0x7fd4bc022440)
	_cgo_gotypes.go:8896 +0x4c fp=0xc0052f5938 sp=0xc0052f5910 pc=0xbbe06c
tinygo.org/x/go-llvm.PassManager.Run.func1({0xbdc999}, {0xc0052f5998})
	.../go_path/pkg/mod/tinygo.org/x/[email protected]/ir.go:1998 +0x70 fp=0xc0052f5978 sp=0xc0052f5938 pc=0xbdac70
tinygo.org/x/go-llvm.PassManager.Run({0x7fd4bdebcd50}, {0x4c04cdb})
	.../go_path/pkg/mod/tinygo.org/x/[email protected]/ir.go:1998 +0x19 fp=0xc0052f5998 sp=0xc0052f5978 pc=0xbdabb9
github.com/tinygo-org/tinygo/transform.Optimize({0xc003dd3dc8}, 0xc00021e2d0, 0x2, 0x0, 0x5)
	.../tinygo/transform/optimizer.go:64 +0x28c fp=0xc0052f5d90 sp=0xc0052f5998 pc=0xcb592c
github.com/tinygo-org/tinygo/builder.optimizeProgram({0x4ba3120}, 0xc00021e2d0)
[..more lines..]

Not sure it's because my setup or something else. I'll test it again after the PR is completed.

Thank you again!

@dkegel-fastly
Copy link
Contributor

I think precise-alloc has regressed.

Try the old version,

    git clone https://github.com/tinygo-org/tinygo && \
    cd tinygo && \
    git fetch origin e1a1f78735b08764dde096dd1483889596164ea3 && \
    git reset --hard FETCH_HEAD && \
    git submodule update --init --recursive

@dkegel-fastly
Copy link
Contributor

Try current dev branch, the regression was fixed... that said, initializing a complex regexp at init time
rather than runtime is likely to cause trouble for now.

@codefromthecrypt
Copy link
Contributor

@nirui can you close this issue? It looks like you were able to succeed (due to 👍 ) and I also just tried code in your comment and was able to run #1848 (comment)

@nirui
Copy link

nirui commented Sep 7, 2022

Hi @codefromthecrypt, I can confirm the code is working. But I'm not really sure how to close this issue (I don't have permission to do so).

Maybe give @mayocream the raiser a ping would help?

@codefromthecrypt
Copy link
Contributor

indeed you are right @nirui! @mayocream do you mind closing this out?

@mayocream
Copy link
Author

indeed you are right @nirui! @mayocream do you mind closing this out?

Thanks for the follow up, i'll close this issue as it was resolved. 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wasm WebAssembly
Projects
None yet
Development

No branches or pull requests

7 participants