-
Notifications
You must be signed in to change notification settings - Fork 27
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
Cvising "PASS_BUG_INFO" #52
Comments
Yes, I do the same. In your case you should reproduce it with |
Perfect! It was the Maybe we should add this to the project readme (if it isn't already there)? |
Definitely. Are you willing to send a pull request for it? |
Can do! Do you think we should put it into |
Yes and yes. |
Any update on this, please? |
Slowly working its way up the list to get done -- do you want it done sooner rather than later? |
Don't hurry, I just wanted to remind it. It's good you're slowly, but surely getting to it. |
Hope to look at this tonight (famous last words!). |
Is there an easy way to reproduce this:
? The passes that start with EDIT what I mean is: given a file, is there a way to reproduce the |
Okay, I have things sketched out in a small Python script:
There's more here than what's necessary for An example, auto-generated interestingness test looks like this: #!/bin/bash
set -eu
clang_delta="/home/avj/clones/cvise/master/build/clang_delta/clang_delta"
pass_name="lift-assignment-expr"
pass_no="1"
cc="g++-7"
cflags="-I. -m64 -std=c++14 -c -Wall -Wextra -Werror -Wno-deprecated-declarations -Wno-unused-parameter -Wno-unused-variable -Wno-literal-suffix -Wno-noexcept-type"
file="unit.cpp"
$cc $cflags $file 1>/dev/null 2>&1
ret=0
{ ${clang_delta} --transformation=${pass_name} --counter=${pass_no} ${file} 2>&1; } 1>log.txt 2>&1 || ret=$?
if [ $ret -eq 0 ]; then
exit 1
fi
message='clang_delta: /usr/include/llvm/Support/Casting.h:104: static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = clang::AttributedStmt; From = clang::Stmt]: Assertion `Val && "isa<> used on a null pointer"'"'"' failed.'
fgrep "${message}" log.txt 1>/dev/null 2>&1
exit 0
# EOF The use of a sub-shell is very useful when #!/bin/bash
set -eu
clang_delta="/home/avj/clones/cvise/master/build/clang_delta/clang_delta"
pass_name="aggregate-to-scalar"
pass_no="5"
cc="g++-7"
cflags="-I. -m64 -std=c++14 -c -Wall -Wextra -Werror -Wno-deprecated-declarations -Wno-unused-parameter -Wno-unused-variable -Wno-literal-suffix -Wno-noexcept-type"
file="unit.cpp"
$cc $cflags $file 1>/dev/null 2>&1
ret=0
{ ${clang_delta} --transformation=${pass_name} --counter=${pass_no} ${file} 2>&1; } 1>log.txt 2>&1 || ret=$?
if [ $ret -ne 139 ]; then
exit 1
fi
fgrep "Segmentation fault" log.txt 1>/dev/null 2>&1
exit 0
# EOF I'll try to get this wrapped-up in a PR soon -- I'm now testing it on my 11 "unique" |
... and then, you start to reduce your "bad" files, and you find more cvise bugs while cvising the original ones 🙈 |
I changed the auto-generated interestingness test so it now looks like this: #!/bin/bash
set -eu
clang_delta="/home/avj/clones/cvise/master/build/clang_delta/clang_delta"
pass_name="lift-assignment-expr"
max_passes="1"
cc="g++-7"
cflags="-I. -m64 -std=c++14 -c -Wall -Wextra -Werror -Wno-deprecated-declarations -Wno-unused-parameter -Wno-unused-variable -Wno-literal-suffix -Wno-noexcept-type"
file="unit.cpp"
$cc $cflags $file 1>/dev/null 2>&1
found=1
message='clang_delta: /usr/include/llvm/Support/Casting.h:104: static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = clang::AttributedStmt; From = clang::Stmt]: Assertion `Val && "isa<> used on a null pointer"'"'"' failed.'
for pass_no in $(seq 1 ${max_passes}); do
ret=0
{ ${clang_delta} --transformation=${pass_name} --counter=${pass_no} ${file} 2>&1; } 1>log.txt 2>&1 || ret=$?
if [ $ret -eq 0 ]; then
continue
fi
ret=0
fgrep "${message}" log.txt 1>/dev/null 2>&1 || ret=$?
if [ $ret -ne 0 ]; then
continue
fi
found=0
break
done
exit $found
# EOF The reason for this change is that I wanted the pass count to potentially "get lower", rather than being fixed at what it was originally. The new template hunts for the bug at any pass number (limited to the original pass number); I've used a hard-coded the max passes (vs. using |
Thank you very much for the testing effort, I would expect quite some cvise crashes for various inputs. |
Apologies that I was quite noisy on this thread, one question at a time ... how can I manually re-run |
Sorry. Well, it's not so easy, but you can call cvise |
And you can also lower |
Right now, I'm unable to share my example for Let me see what I can do about reducing it ... |
I've been cvising some C++14 code recently, and ended-up with quite a few
cvise_bug_*
folders (38 currently).Is there a way for me to
cvise
these failures?Basically, what I'm asking is this: if I see
in
PASS_BUG_INFO.TXT
, is it possible for me to:? If so, then I can cvise the inputs to provide reduced failures.
Sadly, I can't share the original files as-is, because they're proprietary code; if I could
cvise
then, I can probably make files I can share.The text was updated successfully, but these errors were encountered: