Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Circular imports lead to stack overflow crash #414

Open
@flimzy

Description

@flimzy

main.go:

package main

import "github.com/flimzy/jstest/foo"

foo/foo.go:

package foo

import "github.com/flimzy/jstest/bar"

bar/bar.go:

package bar

import "github.com/flimzy/jstest/foo"

gopherjs build crashes (after about 25 seconds):

$ gopherjs build
runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow

runtime stack:
runtime.throw(0xaf0010, 0xe)
        /usr/local/go/src/runtime/panic.go:530 +0x90
runtime.newstack()
        /usr/local/go/src/runtime/stack.go:940 +0xb11
runtime.morestack()
        /usr/local/go/src/runtime/asm_amd64.s:359 +0x7f
<snip>

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixbuggopherjs-toolRelated to the gopherjs tool or its build system (but not the compiler itself).

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions