newrelic / go-agent

New Relic Go Agent
Apache License 2.0
775 stars 295 forks source link

Fix handling of panic(nil) #960

Closed nr-swilloughby closed 2 months ago

nr-swilloughby commented 2 months ago

Go 1.21 changed the behavior of panic(nil) in a way that was at odds with how the agent handled that case. This PR corrects for it by checking for the new return value from recover() introduced at 1.21 as well as the nil return value which go provided in previous versions.