We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win10, amd64, go1.20.2
However, if redirector is defined by reflect.MakeFunc, step 4 seems to cause endless execution.
func println0() { println(0) } // -gcflags='all=-N -l' func Test_bad(t *testing.T) { stand := reflect.MakeFunc(reflect.ValueOf(println0).Type(), nil) _, err := mpatch.PatchMethodByReflectValue(stand, println0) if err != nil { panic(err.Error()) } stand.Call(nil) // 0 _, err = mpatch.PatchMethodByReflectValue(reflect.ValueOf(println0), reflect.MakeFunc(reflect.ValueOf(println0).Type(), func(args []reflect.Value) (results []reflect.Value) { println("redirector") return nil })) if err != nil { panic(err.Error()) } stand.Call(nil) // endless }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
win10, amd64, go1.20.2
However, if redirector is defined by reflect.MakeFunc, step 4 seems to cause endless execution.
The text was updated successfully, but these errors were encountered: