Skip to content

Instantly share code, notes, and snippets.

@tamird
Created December 3, 2015 21:13
Show Gist options
  • Save tamird/9a7ce0554437c470e94d to your computer and use it in GitHub Desktop.
Save tamird/9a7ce0554437c470e94d to your computer and use it in GitHub Desktop.
valgrind ./main.test
==6001== Memcheck, a memory error detector
==6001== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==6001== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==6001== Command: ./main.test
==6001==
==6001== Syscall param set_robust_list(head) points to uninitialised byte(s)
==6001== at 0x569E6F: __pthread_initialize_minimal (nptl-init.c:358)
==6001== by 0x56F5BD: (below main) (in /go/src/golang/src/main.test)
==6001== Address 0x4000b70 is not stack'd, malloc'd or (recently) free'd
==6001==
==6001== Conditional jump or move depends on uninitialised value(s)
==6001== at 0x5B3096: __register_atfork (in /go/src/golang/src/main.test)
==6001== by 0x5B31B8: __libc_pthread_init (in /go/src/golang/src/main.test)
==6001== by 0x56A046: __pthread_initialize_minimal (nptl-init.c:456)
==6001== by 0x56F5BD: (below main) (in /go/src/golang/src/main.test)
==6001==
==6001== Conditional jump or move depends on uninitialised value(s)
==6001== at 0x5B3146: __linkin_atfork (in /go/src/golang/src/main.test)
==6001== by 0x58D543: ptmalloc_init.part.7 (in /go/src/golang/src/main.test)
==6001== by 0x58D88D: malloc_hook_ini (in /go/src/golang/src/main.test)
==6001== by 0x5EC3D2: _dl_get_origin (in /go/src/golang/src/main.test)
==6001== by 0x5BCAEE: _dl_non_dynamic_init (in /go/src/golang/src/main.test)
==6001== by 0x5BDC67: __libc_init_first (in /go/src/golang/src/main.test)
==6001== by 0x56F605: (below main) (in /go/src/golang/src/main.test)
==6001==
==6001== Conditional jump or move depends on uninitialised value(s)
==6001== at 0x5898B9: _int_free (in /go/src/golang/src/main.test)
==6001== by 0x5E649C: fillin_rpath (in /go/src/golang/src/main.test)
==6001== by 0x5E6AA2: _dl_init_paths (in /go/src/golang/src/main.test)
==6001== by 0x5BCFC4: _dl_non_dynamic_init (in /go/src/golang/src/main.test)
==6001== by 0x5BDC67: __libc_init_first (in /go/src/golang/src/main.test)
==6001== by 0x56F605: (below main) (in /go/src/golang/src/main.test)
==6001==
==6001== Conditional jump or move depends on uninitialised value(s)
==6001== at 0x58991F: _int_free (in /go/src/golang/src/main.test)
==6001== by 0x5E649C: fillin_rpath (in /go/src/golang/src/main.test)
==6001== by 0x5E6AA2: _dl_init_paths (in /go/src/golang/src/main.test)
==6001== by 0x5BCFC4: _dl_non_dynamic_init (in /go/src/golang/src/main.test)
==6001== by 0x5BDC67: __libc_init_first (in /go/src/golang/src/main.test)
==6001== by 0x56F605: (below main) (in /go/src/golang/src/main.test)
==6001==
==6001== Conditional jump or move depends on uninitialised value(s)
==6001== at 0x5898B9: _int_free (in /go/src/golang/src/main.test)
==6001== by 0x565657: x_cgo_init (gcc_linux_amd64.c:49)
==6001== by 0x45BDB5: runtime.rt0_go (/go/src/golang/src/runtime/asm_amd64.s:85)
==6001== by 0x4002BF: ??? (in /go/src/golang/src/main.test)
==6001== by 0x9C217F: ??? (in /go/src/golang/src/main.test)
==6001==
==6001== Conditional jump or move depends on uninitialised value(s)
==6001== at 0x58991F: _int_free (in /go/src/golang/src/main.test)
==6001== by 0x565657: x_cgo_init (gcc_linux_amd64.c:49)
==6001== by 0x45BDB5: runtime.rt0_go (/go/src/golang/src/runtime/asm_amd64.s:85)
==6001== by 0x4002BF: ??? (in /go/src/golang/src/main.test)
==6001== by 0x9C217F: ??? (in /go/src/golang/src/main.test)
==6001==
==6001== Warning: ignored attempt to set SIGRT32 handler in sigaction();
==6001== the SIGRT32 signal is used internally by Valgrind
==6001== Warning: client switching stacks? SP change: 0xfff0009c0 --> 0xc8200247b8
==6001== to suppress, use: --max-stackframe=790827777528 or greater
==6001== Warning: client switching stacks? SP change: 0xc820024768 --> 0xfff000a18
==6001== to suppress, use: --max-stackframe=790827777360 or greater
==6001== Conditional jump or move depends on uninitialised value(s)
==6001== at 0x58A4EF: _int_malloc (in /go/src/golang/src/main.test)
==6001== by 0x58C67C: malloc (in /go/src/golang/src/main.test)
==6001== by 0x5657FD: x_cgo_thread_start (gcc_util.c:39)
==6001== by 0x45DA2C: runtime.asmcgocall (/go/src/golang/src/runtime/asm_amd64.s:612)
==6001== by 0xC8200008FF: ???
==6001== by 0x69F53F: ??? (in /go/src/golang/src/main.test)
==6001==
==6001== Warning: client switching stacks? SP change: 0xfff000a18 --> 0xc820024768
==6001== to suppress, use: --max-stackframe=790827777360 or greater
==6001== further instances of this message will not be shown.
==6001== Thread 2:
==6001== Conditional jump or move depends on uninitialised value(s)
==6001== at 0x56696B: start_thread (pthread_create.c:268)
==6001== by 0x5B2CC8: clone (in /go/src/golang/src/main.test)
==6001==
==6001== Thread 1:
==6001== Invalid read of size 1
==6001== at 0x68DBA5C: internal_getpwuid_r (compat-pwd.c:961)
==6001== by 0x68DBA5C: _nss_compat_getpwuid_r (compat-pwd.c:1111)
==6001== by 0x5AC07B: getpwuid_r (in /go/src/golang/src/main.test)
==6001== by 0x5653B5: mygetpwuid_r (lookup_unix.go:27)
==6001== by 0x5653B5: _cgo_90e3b678b13c_Cfunc_mygetpwuid_r (lookup_unix.go:101)
==6001== by 0x45D9EF: runtime.asmcgocall (/go/src/golang/src/runtime/asm_amd64.s:582)
==6001== by 0xC820045C8F: ???
==6001== by 0x4034E9: runtime.cgocall (/go/src/golang/src/runtime/cgocall.go:110)
==6001== by 0x43209F: runtime.startTheWorldWithSema (/go/src/golang/src/runtime/proc.go:924)
==6001== by 0xFFF000B57: ???
==6001== Address 0xe5 is not stack'd, malloc'd or (recently) free'd
==6001==
==6001== Conditional jump or move depends on uninitialised value(s)
==6001== at 0x44826D: runtime.findmoduledatap (/go/src/golang/src/runtime/symtab.go:202)
==6001==
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0xe5 pc=0x68dba5c]
runtime stack:
runtime.throw(0x6e5040, 0x2a)
/go/src/golang/src/runtime/panic.go:530 +0x90
runtime.sigpanic()
/go/src/golang/src/runtime/sigpanic_unix.go:12 +0x5a
goroutine 19 [syscall, locked to thread]:
runtime.cgocall(0x565390, 0xc820045d10, ==6001== Conditional jump or move depends on uninitialised value(s)
==6001== at 0x42ED3B: runtime.printhex (/go/src/golang/src/runtime/print.go:185)
==6001== by 0x44EDE6: runtime.gentraceback (/go/src/golang/src/runtime/traceback.go:393)
==6001== by 0x44F957: runtime.traceback1 (/go/src/golang/src/runtime/traceback.go:587)
==6001== by 0x44F817: runtime.traceback (/go/src/golang/src/runtime/traceback.go:564)
==6001== by 0x4502EF: runtime.tracebackothers (/go/src/golang/src/runtime/traceback.go:701)
==6001== by 0x42E22B: runtime.dopanic_m (/go/src/golang/src/runtime/panic.go:627)
==6001== by 0x452E61: runtime.dopanic.func1 (/go/src/golang/src/runtime/panic.go:517)
==6001== by 0x45C05A: runtime.systemstack (/go/src/golang/src/runtime/asm_amd64.s:307)
==6001== by 0x42DBC0: runtime.dopanic (/go/src/golang/src/runtime/panic.go:518)
==6001== by 0x42DC5F: runtime.throw (/go/src/golang/src/runtime/panic.go:530)
==6001== by 0x4413A9: runtime.sigpanic (/go/src/golang/src/runtime/sigpanic_unix.go:12)
==6001== by 0x68DBA5B: internal_getpwuid_r (compat-pwd.c:961)
==6001== by 0x68DBA5B: _nss_compat_getpwuid_r (compat-pwd.c:1111)
==6001==
==6001== Use of uninitialised value of size 8
==6001== at 0x42ED30: runtime.printhex (/go/src/golang/src/runtime/print.go:184)
==6001== by 0x44EDE6: runtime.gentraceback (/go/src/golang/src/runtime/traceback.go:393)
==6001== by 0x44F957: runtime.traceback1 (/go/src/golang/src/runtime/traceback.go:587)
==6001== by 0x44F817: runtime.traceback (/go/src/golang/src/runtime/traceback.go:564)
==6001== by 0x4502EF: runtime.tracebackothers (/go/src/golang/src/runtime/traceback.go:701)
==6001== by 0x42E22B: runtime.dopanic_m (/go/src/golang/src/runtime/panic.go:627)
==6001== by 0x452E61: runtime.dopanic.func1 (/go/src/golang/src/runtime/panic.go:517)
==6001== by 0x45C05A: runtime.systemstack (/go/src/golang/src/runtime/asm_amd64.s:307)
==6001== by 0x42DBC0: runtime.dopanic (/go/src/golang/src/runtime/panic.go:518)
==6001== by 0x42DC5F: runtime.throw (/go/src/golang/src/runtime/panic.go:530)
==6001== by 0x4413A9: runtime.sigpanic (/go/src/golang/src/runtime/sigpanic_unix.go:12)
==6001== by 0x68DBA5B: internal_getpwuid_r (compat-pwd.c:961)
==6001== by 0x68DBA5B: _nss_compat_getpwuid_r (compat-pwd.c:1111)
==6001==
0xc800000000)
/go/src/golang/src/runtime/cgocall.go:123 +0x11b fp=0xc820045cc0 sp=0xc820045c90
os/user._Cfunc_mygetpwuid_r(0x0, 0xc820070e40, 0x4002b70, 0x400, 0xc820078078, 0x0)
??:0 +0x39 fp=0xc820045d10 sp=0xc820045cc0
os/user.lookupUnix(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/src/golang/src/os/user/lookup_unix.go:95 +0xcd8 fp=0xc820045ea8 sp=0xc820045d10
os/user.current(0x0, 0x0, 0x0)
/go/src/golang/src/os/user/lookup_unix.go:38 +0x42 fp=0xc820045ee8 sp=0xc820045ea8
os/user.Current(0x6a4f08, 0x0, 0x0)
/go/src/golang/src/os/user/lookup.go:9 +0x24 fp=0xc820045f08 sp=0xc820045ee8
github.com/cockroachdb/cgo_static_boom.TestBoom(0xc820098090)
/go/src/github.com/cockroachdb/cgo_static_boom/boom_test.go:12 +0x55 fp=0xc820045f58 sp=0xc820045f08
testing.tRunner(0xc820098090, 0x9c2c40)
/go/src/golang/src/testing/testing.go:466 +0x98 fp=0xc820045f90 sp=0xc820045f58
runtime.goexit()
/go/src/golang/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc820045f98 sp=0xc820045f90
created by testing.RunTests
/go/src/golang/src/testing/testing.go:575 +0x879
goroutine 1 [chan receive]:
testing.RunTests(0x6f7f80, 0x9c2c40, 0x1, 0x1, 0x1)
/go/src/golang/src/testing/testing.go:576 +0x8b9
testing.(*M).Run(0xc820049ef8, 0x0)
/go/src/golang/src/testing/testing.go:508 +0x81
main.main()
github.com/cockroachdb/cgo_static_boom/_test/_testmain.go:54 +0x117
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/go/src/golang/src/runtime/asm_amd64.s:1998 +0x1
==6001==
==6001== HEAP SUMMARY:
==6001== in use at exit: 0 bytes in 0 blocks
==6001== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==6001==
==6001== All heap blocks were freed -- no leaks are possible
==6001==
==6001== For counts of detected and suppressed errors, rerun with: -v
==6001== Use --track-origins=yes to see where uninitialised values come from
==6001== ERROR SUMMARY: 31 errors from 13 contexts (suppressed: 0 from 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment