-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[mlir] Fix bug in PDLL Parser #155243
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
[mlir] Fix bug in PDLL Parser #155243
Conversation
This reverts changes made to `mlir/lib/Tools/PDLL/Parser/Parser.cpp` in 095b41c . `raw_indented_ostream::printReindented()` reads from a string to which it also concurrently writes to, causing unintended behavior. Credits to @jackalcooper for finding the issue.
@llvm/pr-subscribers-mlir @llvm/pr-subscribers-mlir-core Author: Youngsuk Kim (JOE1994) ChangesThis reverts changes made to
Credits to @jackalcooper for finding the issue. Full diff: https://github.com/llvm/llvm-project/pull/155243.diff 1 Files Affected:
diff --git a/mlir/lib/Tools/PDLL/Parser/Parser.cpp b/mlir/lib/Tools/PDLL/Parser/Parser.cpp
index 51e702a1bb53a..c883baa7be2c5 100644
--- a/mlir/lib/Tools/PDLL/Parser/Parser.cpp
+++ b/mlir/lib/Tools/PDLL/Parser/Parser.cpp
@@ -147,8 +147,9 @@ class Parser {
std::string docStr;
{
llvm::raw_string_ostream docOS(docStr);
+ std::string tmpDocStr = doc.str();
raw_indented_ostream(docOS).printReindented(
- StringRef(docStr).rtrim(" \t"));
+ StringRef(tmpDocStr).rtrim(" \t"));
}
return docStr;
}
|
Excluded updates to mlir/lib/AsmParser/Parser.cpp , which caused LIT failure "FAIL: MLIR::completion.test" on multiple buildbots.
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/55/builds/16195 Here is the relevant piece of the build log for the reference
|
This reverts changes made to
mlir/lib/Tools/PDLL/Parser/Parser.cpp
in 095b41c .raw_indented_ostream::printReindented()
reads from a string to which it also concurrently writes to, causing unintended behavior.Credits to @jackalcooper for finding the issue.