public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ro at CeBiTec dot Uni-Bielefeld.DE" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug go/51874] Many libgo testsuite failures on Solaris, IRIX
Date: Tue, 31 Jan 2012 19:01:00 -0000	[thread overview]
Message-ID: <bug-51874-4-9TLAWykYXA@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51874-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2012-01-31 18:27:32 UTC ---
> I've still to closer investigate why this happens.  I suspect that this
> is also the cause of the IRIX failures (a libgo build is currently
> running).  Maybe this is just and endianess problem: it's interesting
> that 32-bit Solaris/x86 works (little-endian), while 32-bit
> Solaris/SPARC and IRIX (both big-endian) don't.

I see now what's happening, and it's indeed an endianess problem:

In runtime/chan.c (__go_send_small), when sending an int (1) on a
big-endian system, the __builtin_memcpy copies the 4 low bytes from val
(0 in the case of val = 1) into b[], and runtime_chansend copies those
to the reciever.  Similarly, in __go_receive_small even when a 4-byte
int had been received correctly, it would have been placed into the 4
low bytes of u.b by runtime_chanrecv, but the function returns all 8
bytes of u.v (0x10000 in this case).

This code cannot possibly work on a big-endian system, but I'm undecided
how to solve this in a clean way.

    Rainer


  parent reply	other threads:[~2012-01-31 18:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-16 18:11 [Bug go/51874] New: " ro at gcc dot gnu.org
2012-01-27 12:18 ` [Bug go/51874] " ro at gcc dot gnu.org
2012-01-27 12:35 ` ro at CeBiTec dot Uni-Bielefeld.DE
2012-01-27 13:04 ` ro at CeBiTec dot Uni-Bielefeld.DE
2012-01-31 19:01 ` ro at CeBiTec dot Uni-Bielefeld.DE [this message]
2012-02-11  0:07 ` ian at airs dot com
2012-02-12  6:01 ` ian at gcc dot gnu.org
2012-02-12  6:05 ` ian at airs dot com
2012-02-12  6:06 ` ian at airs dot com
2012-02-12  6:55 ` pinskia at gcc dot gnu.org
2012-02-14 18:20 ` ian at airs dot com
2012-02-14 18:32 ` ro at CeBiTec dot Uni-Bielefeld.DE
2012-02-16  7:31 ` ian at gcc dot gnu.org
2012-02-16 19:46 ` [Bug go/51874] Many libgo testsuite failures on IRIX ro at gcc dot gnu.org
2012-03-22  8:57 ` rguenth at gcc dot gnu.org
2012-04-04 11:49 ` ro at gcc dot gnu.org
2012-04-24 16:33 ` ian at airs dot com
2012-05-08 15:10 ` ro at CeBiTec dot Uni-Bielefeld.DE
2012-05-08 15:20 ` ro at gcc dot gnu.org
2012-07-02 14:10 ` rguenth at gcc dot gnu.org
2014-06-13 11:41 ` ro at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-51874-4-9TLAWykYXA@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).