-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
fuzz clang-format #23426
Comments
Clang-format(-fuzzer) is very slow on a tiny input. cat << EOF | base64 --decode | clang-format Perf: |
This one is worse: 31 seconds w/o instrumentation for 64 bytes, same profile. cat << EOF | base64 --decode | clang-format |
A chain of < seems to trigger superlinear runtime in the parser. perl -e 'print "<" x 20'|clang-format n | seconds |
echo LypcAAov | base64 --decode | clang-format - Assertion `TokenText.startswith("/") && TokenText.endswith("/")' failed. |
echo PCo+Iis/J2FjIDpTDT46zvxcXAp1NzI49zxGPg== | base64 --decode | clang-format - Assertion `EndColumn >= StartColumn' failed. |
*** Bug #23294 has been marked as a duplicate of this bug. *** |
the clang/clang-format fuzzer bot
|
Daniel, many thanks for the fixes. clang-format-fuzzer: /mnt/b/sanitizer-buildbot5/sanitizer-x86_64-linux-fuzzer/build/llvm/tools/clang/lib/Format/ContinuationIndenter.cpp:1066: unsigned int clang::format::ContinuationIndenter::breakProtrudingToken(const clang::format::FormatToken &, clang::format::LineState &, bool): Assertion `NewRemainingTokenColumns < RemainingTokenColumns' failed. reproducer (base64-encoded): You may get more reproducers from the bot: |
Fixed crasher in r242738. |
The clang-format-fuzzer bot has been mostly green lately, |
Extended Description
We have a fuzzer of clang-format in the source tree.
Details: llvm/lib/Fuzzer/README.txt
It has found a few bugs so far:
r226685, r226678, r226451, r226446, r226448, r227427, r226447,
r226685, r226680, r226698, r229485, r227677, r227433, r227427,
r230395, r231066, (probably missed a couple more)
There are a few remaining, we will be posting them here, one per comment.
There is also a build bot which runs the fuzzer 24/7 and will report new
bugs (regressions) if they appear or old bugs if the fuzzer discovers them.
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer
The text was updated successfully, but these errors were encountered: