Skip to content

Instantly share code, notes, and snippets.

View minux's full-sized avatar
💭
I will be extremely slow to respond.

Minux Ma minux

💭
I will be extremely slow to respond.
View GitHub Profile
@minux
minux / gist:ef054728f5f9b8e3685b88f5c88d1ad3
Created December 3, 2016 01:52
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 {
@minux
minux / valgrind.log
Created February 10, 2017 12:04
valgrind on helloworld.go
==20053== Memcheck, a memory error detector
==20053== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==20053== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==20053== Command: /tmp/helloworld
==20053==
==20053== Warning: ignored attempt to set SIGRT32 handler in sigaction();
==20053== the SIGRT32 signal is used internally by Valgrind
==20053== Warning: client switching stacks? SP change: 0xffefffdd8 --> 0xc42002e7d8
==20053== to suppress, use: --max-stackframe=773647952384 or greater
==20053== Warning: client switching stacks? SP change: 0xc42002e780 --> 0xffefffe58