public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug go/65349] New: [5 Regression] go tool crashes, can't compile go code on 32bit linux systems
@ 2015-03-08 15:41 doko at gcc dot gnu.org
  2015-03-09 12:13 ` [Bug go/65349] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: doko at gcc dot gnu.org @ 2015-03-08 15:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65349

            Bug ID: 65349
           Summary: [5 Regression] go tool crashes, can't compile go code
                    on 32bit linux systems
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
          Assignee: ian at airs dot com
          Reporter: doko at gcc dot gnu.org
                CC: cmang at google dot com

The go command didn't ship with earlier GCC versions, so you may argue that it
is not a regression, however a go command backported from 1.2.2 was able to
build code with 4.9 on at least arm-linux-gnueabihf, powerpc-linux-gnu and
i686-linux-gnu.  Double-checked that the backported go command built with 5.0
shows the same failure.  This seems to work on architectures like
aarch64-linux-gnu, powerpc64le-linux-gnu and x86_64-linux-gnu.

On these architectures I see for "go -v 

on powerpc-linux-gnu (not on armhf and i386) building go-md2man
https://launchpad.net/ubuntu/+source/go-md2man/1-2ubuntu2

fatal error: freeing too small block

goroutine 16 [running]:
runtime_dopanic
        ../../../src/libgo/runtime/panic.c:131
runtime_throw
        ../../../src/libgo/runtime/panic.c:193
__go_free
        ../../../src/libgo/runtime/malloc.goc:354
__go_map_rehash
        ../../../src/libgo/runtime/go-map-index.c:66
__go_map_index
        ../../../src/libgo/runtime/go-map-index.c:120
main.$nested26
        ../../src/gotools/../libgo/go/cmd/go/main.go:565
filepath.walk
        ../../../src/libgo/go/path/filepath/path.go:347
filepath.walk
        ../../../src/libgo/go/path/filepath/path.go:372
path_filepath.Walk
        ../../../src/libgo/go/path/filepath/path.go:394
main.matchPackages
        ../../src/gotools/../libgo/go/cmd/go/main.go:544
main.allPackages
        ../../src/gotools/../libgo/go/cmd/go/main.go:481
main.importPaths
        ../../src/gotools/../libgo/go/cmd/go/main.go:329
main.packagesAndErrors
        ../../src/gotools/../libgo/go/cmd/go/pkg.go:902
main.packages
        ../../src/gotools/../libgo/go/cmd/go/pkg.go:883
main.runList
        ../../src/gotools/../libgo/go/cmd/go/list.go:175
main.main
        ../../src/gotools/../libgo/go/cmd/go/main.go:163
runtime_main
        ../../../src/libgo/runtime/proc.c:550
panic during panic

goroutine 16 [running]:
runtime_dopanic
        ../../../src/libgo/runtime/panic.c:131
runtime_startpanic
        ../../../src/libgo/runtime/panic.c:100
runtime_throw
        ../../../src/libgo/runtime/panic.c:191
runtime_mallocgc
        ../../../src/libgo/runtime/malloc.goc:116
__go_alloc
        ../../../src/libgo/runtime/malloc.goc:321
callback
        ../../../src/libgo/runtime/go-caller.c:50
dwarf_lookup_pc
        ../../../src/libbacktrace/dwarf.c:2838
dwarf_fileline
        ../../../src/libbacktrace/dwarf.c:2877
backtrace_pcinfo
        ../../../src/libbacktrace/fileline.c:176
__go_file_line
        ../../../src/libgo/runtime/go-caller.c:137
runtime_printcreatedby
        ../../../src/libgo/runtime/proc.c:613
runtime_dopanic
        ../../../src/libgo/runtime/panic.c:132
runtime_throw
        ../../../src/libgo/runtime/panic.c:193
__go_free
        ../../../src/libgo/runtime/malloc.goc:354
__go_map_rehash
        ../../../src/libgo/runtime/go-map-index.c:66
__go_map_index
        ../../../src/libgo/runtime/go-map-index.c:120
main.$nested26
        ../../src/gotools/../libgo/go/cmd/go/main.go:565
filepath.walk
        ../../../src/libgo/go/path/filepath/path.go:347
filepath.walk
        ../../../src/libgo/go/path/filepath/path.go:372
path_filepath.Walk
        ../../../src/libgo/go/path/filepath/path.go:394
main.matchPackages
        ../../src/gotools/../libgo/go/cmd/go/main.go:544
main.allPackages
        ../../src/gotools/../libgo/go/cmd/go/main.go:481
main.importPaths
        ../../src/gotools/../libgo/go/cmd/go/main.go:329
main.packagesAndErrors
        ../../src/gotools/../libgo/go/cmd/go/pkg.go:902
main.packages
        ../../src/gotools/../libgo/go/cmd/go/pkg.go:883
main.runList
        ../../src/gotools/../libgo/go/cmd/go/list.go:175
main.main
        ../../src/gotools/../libgo/go/cmd/go/main.go:163
runtime_main
        ../../../src/libgo/runtime/proc.c:550
stack trace unavailable


on powerpc building nuntium:

fatal error: freeing too small block

goroutine 16 [running]:
runtime_dopanic
        ../../../src/libgo/runtime/panic.c:131
runtime_throw
        ../../../src/libgo/runtime/panic.c:193
__go_free
        ../../../src/libgo/runtime/malloc.goc:354
__go_map_rehash
        ../../../src/libgo/runtime/go-map-index.c:66
__go_map_index
        ../../../src/libgo/runtime/go-map-index.c:120
main.$nested26
        ../../src/gotools/../libgo/go/cmd/go/main.go:565
filepath.walk
        ../../../src/libgo/go/path/filepath/path.go:347
filepath.walk
        ../../../src/libgo/go/path/filepath/path.go:372
path_filepath.Walk
        ../../../src/libgo/go/path/filepath/path.go:394
main.matchPackages
        ../../src/gotools/../libgo/go/cmd/go/main.go:544
main.allPackages
        ../../src/gotools/../libgo/go/cmd/go/main.go:481
main.importPaths
        ../../src/gotools/../libgo/go/cmd/go/main.go:329
main.packagesAndErrors
        ../../src/gotools/../libgo/go/cmd/go/pkg.go:902
main.packages
        ../../src/gotools/../libgo/go/cmd/go/pkg.go:883
main.runList
        ../../src/gotools/../libgo/go/cmd/go/list.go:175
main.main
        ../../src/gotools/../libgo/go/cmd/go/main.go:163
runtime_main
        ../../../src/libgo/runtime/proc.c:550
panic during panic

goroutine 16 [running]:
runtime_dopanic
        ../../../src/libgo/runtime/panic.c:131
runtime_startpanic
        ../../../src/libgo/runtime/panic.c:100
runtime_throw
        ../../../src/libgo/runtime/panic.c:191
runtime_mallocgc
        ../../../src/libgo/runtime/malloc.goc:116
__go_alloc
        ../../../src/libgo/runtime/malloc.goc:321
callback
        ../../../src/libgo/runtime/go-caller.c:50
dwarf_lookup_pc
        ../../../src/libbacktrace/dwarf.c:2838
dwarf_fileline
        ../../../src/libbacktrace/dwarf.c:2877
backtrace_pcinfo
        ../../../src/libbacktrace/fileline.c:176
__go_file_line
        ../../../src/libgo/runtime/go-caller.c:137
runtime_printcreatedby
        ../../../src/libgo/runtime/proc.c:613
runtime_dopanic
        ../../../src/libgo/runtime/panic.c:132
runtime_throw
        ../../../src/libgo/runtime/panic.c:193
__go_free
        ../../../src/libgo/runtime/malloc.goc:354
__go_map_rehash
        ../../../src/libgo/runtime/go-map-index.c:66
__go_map_index
        ../../../src/libgo/runtime/go-map-index.c:120
main.$nested26
        ../../src/gotools/../libgo/go/cmd/go/main.go:565
filepath.walk
        ../../../src/libgo/go/path/filepath/path.go:347
filepath.walk
        ../../../src/libgo/go/path/filepath/path.go:372
path_filepath.Walk
        ../../../src/libgo/go/path/filepath/path.go:394
main.matchPackages
        ../../src/gotools/../libgo/go/cmd/go/main.go:544
main.allPackages
        ../../src/gotools/../libgo/go/cmd/go/main.go:481
main.importPaths
        ../../src/gotools/../libgo/go/cmd/go/main.go:329
main.packagesAndErrors
        ../../src/gotools/../libgo/go/cmd/go/pkg.go:902
main.packages
        ../../src/gotools/../libgo/go/cmd/go/pkg.go:883
main.runList
        ../../src/gotools/../libgo/go/cmd/go/list.go:175
main.main
        ../../src/gotools/../libgo/go/cmd/go/main.go:163
runtime_main
        ../../../src/libgo/runtime/proc.c:550
stack trace unavailable


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug go/65349] [5 Regression] go tool crashes, can't compile go code on 32bit linux systems
  2015-03-08 15:41 [Bug go/65349] New: [5 Regression] go tool crashes, can't compile go code on 32bit linux systems doko at gcc dot gnu.org
@ 2015-03-09 12:13 ` rguenth at gcc dot gnu.org
  2015-03-09 14:35 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-03-09 12:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65349

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |5.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug go/65349] [5 Regression] go tool crashes, can't compile go code on 32bit linux systems
  2015-03-08 15:41 [Bug go/65349] New: [5 Regression] go tool crashes, can't compile go code on 32bit linux systems doko at gcc dot gnu.org
  2015-03-09 12:13 ` [Bug go/65349] " rguenth at gcc dot gnu.org
@ 2015-03-09 14:35 ` jakub at gcc dot gnu.org
  2015-03-09 23:41 ` ian at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-09 14:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65349

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
                 CC|                            |jakub at gcc dot gnu.org


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug go/65349] [5 Regression] go tool crashes, can't compile go code on 32bit linux systems
  2015-03-08 15:41 [Bug go/65349] New: [5 Regression] go tool crashes, can't compile go code on 32bit linux systems doko at gcc dot gnu.org
  2015-03-09 12:13 ` [Bug go/65349] " rguenth at gcc dot gnu.org
  2015-03-09 14:35 ` jakub at gcc dot gnu.org
@ 2015-03-09 23:41 ` ian at gcc dot gnu.org
  2015-03-09 23:43 ` ian at gcc dot gnu.org
  2015-03-09 23:44 ` ian at airs dot com
  4 siblings, 0 replies; 6+ messages in thread
From: ian at gcc dot gnu.org @ 2015-03-09 23:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65349

--- Comment #1 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> ---
Author: ian
Date: Mon Mar  9 23:40:58 2015
New Revision: 221291

URL: https://gcc.gnu.org/viewcvs?rev=221291&root=gcc&view=rev
Log:
    PR go/65349
runtime: Don't call malloc from __go_file_line callback.

When crashing, we call runtime_printcreatedby which calls
__go_file_line which used to call the Go malloc.  If we are
crashing due to a signal due to heap corruption of some sort,
the GO malloc lock might already be held, leading to a crash
within a crash.  Avoid that by assuming that the libbacktrace
strings will stick around, as we already do in go-callers.c.

Modified:
    trunk/libgo/runtime/go-caller.c


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug go/65349] [5 Regression] go tool crashes, can't compile go code on 32bit linux systems
  2015-03-08 15:41 [Bug go/65349] New: [5 Regression] go tool crashes, can't compile go code on 32bit linux systems doko at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-03-09 23:41 ` ian at gcc dot gnu.org
@ 2015-03-09 23:43 ` ian at gcc dot gnu.org
  2015-03-09 23:44 ` ian at airs dot com
  4 siblings, 0 replies; 6+ messages in thread
From: ian at gcc dot gnu.org @ 2015-03-09 23:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65349

--- Comment #2 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> ---
Author: ian
Date: Mon Mar  9 23:43:16 2015
New Revision: 221292

URL: https://gcc.gnu.org/viewcvs?rev=221292&root=gcc&view=rev
Log:
    PR go/65349
runtime: Don't crash if explicitly freeing small map.

Modified:
    trunk/libgo/runtime/go-map-index.c


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug go/65349] [5 Regression] go tool crashes, can't compile go code on 32bit linux systems
  2015-03-08 15:41 [Bug go/65349] New: [5 Regression] go tool crashes, can't compile go code on 32bit linux systems doko at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-03-09 23:43 ` ian at gcc dot gnu.org
@ 2015-03-09 23:44 ` ian at airs dot com
  4 siblings, 0 replies; 6+ messages in thread
From: ian at airs dot com @ 2015-03-09 23:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65349

Ian Lance Taylor <ian at airs dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Ian Lance Taylor <ian at airs dot com> ---
Should be fixed now.

Thanks for reporting it.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-09 23:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-08 15:41 [Bug go/65349] New: [5 Regression] go tool crashes, can't compile go code on 32bit linux systems doko at gcc dot gnu.org
2015-03-09 12:13 ` [Bug go/65349] " rguenth at gcc dot gnu.org
2015-03-09 14:35 ` jakub at gcc dot gnu.org
2015-03-09 23:41 ` ian at gcc dot gnu.org
2015-03-09 23:43 ` ian at gcc dot gnu.org
2015-03-09 23:44 ` ian at airs dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).