You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
type hasPtrs struct {
x [2]*int
}
func main() {
var x *hasPtrs // Can be local, global, or arg; nil or non-nil.
var y *hasPtrs = nil // Must initialize to nil.
*x = *y
}
This code crashes when trying to insert a write barrier. It thinks the nil pointer being read from is a global pointer, then tries to find the symbol backing that pointer. Oops.
This will only happen for code that unconditionally panics while reading from the nil pointer. Not terribly interesting code, but it happens in Google. Things like:
func f() {
if newFeature {
v := *getNewFeaturePointer()
}
}
func getNewFeaturePointer() *int {
return nil // TODO: not implemented yet
}
var newFeature bool // don't enable this yet!
Started failing with CL 156363
The text was updated successfully, but these errors were encountered:
This code crashes when trying to insert a write barrier. It thinks the nil pointer being read from is a global pointer, then tries to find the symbol backing that pointer. Oops.
This will only happen for code that unconditionally panics while reading from the nil pointer. Not terribly interesting code, but it happens in Google. Things like:
Started failing with CL 156363
The text was updated successfully, but these errors were encountered: