is it safe to add //go:noescape
for function Sprintf(format string, a ...interface{}) string
please
#31387
Labels
//go:noescape
for function Sprintf(format string, a ...interface{}) string
please
#31387
when a package fmt's function was called, such as
func Sprintf(format string, a ...interface{}) string
, it will result in input variables escape to heap. But the fmt function actually issynchronization semantic, I think it's safe despite its input variables allocated in stack. So if we try to add
//go:noescape
for functionSprintf
, which avoid input variables escape, is there any correctness issue or safe risk please?The text was updated successfully, but these errors were encountered: