We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Type: bug report
while (!istream.eof()) { ... } may cause infinite loop in MetricSearcher::FindOffset(xxx):
while (!istream.eof()) { ... }
MetricSearcher::FindOffset(xxx)
sentinel-cpp/sentinel-core/log/metric/metric_searcher.cc
Lines 57 to 65 in e4a6eb7
The eof() will return false even if the failbit or badbit is true. Refer: https://stackoverflow.com/questions/13079900/file-i-o-infinite-loop-c-eof
eof()
false
failbit
badbit
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Issue Description
Type: bug report
Describe what happened (or what feature you want)
while (!istream.eof()) { ... }
may cause infinite loop inMetricSearcher::FindOffset(xxx)
:sentinel-cpp/sentinel-core/log/metric/metric_searcher.cc
Lines 57 to 65 in e4a6eb7
The
eof()
will returnfalse
even if thefailbit
orbadbit
is true. Refer: https://stackoverflow.com/questions/13079900/file-i-o-infinite-loop-c-eofThe text was updated successfully, but these errors were encountered: