Skip to content
New issue

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

[BUG] runtime error in (*routeRegexp).Match #749

Open
1 task done
streamer45 opened this issue Jan 10, 2024 · 0 comments
Open
1 task done

[BUG] runtime error in (*routeRegexp).Match #749

streamer45 opened this issue Jan 10, 2024 · 0 comments
Labels

Comments

@streamer45
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Code panics

Expected Behavior

Not to panic but return an error

Steps To Reproduce

It's a sporadic issue we spotted through automation (Sentry) so hard to tell how it could be reproduced but somehow the regexp pointer is nil when the code attempts to match.

Anything else?

Stacktrace

runtime.errorString: runtime error: invalid memory address or nil pointer dereference
  File "regexp/exec.go", line 527, in (*Regexp).doExecute
  File "regexp/exec.go", line 514, in (*Regexp).doMatch
  File "regexp/regexp.go", line 533, in (*Regexp).MatchString
  File "github.com/gorilla/mux@v1.8.0/regexp.go", line 193, in (*routeRegexp).Match
  File "github.com/gorilla/mux@v1.8.0/route.go", line 50, in (*Route).Match
  File "github.com/gorilla/mux@v1.8.0/mux.go", line 138, in (*Router).Match
  File "github.com/gorilla/mux@v1.8.0/route.go", line 50, in (*Route).Match
  File "github.com/gorilla/mux@v1.8.0/mux.go", line 138, in (*Router).Match
  File "github.com/gorilla/mux@v1.8.0/route.go", line 50, in (*Route).Match
  File "github.com/gorilla/mux@v1.8.0/mux.go", line 138, in (*Router).Match
  File "github.com/gorilla/mux@v1.8.0/mux.go", line 196, in (*Router).ServeHTTP
  File "net/http/server.go", line 2109, in HandlerFunc.ServeHTTP
  File "net/http/server.go", line 2947, in serverHandler.ServeHTTP
  File "net/http/server.go", line 1991, in (*conn).serve
@streamer45 streamer45 added the bug label Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant