aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/go-send-big.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-09-16 22:56:32 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-09-16 22:56:32 +0000
commit31aeabd3c51f798a7a3cbfab4bacbce983415ad8 (patch)
tree49f347d9773c306611f0d0b866ae9f0f9fa78147 /libgo/runtime/go-send-big.c
parente7f799cecc08fe69899b7f91e6e40744ce39b2eb (diff)
downloadgcc-31aeabd3c51f798a7a3cbfab4bacbce983415ad8.zip
gcc-31aeabd3c51f798a7a3cbfab4bacbce983415ad8.tar.gz
gcc-31aeabd3c51f798a7a3cbfab4bacbce983415ad8.tar.bz2
Block forever on send/receive to/from nil channel.
From-SVN: r178920
Diffstat (limited to 'libgo/runtime/go-send-big.c')
-rw-r--r--libgo/runtime/go-send-big.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libgo/runtime/go-send-big.c b/libgo/runtime/go-send-big.c
index 0b4aa04..61d4a0f 100644
--- a/libgo/runtime/go-send-big.c
+++ b/libgo/runtime/go-send-big.c
@@ -17,7 +17,10 @@ __go_send_big (struct __go_channel* channel, const void *val, _Bool for_select)
size_t offset;
if (channel == NULL)
- __go_panic_msg ("send to nil channel");
+ {
+ // Block forever.
+ __go_select (0, 0, NULL, NULL);
+ }
element_size = channel->element_type->__size;
alloc_size = (element_size + sizeof (uint64_t) - 1) / sizeof (uint64_t);