Skip to content

Segfault (probably due to stack overflow) from 6g. #1617

@gopherbot

Description

@gopherbot

by consalus:

With weekly.2011-03-15 (and tip) on darwin and linux 6g, when I try to compile the
"gotcl" project, the compiler segfaults, apparently due to stack overflow.
When run in gdb, it looks like the issue occurs in sinit.c. The stack frames show
bouncing back and forth between init2 and init2list, though the eventual segfault
appears to happen in init1. My guess would be a cycle in the Node tree.

This issue doesn't appear to happen with the "release" branch or the
"weekly.2011-03-07.1" branch, so I assume it was introduced sometime between
the 7th and the 15th. I haven't gotten a chance to narrow the change range further.

Steps to duplicate:

   hg clone https://gotcl.googlecode.com/hg/ gotcl 
   cd gotcl
   make

For me on two machines, that results in a segfault.

Interestingly enough, if one changes "chans.go"  by commenting out line 136,
there is no segfault and everything compiles normally and tests pass. This phenomenon
doesn't appear to be dependent on the position of "forchan". When
"forchan" is added to the map by other means (in init), everything compiles
and it works fine.

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