[PATCH] D59725: Additions to creduce script
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 24 11:50:49 PDT 2019
lebedev.ri added inline comments.
================
Comment at: cfe/trunk/utils/creduce-clang-crash.py:185
+ for msg in self.expected_output:
+ output += 'grep %s t.log || exit 1\n' % pipes.quote(msg)
+
----------------
>>! In D59725#1477362, @arichardson wrote:
>>>! In D59725#1477042, @lebedev.ri wrote:
>> I've stumbled into an issue with the script:
>> It got a line: `clang: /build/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2582: bool {anonymous}::IndVarSimplify::run(llvm::Loop*): Assertion `L->isRecursivelyLCSSAForm(*DT, *LI) && "LCSSA required to run indvars!"' failed.`
>> And produced the following grep: `grep 'L->isRecursivelyLCSSAForm(*DT, *LI) && "LCSSA required to run indvars!"' t.log || exit 1`
>> But that doesn't work, escapes should be applied. it should be
>> `grep 'L->isRecursivelyLCSSAForm(\*DT, \*LI) && \"LCSSA required to run indvars!\"' t.log || exit 1`
>
> In my script I use `grep -F " + shlex.quote(self.args.crash_message)` which should escape both the message and ensure that the grep argument is not interpreted as a regex.
Great to hear!
It appears that the script is currently more primitive than that currently though.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59725/new/
https://reviews.llvm.org/D59725
More information about the cfe-commits
mailing list