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

gccgo: segmentation fault (4) #11559

Closed
dvyukov opened this issue Jul 3, 2015 · 3 comments
Closed

gccgo: segmentation fault (4) #11559

dvyukov opened this issue Jul 3, 2015 · 3 comments
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Jul 3, 2015

gccgo crashes on the following input:

package a
var a = func({-chan<-a<-})
go1: internal compiler error: Segmentation fault
0xb4170f crash_signal
    ../../gcc/toplev.c:360
0x64f48a Send_statement::do_flatten(Gogo*, Named_object*, Block*, Statement_inserter*)
    ../../gcc/go/gofrontend/statements.cc:4391
0x610f8c Statement::flatten(Gogo*, Named_object*, Block*, Statement_inserter*)
    ../../gcc/go/gofrontend/statements.h:320
0x610f8c Flatten::statement(Block*, unsigned long*, Statement*)
    ../../gcc/go/gofrontend/gogo.cc:3834
0x64edb4 Statement::traverse(Block*, unsigned long*, Traverse*)
    ../../gcc/go/gofrontend/statements.cc:44
0x613e5d Block::traverse(Traverse*)
    ../../gcc/go/gofrontend/gogo.cc:5741
0x61409e Function::traverse(Traverse*)
    ../../gcc/go/gofrontend/gogo.cc:4863
0x6140f0 Flatten::function(Named_object*)
    ../../gcc/go/gofrontend/gogo.cc:3799
0x616a41 Bindings::traverse(Traverse*, bool)
    ../../gcc/go/gofrontend/gogo.cc:7516
0x616b71 Gogo::traverse(Traverse*)
    ../../gcc/go/gofrontend/gogo.cc:2491
0x616dcf Gogo::flatten()
    ../../gcc/go/gofrontend/gogo.cc:3900
0x6105db go_parse_input_files(char const**, unsigned int, bool, bool)
    ../../gcc/go/gofrontend/go.cc:139
0x60c32f go_langhook_parse_file
    ../../gcc/go/go-lang.c:304

gcc version 6.0.0 2015070 (experimental) (GCC)

@dvyukov
Copy link
Member Author

dvyukov commented Jul 3, 2015

@paranoiacblack

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/12795 mentions this issue.

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/13097 mentions this issue.

timshen91 pushed a commit to timshen91/gcc that referenced this issue Aug 13, 2015
    
    Between the lowering and flattening passes of the compiler, there are
    several passes that modify the lowered Go parse tree and as errors are
    discovered, several nodes transform into error nodes.  However, for a
    higher level node such as a construction expression, the erroneous
    nodes in the subtrees might not propagate their error.  The flatten
    phase for a node now looks for errors in the subtree and flattens the
    node into an error node if any are found.
    
    Fixes golang/go#11559, golang/go#11536, golang/go#11558.
    
    Reviewed-on: https://go-review.googlesource.com/13097


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226845 138bc75d-0d04-0410-961f-82ee72b054a4
@golang golang locked and limited conversation to collaborators Aug 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants