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
Panic is seen (intermittently) when receiving a POST request, the stack trace is entirely out of my client code and the index shown doesn't seem to relate to anything:
I've been looking into this a lot and think it might be something in the regexp onePassProg that is getting corrupted. Capturing this behaviour in delve I was able to see the InstAlt instance had invalid values for it's Next array:
From other successful cases, that array should be [4, 6, 4]. I'm curious if something in copyRouteRegexp of mux.go is causing the array to be over-written but I haven't found a nice way to watch when a variable gets changed.
I have been unable to repro this in a small, self-contained example though so I don't have any helpful source code to share yet.
My next step is to force the route to use a back-tracking regex so we skip that one-pass logic in regexp assuming that's the root cause.
Is there an existing issue for this?
Current Behavior
Panic is seen (intermittently) when receiving a POST request, the stack trace is entirely out of my client code and the index shown doesn't seem to relate to anything:
In the couple times this has happened the found index and the range are different (Always very large and then twenty something)
Expected Behavior
No panic, the path is valid and defined. The route is even successfully called in many times but occasionally will hit the above issue.
Steps To Reproduce
Running from golang:bullseye docker image linux_x86_64 go1.21.4, using version 1.8.1 of gorilla/mux
The route it's failing on looks like:
but as you can see from the stack trace it's not even getting to the handler or calling any middleware.
Anything else?
No response
The text was updated successfully, but these errors were encountered: