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

txt parser: fix goroutine leak #570

Merged
merged 2 commits into from Nov 17, 2017
Merged

txt parser: fix goroutine leak #570

merged 2 commits into from Nov 17, 2017

Commits on Nov 17, 2017

  1. txt parser: fix goroutine leak

    When a higher level (grammar or syntax) error was encountered the lower
    level zlexer routine would be left open and trying to send more tokens
    on the channel c. This leaks a goroutine, per failed parse...
    
    This PR fixes this by signalling this error - by canceling a context -
    retrieving any remaining items from the channel, so zlexer can return.
    
    It also adds a goroutine leak test that can be re-used in other tests,
    the TestParseBadNAPTR test uses this leak detector.
    
    The private key parsing code had the same bug and is also fixed in this
    PR.
    
    Fixes #586
    Fixes coredns/coredns#1233
    miekg committed Nov 17, 2017
    Copy the full SHA
    ac98d1d View commit details
    Browse the repository at this point in the history
  2. sem not needed anymore

    miekg committed Nov 17, 2017
    Copy the full SHA
    30c3c85 View commit details
    Browse the repository at this point in the history