csmith-project / creduce

C-Reduce, a C and C++ program reducer
Other
1.25k stars 123 forks source link

Assertion failure with `param-to-local` #235

Closed aytey closed 2 years ago

aytey commented 3 years ago

As reported in https://github.com/marxin/cvise/issues/57

For:

clang_delta --version
clang_delta 2.11.0
Git version: 3e1f5a1

(that is, I'm using the llvm-11.0 branch of creduce)

with:

llvm-config --version
11.0.1

and on the following file:

struct a {
  a(a &b) = default;
};

we get:

clang_delta --transformation=param-to-local --counter=1 57.cpp
clang_delta: RewriteUtils.cpp:758: bool RewriteUtils::addLocalVarToFunc(const string&, clang::FunctionDecl*): Assertion `Body && "NULL body for a function definition!"' failed.
[1]    62299 IOT instruction (core dumped)  ../clang_delta --transformation=param-to-local --counter=1 57.cpp
chenyang78 commented 2 years ago

Fixed in commit c2b9967. Thank you for reporting the issue, @andrewvaughanj !