https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61303
Bug ID: 61303
Summary: gccgo: segfault, regression since 4.8.2
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: go
Assignee: ian at airs dot com
Reporter: maciej at opencsw dot org
CC: cmang at google dot com
> ./bin/gen-catalog-index --help
Usage of ./bin/gen-catalog-index:
-arch="sparc": { sparc | i386 }
-catalog-release="unstable": e.g. unstable, bratislava, kiel, dublin
-os-release="SunOS5.10": e.g. SunOS5.10
-output="catalog": The name of the file to generate.
-pkgdb-url="http://buildfarm.opencsw.org/pkgdb/rest": Web address of the
pkgdb app.
> ./bin/gen-catalog-index -output foo
2014/05/24 13:50:23 Making a request to
http://buildfarm.opencsw.org/pkgdb/rest/catalogs/unstable/sparc/SunOS5.10/for-generation/as-dicts/
2014/05/24 13:50:32 Retrieved {unstable sparc SunOS5.10} with 3704 packages
2014/05/24 13:50:32 Writing {unstable sparc SunOS5.10} to foo
2014/05/24 13:50:32 Catalog index written successfully
> cp ./bin/gen-catalog-index{,.bak}
> rm ./bin/gen-catalog-index
> make bin/gen-catalog-index
gccgo -g -o bin/gen-catalog-index src/gen-catalog-index/gen-catalog-index.o
src/opencsw/diskformat/diskformat.o
> rm foo
> ./bin/gen-catalog-index -output foo
2014/05/24 13:51:05 Making a request to
http://buildfarm.opencsw.org/pkgdb/rest/catalogs/unstable/sparc/SunOS5.10/for-generation/as-dicts/
Segmentation Fault (core dumped)
> dbx - core
Corefile specified executable:
"/home/raos/opencsw/.buildsys/v2/go/bin/gen-catalog-index"
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 7.6' in your
.dbxrc
Reading gen-catalog-index
dbx: warning: core object name "gen-catalog-ind" matches
object name "gen-catalog-index" within the limit of 14. assuming they match
core file header read successfully
Reading ld.so.1
Reading libgo.so.5.0.0
dbx: warning: unknown location expression code (0x9e)
Reading libm.so.2
Reading libgcc_s.so.1
Reading libc.so.1
Reading libpthread.so.1
Reading libsocket.so.1
Reading libnsl.so.1
Reading librt.so.1
Reading libaio.so.1
Reading libmd.so.1
Reading libc_psr.so.1
t@3 (l@3) terminated by signal SEGV (no mapping at the fault address)
0xfe730e98: _memcpy+0x04bc: st %o4, [%o0]
(dbx) where
current thread: t@3
=>[1] _memcpy(0x0, 0xff0d1f6c, 0x61, 0x60100, 0x30, 0x0), at 0xfe730e98
[2] runtime_netpoll(0x1, 0x80, 0xce1e1e3b, 0x0, 0xff0d1ff0, 0x180), at
0xfeb8e004
[3] schedule(0x1, 0xfef32f6c, 0x0, 0x0, 0xff0f3d28, 0xff0f5800), at
0xfeb92e90
[4] runtime_mstart(0xde811800, 0xce1e2000, 0x0, 0xce310a38, 0x4,
0xce310a38), at 0xfeb93130
(dbx) threads
t@1 a l@1 ?() sleep on 0x3f3c0 in __lwp_park()
t@2 a l@2 ?() sleep on 0x3f3f8 in __lwp_park()
o> t@3 a l@3 ?() signal SIGSEGV in _memcpy()
t@4 a l@4 ?() sleep on 0x3f810 in __lwp_park()
(dbx) quit
This is a regression since gcc-4.8.2. The same go code works when compiled with
gccgo-4.8.2 and fails when compiled with gccgo-4.9.0.