Skip to content

gollvm: crash llvm-goc with SIGSEGV #35586

@heylinn

Description

@heylinn

What version of Go are you using (go version)?

$ go version
go version go1.13 gollvm LLVM 10.0.0svn linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

$ uname -o -m
x86_64 GNU/Linux

What did you do?

I tried to build a client for docker.

There are a few steps to reproduce the error:

$ git clone https://github.com/docker/docker-ce.git
$ cd docker-ce
$ git checkout v19.03.4
$ cd components
$ mkdir -p .gopath/src/github.com/docker
$ export GOPATH=`pwd`/.gopath:~/go
$ ln -sf `pwd`/cli .gopath/src/github.com/docker/cli
$ cd .gopath/src/github.com/docker/cli/
$ go build ./vendor/github.com/docker/docker/client

What did you expect to see?

Clean compilation

What did you see instead?

Compiler crash:
Program received signal SIGSEGV, Segmentation fault.
0x0000555555af7d97 in Bfunction::getParameterVars() ()
(gdb) bt
#0  0x0000555555af7d97 in Bfunction::getParameterVars() ()
#1  0x0000555555b0bc67 in DIBuildHelper::endFunction(Bfunction*) ()
#2  0x0000555555aa2348 in Llvm_backend::function_set_body(Bfunction*, Bstatement*) ()
#3  0x0000555555a11c71 in Function::build(Gogo*, Named_object*) ()
#4  0x0000555555a13efc in Named_object::get_backend(Gogo*, std::vector >&, std::vector >&, std::vector >&) ()
#5  0x0000555555a1ef09 in Gogo::write_globals() ()
#6  0x00005555559e9278 in gollvm::driver::CompileGoImpl::invokeFrontEnd() ()
#7  0x00005555559f08e5 in gollvm::driver::CompileGoImpl::performAction(gollvm::driver::Compilation&, gollvm::driver::Action const&, llvm::SmallVector const&, gollvm::driver::Artifact const&) ()
#8  0x00005555559e4863 in gollvm::driver::Driver::processAction(gollvm::driver::Action*, gollvm::driver::Compilation&, bool) ()
#9  0x00005555559e4a47 in gollvm::driver::Driver::processActions(gollvm::driver::Compilation&) ()
#10 0x000055555595cb2f in main ()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions