Skip to content
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

Current README instruction lead to build failure when building mutated LLVM #8

Open
JonathanFoo0523 opened this issue Jul 30, 2024 · 1 comment

Comments

@JonathanFoo0523
Copy link
Collaborator

The current README instructions, even after addressing the absolute path issue in the Dredd script (issue #7) and ensuring that the LLVM version described in the README is used to build Dredd and LLVM, still result in the following compilation errors:

/home/ubuntu/llvm-17.0.4-mutant-tracking/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:1616:341: error: reference to local binding 'ICmp' declared in enclosing function 'llvm::InstCombinerImpl::foldAllocaCmp'

A minimal reproducible example of this error can be shown by applying dredd to

#include <tuple>
int bar();


int foo(bool isAnd) {
    auto [someInt, someMask] = std::pair<int, int>(1, 2);
    unsigned CombinedMask = someMask & bar();
    return 0;
}

which introduces a lambda of the form:

[&]() -> { ... someMask ...}

and causes

error: reference to local binding 'someMask' declared in enclosing function 'foo`

when compiling with clang-15, which is explicitly stated in the README instruction.

@JonathanFoo0523
Copy link
Collaborator Author

I will implement a workaround by specifying both build to make use of compiler in dredd/third-party/clang+llvm/bin, instead of clang-15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant