Skip to content

Instantly share code, notes, and snippets.

@minux
Created December 3, 2016 01:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save minux/ef054728f5f9b8e3685b88f5c88d1ad3 to your computer and use it in GitHub Desktop.
Save minux/ef054728f5f9b8e3685b88f5c88d1ad3 to your computer and use it in GitHub Desktop.
runtime_os_darwin_print_bsdthread_register_error.patch
diff --git a/src/runtime/os_darwin.go b/src/runtime/os_darwin.go
index 1528167..edcb512 100644
--- a/src/runtime/os_darwin.go
+++ b/src/runtime/os_darwin.go
@@ -101,7 +101,8 @@ func goenvs() {
// but only if we're not using cgo. If we are using cgo we need
// to let the C pthread library install its own thread-creation callback.
if !iscgo {
- if bsdthread_register() != 0 {
+ if r := bsdthread_register(); r != 0 {
+ println("bsdthread_register returns", r)
if gogetenv("DYLD_INSERT_LIBRARIES") != "" {
throw("runtime: bsdthread_register error (unset DYLD_INSERT_LIBRARIES)")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment