diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-09-16 22:56:32 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-09-16 22:56:32 +0000 |
commit | 31aeabd3c51f798a7a3cbfab4bacbce983415ad8 (patch) | |
tree | 49f347d9773c306611f0d0b866ae9f0f9fa78147 /libgo/runtime/go-send-big.c | |
parent | e7f799cecc08fe69899b7f91e6e40744ce39b2eb (diff) | |
download | gcc-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.c | 5 |
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); |