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

regexp: panics with malformed expression #16574

Closed
jnewlin12345 opened this issue Aug 2, 2016 · 3 comments
Closed

regexp: panics with malformed expression #16574

jnewlin12345 opened this issue Aug 2, 2016 · 3 comments

Comments

@jnewlin12345
Copy link

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    1.6.2
  2. What operating system and processor architecture are you using (go env)?
    play.golang.org
  3. What did you do?
    https://play.golang.org/p/d8aVBAeFjc
  4. What did you expect to see?
    An error that the regexp is malformed?
  5. What did you see instead?
    panic
@jnewlin12345
Copy link
Author

Here's another panic, I sort of expected this to work
https://play.golang.org/p/9RTKkTe7o_

@fraenkel
Copy link
Contributor

fraenkel commented Aug 2, 2016

In both cases you aren't checking the error coming back from Compile which are non-nil.

@bradfitz
Copy link
Contributor

bradfitz commented Aug 2, 2016

Not a bug. Check your errors.
https://play.golang.org/p/xqUuc-HSMB

@bradfitz bradfitz closed this as completed Aug 2, 2016
@golang golang locked and limited conversation to collaborators Aug 2, 2017
@mikioh mikioh changed the title regexp panics with malformed expression regexp: panics with malformed expression Aug 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants