code review 7417045: runtime: Don't block SIGTRAP while creating a new thread. (issue 7417045)

10 views
Skip to first unread message

ia...@golang.org

unread,
Feb 28, 2013, 4:55:40 PM2/28/13
to ia...@golang.org, gofront...@googlegroups.com, re...@codereview-hr.appspotmail.com
Reviewers: iant,

Message:
Hello iant (cc: gofront...@googlegroups.com),

I'd like you to review this change to
https://gofrontend.googlecode.com/hg/


Description:
runtime: Don't block SIGTRAP while creating a new thread.

Thanks to Uros Bizjak.

Please review this at https://codereview.appspot.com/7417045/

Affected files:
M libgo/runtime/proc.c


Index: libgo/runtime/proc.c
===================================================================
--- a/libgo/runtime/proc.c
+++ b/libgo/runtime/proc.c
@@ -1256,6 +1256,12 @@
// Block signals during pthread_create so that the new thread
// starts with signals disabled. It will enable them in minit.
sigfillset(&clear);
+
+#ifdef SIGTRAP
+ // Blocking SIGTRAP reportedly breaks gdb on Alpha GNU/Linux.
+ sigdelset(&clear, SIGTRAP);
+#endif
+
sigemptyset(&old);
sigprocmask(SIG_BLOCK, &clear, &old);
ret = pthread_create(&tid, &attr, runtime_mstart, mp);


ia...@golang.org

unread,
Feb 28, 2013, 4:55:51 PM2/28/13
to ia...@golang.org, gofront...@googlegroups.com, re...@codereview-hr.appspotmail.com
*** Submitted as
https://code.google.com/p/gofrontend/source/detail?r=222f14e048a2 ***

runtime: Don't block SIGTRAP while creating a new thread.

Thanks to Uros Bizjak.

R=iant
CC=gofrontend-dev
https://codereview.appspot.com/7417045


https://codereview.appspot.com/7417045/
Reply all
Reply to author
Forward
0 new messages