Message ID | mcr39q10w3l.fsf@google.com |
---|---|
State | New |
Headers | show |
diff -r a3f3fa2f104e libgo/runtime/go-signal.c --- a/libgo/runtime/go-signal.c Mon Dec 13 21:12:33 2010 -0800 +++ b/libgo/runtime/go-signal.c Mon Dec 13 21:16:34 2010 -0800 @@ -133,6 +133,12 @@ { sigset_t clear; + if (__sync_bool_compare_and_swap (&m->mallocing, 1, 1)) + { + fprintf (stderr, "caught signal while mallocing: %s\n", msg); + __go_assert (0); + } + /* The signal handler blocked signals; unblock them. */ i = sigfillset (&clear); __go_assert (i == 0);