Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: msanwrite segfaults when called without a g on arm64 #34338
What version of Go are you using (
The cause is that when built with -buildmode=c-shared, the sigaction() of runtime/cgo_sigaction.go will call msanwrite() during libpreinit (before the runtime has set up a g). Unfortunately, on arm64, msancall() called by msanwrite() assumes that it is always called with a valid g, leading to a segfault.
I will submit the fixed CL, checking for nil g in msancall() on arm64.