public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug go/60134] New: runtime_unmarkspan panics with "unaligned pointer"
@ 2014-02-10 12:39 vogt at linux dot vnet.ibm.com
  2014-02-12  0:34 ` [Bug go/60134] " ian at airs dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: vogt at linux dot vnet.ibm.com @ 2014-02-10 12:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60134

            Bug ID: 60134
           Summary: runtime_unmarkspan panics with "unaligned pointer"
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
          Assignee: ian at airs dot com
          Reporter: vogt at linux dot vnet.ibm.com

(using git commit id e63988cca99cbbf6e5c459379309fe3359fe7c09)

The test case convert.go fails with a panic in a panic on System/z:

-- snip --
fatal error: markspan: unaligned pointer

goroutine 1 [running]:
runtime_dopanic
    ../../../libgo/runtime/panic.c:77
runtime_throw
    ../../../libgo/runtime/panic.c:115
runtime_unmarkspan
    ../../../libgo/runtime/mgc0.c:2452
__go_free
    ../../../libgo/runtime/malloc.goc:240
__go_panic
    ../../../libgo/runtime/go-panic.c:106
runtime_panicstring
    ../../../libgo/runtime/panic.c:134
__go_map_index
    ../../../libgo/runtime/go-map-index.c:92
reflect.canonicalize
    ../../../libgo/go/reflect/type.go:1782
reflect.toType
    ../../../libgo/go/reflect/type.go:1791
reflect.TypeOf
    ../../../libgo/go/reflect/type.go:1026
fmt..import
    ../../../libgo/go/fmt/print.go:643
__go_init_main
    /home/vogt/src/git/gcc/gcc/testsuite/go.test/test/convert.go:9
runtime_main
    ../../../libgo/runtime/proc.c:555
kickoff
    ../../../libgo/runtime/proc.c:232
-- snip --

It turns out that mgc0.c:runtime_unmarkspan() is called with a pointer that
should be 16 byte aligned (wordsPerBitmapWord) but is actually only 8 byte
aligned.  The original pointer points to the stack variable "Defer d" in
proc.c:runtime_main().  I guess the code should somehow enforce that "Defer d"
is aligned to mgc0.c:wordsPerBitmapWord bytes, although I'm not sure about the
right way to fix this.

Note: Even though adding "__attribute__ ((align(16)))" for d fixes the problem
for me, the test case still fails, but that is another issue that may or may
not be platform specific.  In any case I'll look into that and open another bug
report if necessary.


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

* [Bug go/60134] runtime_unmarkspan panics with "unaligned pointer"
  2014-02-10 12:39 [Bug go/60134] New: runtime_unmarkspan panics with "unaligned pointer" vogt at linux dot vnet.ibm.com
@ 2014-02-12  0:34 ` ian at airs dot com
  2014-02-12  0:37 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ian at airs dot com @ 2014-02-12  0:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60134

--- Comment #1 from Ian Lance Taylor <ian at airs dot com> ---
I don't know which repository your git commit ID refers to.  The gofrontend
uses Mercurial and GCC uses Subversion.

I suspect this problem was fixed by revision 205940 in the GCC Subversion
repository, committed 2013-12-12,
http://gcc.gnu.org/ml/gcc-patches/2013-12/msg01202.html .

Do the sources you are building include that patch?


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

* [Bug go/60134] runtime_unmarkspan panics with "unaligned pointer"
  2014-02-10 12:39 [Bug go/60134] New: runtime_unmarkspan panics with "unaligned pointer" vogt at linux dot vnet.ibm.com
  2014-02-12  0:34 ` [Bug go/60134] " ian at airs dot com
@ 2014-02-12  0:37 ` pinskia at gcc dot gnu.org
  2014-02-12  1:10 ` ian at airs dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-02-12  0:37 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60134

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Ian Lance Taylor from comment #1)
> I don't know which repository your git commit ID refers to.  The gofrontend
> uses Mercurial and GCC uses Subversion.

The git commit ID referenced is the official git which uses git-svn:
http://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e63988cca99cbbf6e5c459379309fe3359fe7c09

> 
> I suspect this problem was fixed by revision 205940 in the GCC Subversion
> repository, committed 2013-12-12,
> http://gcc.gnu.org/ml/gcc-patches/2013-12/msg01202.html .
> 
> Do the sources you are building include that patch?



which corresponds to revision 205617 which is before the revision you said it
was fixed in.

Thanks,
Andrew Pinski


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

* [Bug go/60134] runtime_unmarkspan panics with "unaligned pointer"
  2014-02-10 12:39 [Bug go/60134] New: runtime_unmarkspan panics with "unaligned pointer" vogt at linux dot vnet.ibm.com
  2014-02-12  0:34 ` [Bug go/60134] " ian at airs dot com
  2014-02-12  0:37 ` pinskia at gcc dot gnu.org
@ 2014-02-12  1:10 ` ian at airs dot com
  2014-02-12  7:26 ` vogt at linux dot vnet.ibm.com
  2014-02-14 12:21 ` vogt at linux dot vnet.ibm.com
  4 siblings, 0 replies; 6+ messages in thread
From: ian at airs dot com @ 2014-02-12  1:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60134

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> ---
Thanks Andrew.  Assuming this is fixed.  Please reopen if not.


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

* [Bug go/60134] runtime_unmarkspan panics with "unaligned pointer"
  2014-02-10 12:39 [Bug go/60134] New: runtime_unmarkspan panics with "unaligned pointer" vogt at linux dot vnet.ibm.com
                   ` (2 preceding siblings ...)
  2014-02-12  1:10 ` ian at airs dot com
@ 2014-02-12  7:26 ` vogt at linux dot vnet.ibm.com
  2014-02-14 12:21 ` vogt at linux dot vnet.ibm.com
  4 siblings, 0 replies; 6+ messages in thread
From: vogt at linux dot vnet.ibm.com @ 2014-02-12  7:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60134

--- Comment #4 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
On Wed, Feb 12, 2014 at 12:34:06AM +0000, ian at airs dot com wrote:
> I suspect this problem was fixed by revision 205940 in the GCC Subversion
> repository, committed 2013-12-12,
> http://gcc.gnu.org/ml/gcc-patches/2013-12/msg01202.html .

Yes, that fixes it.  Thanks.

Ciao

Dominik ^_^  ^_^


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

* [Bug go/60134] runtime_unmarkspan panics with "unaligned pointer"
  2014-02-10 12:39 [Bug go/60134] New: runtime_unmarkspan panics with "unaligned pointer" vogt at linux dot vnet.ibm.com
                   ` (3 preceding siblings ...)
  2014-02-12  7:26 ` vogt at linux dot vnet.ibm.com
@ 2014-02-14 12:21 ` vogt at linux dot vnet.ibm.com
  4 siblings, 0 replies; 6+ messages in thread
From: vogt at linux dot vnet.ibm.com @ 2014-02-14 12:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60134

Dominik Vogt <vogt at linux dot vnet.ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED

--- Comment #5 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
Fix verified by reporter.


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

end of thread, other threads:[~2014-02-14 12:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-10 12:39 [Bug go/60134] New: runtime_unmarkspan panics with "unaligned pointer" vogt at linux dot vnet.ibm.com
2014-02-12  0:34 ` [Bug go/60134] " ian at airs dot com
2014-02-12  0:37 ` pinskia at gcc dot gnu.org
2014-02-12  1:10 ` ian at airs dot com
2014-02-12  7:26 ` vogt at linux dot vnet.ibm.com
2014-02-14 12:21 ` vogt at linux dot vnet.ibm.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).