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 (2) #11536

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

gccgo: segmentation fault (2) #11536

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

Comments

@dvyukov
Copy link
Member

dvyukov commented Jul 2, 2015

gccgo crashes on the following input:

package a
const (d rune=(V/V)
V
go1: internal compiler error: Segmentation fault
0xb4170f crash_signal
    ../../gcc/toplev.c:360
0x5eb0d4 Binary_expression::do_get_backend(Translate_context*)
    ../../gcc/go/gofrontend/expressions.cc:5756
0x5f431d Const_expression::do_get_backend(Translate_context*)
    ../../gcc/go/gofrontend/expressions.cc:2864
0x619571 Named_constant::get_backend(Gogo*, Named_object*)
    ../../gcc/go/gofrontend/gogo.cc:6621
0x620726 Named_object::get_backend(Gogo*, std::vector<Bexpression*, std::allocator<Bexpression*> >&, std::vector<Btype*, std::allocator<Btype*> >&, std::vector<Bfunction*, std::allocator<Bfunction*> >&)
    ../../gcc/go/gofrontend/gogo.cc:7091
0x626912 Gogo::write_globals()
    ../../gcc/go/gofrontend/gogo.cc:1345

gcc version 6.0.0 2015070 (experimental) (GCC)

@dvyukov
Copy link
Member Author

dvyukov commented Jul 2, 2015

@paranoiacblack

@ianlancetaylor ianlancetaylor added this to the Gccgo milestone Jul 10, 2015
@gopherbot
Copy link
Contributor

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

paranoiacblack pushed a commit to golang/gofrontend 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.

Change-Id: I9a99d5a2f8ab396ca71787c2bd2af3b1f7ef625a
Reviewed-on: https://go-review.googlesource.com/13097
Reviewed-by: Ian Lance Taylor <iant@golang.org>
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