book-content
book-content copied to clipboard
Segmentation Fault (SIGSEGV) during Keybase installation via Homebrew on macOS
Description:
When installing Keybase using Homebrew on macOS, I encountered a segmentation fault (SIGSEGV) during the installation process, specifically while installing command-line tools. This appears to be caused by a nil pointer dereference in the Go code.
Steps to Reproduce:
- Run
brew install keybaseon macOS. - Observe the panic during the installation process.
Expected behavior:
The installation should complete without errors.
Actual behavior:
The installation fails with a segmentation fault.
Environment:
-
macOS Version:
Darwin Darwin Kernel Version 24.0.0 arm64 - Homebrew Version: Homebrew 4.4.2
- Keybase Version: 6.5.0
Error Logs:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x28 pc=0x1016a4484]
goroutine 1 [running]:
github.com/keybase/client/go/install.installCommandLineForBinPath({0x14000470640, 0x3c}, {0x140001be810, 0x16}, 0x1, {0x12a2203e0, 0x14000405d40})
/Users/test/go/src/github.com/keybase/client/go/install/install_darwin.go:710 +0x74
github.com/keybase/client/go/install.installCommandLine({0x101a182a5?, 0x3?}, {0x0?, 0x14000762cd0?}, 0x1, {0x12a2203e0, 0x14000405d40})
/Users/test/go/src/github.com/keybase/client/go/install/install_darwin.go:673 +0x13c
github.com/keybase/client/go/install.Install({0x10248e418, 0x140003cb608}, {0x0, 0x0}, {0x0, 0x0}, {0x1400046a5f0, 0x5, 0x5}, 0x1, ...)
/Users/test/go/src/github.com/keybase/client/go/install/install_darwin.go:494 +0x138
github.com/keybase/client/go/install.InstallAuto({0x10248e418, 0x140003cb608}, {0x0, 0x0}, {0x0, 0x0}, 0x28fa6ae00, {0x12a2203e0, 0x14000405d40})
/Users/test/go/src/github.com/keybase/client/go/install/install_darwin.go:441 +0x1fc
github.com/keybase/client/go/client.(*cmdInstallAuto).Run(0x1400067e440)
/Users/test/go/src/github.com/keybase/client/go/client/cmd_install_osx.go:361 +0x74
main.mainInner(0x140003cb608, {0x0, 0x0, 0x0})
/Users/test/go/src/github.com/keybase/client/go/keybase/main.go:247 +0xb38
main.main()
/Users/test/go/src/github.com/keybase/client/go/keybase/main.go:70 +0x84
Additional Context:
The installation process seems to fail while checking /usr/local/bin/keybase. It appears related to the Go code at this point:
/Users/test/go/src/github.com/keybase/client/go/install/install_darwin.go:710