projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cac7efc
)
Better error message if malloc gets a SIGSEGV.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 14 Dec 2010 05:19:51 +0000
(
05:19
+0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 14 Dec 2010 05:19:51 +0000
(
05:19
+0000)
From-SVN: r167785
libgo/runtime/go-signal.c
patch
|
blob
|
history
diff --git
a/libgo/runtime/go-signal.c
b/libgo/runtime/go-signal.c
index 8f44970402e8efaa9a5c1888411f5c68d4e70b80..3838ab98871ca3592d0723dd5acc86f5c5ca4f98 100644
(file)
--- a/
libgo/runtime/go-signal.c
+++ b/
libgo/runtime/go-signal.c
@@
-133,6
+133,12
@@
sighandler (int sig)
{
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);