Skip to content

Commit

Permalink
Update tools to latest versions (#756)
Browse files Browse the repository at this point in the history
rellic:
* Updated to latest `master` commit
* Remove `|| true` to make sure tests stay passing

remill:
* Updated to latest `master` commit
* Updated vcpkg portfile to latest released version 4.0.24
* Allow failure of tests on aarch64. See lifting-bits/remill#518

anvill:
* Updated to latest `master` commit
* Add other submodule for anvill version compatible with mcsema
* Don't install Python3 components since we don't test them

mcsema:
* Updated to latest `master` commit
* Add pinned anvill version submodule
* Add two smoketests
* Allow failure for `x86` smoketest on aarch64 host. See lifting-bits/mcsema#753
  • Loading branch information
ekilmer committed May 27, 2021
1 parent d9417f2 commit bda1e09
Show file tree
Hide file tree
Showing 12 changed files with 129 additions and 25 deletions.
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ updates:
directory: "/"
schedule:
interval: "weekly"
ignore:
# McSema has a pinned version of anvill
- dependency-name: "anvill-mcsema"
52 changes: 45 additions & 7 deletions .github/workflows/vcpkg_ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- uses: actions/checkout@v2.3.4
with:
submodules: true
submodules: recursive

- name: Read vcpkg Info
id: vcpkg_info
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
@dependencies.txt
- name: 'Export Packages'
if: contains(github.event.head_commit.message, 'debug artifacts') || github.event.release
if: contains(env.COMMIT_MESSAGE, 'debug artifacts') || github.event.release
shell: 'bash'
run: |
apt-get update
Expand All @@ -150,7 +150,7 @@ jobs:
./emit_artifacts.sh ${{ env.ARTIFACT_NAME }}
- uses: actions/upload-artifact@v2.2.3
if: "contains(github.event.head_commit.message, 'debug artifacts')"
if: contains(env.COMMIT_MESSAGE, 'debug artifacts') || github.event.release
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ARTIFACT_NAME }}
Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
..
cmake --build .
cmake --build . --target install
../scripts/roundtrip.py ./tools/rellic-decomp-* ../tests/tools/decomp "${VCPKG_ROOT}/installed/${{ matrix.host.triplet }}/tools/${{ matrix.llvm }}/clang" || true
../scripts/roundtrip.py ./tools/rellic-decomp-* ../tests/tools/decomp "${VCPKG_ROOT}/installed/${{ matrix.host.triplet }}/tools/llvm/clang"
- name: 'Test remill build'
shell: 'bash'
Expand All @@ -226,7 +226,13 @@ jobs:
cmake --build .
cmake --build . --target install
cmake --build . --target test_dependencies
env CTEST_OUTPUT_ON_FAILURE=1 cmake --build . --target test || true
# See issue https://github.com/lifting-bits/remill/issues/518 for
# failing aarch64 tests
if [ ${{ matrix.host.arch }} == "arm64" ] ; then
env CTEST_OUTPUT_ON_FAILURE=1 cmake --build . --target test || true
else
env CTEST_OUTPUT_ON_FAILURE=1 cmake --build . --target test
fi
# Only for LLVM-11 right now...
- name: 'Anvill build - vcpkg remill'
Expand All @@ -240,6 +246,7 @@ jobs:
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DVCPKG_ROOT="${VCPKG_ROOT}" \
-DANVILL_ENABLE_INSTALL_TARGET=ON \
-DANVILL_ENABLE_PYTHON3_LIBS=OFF \
-DCMAKE_INSTALL_PREFIX="$(pwd)/install" \
..
cmake --build .
Expand All @@ -256,6 +263,26 @@ jobs:
cmake -G Ninja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX="$(pwd)/install" \
-DVCPKG_ROOT="${VCPKG_ROOT}" \
-DANVILL_ENABLE_INSTALL_TARGET=ON \
-DANVILL_ENABLE_PYTHON3_LIBS=OFF \
-Dremill_DIR="$(pwd)/../../remill/build/install/lib/cmake/remill" \
..
cmake --build .
cmake --build . --target install
./install/bin/anvill-decompile-json-* -spec ../tools/decompile-json/tests/specs/ret0.json -bc_out ./ret0.bc -ir_out ret0.ir
- name: 'Anvill-McSema build - custom remill'
shell: 'bash'
if: ${{ matrix.llvm != 'llvm-12' }}
run: |
cd anvill-mcsema
rm -rf build
mkdir -p build && cd build
cmake -G Ninja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX="$(pwd)/install" \
-DVCPKG_ROOT="${VCPKG_ROOT}" \
-DANVILL_ENABLE_INSTALL_TARGET=ON \
-Dremill_DIR="$(pwd)/../../remill/build/install/lib/cmake/remill" \
..
Expand All @@ -265,20 +292,31 @@ jobs:
- name: 'Test mcsema build'
shell: 'bash'
if: ${{ matrix.llvm == 'llvm-11' }}
if: ${{ matrix.llvm != 'llvm-12' }}
run: |
cd mcsema
rm -rf build
mkdir -p build && cd build
cmake -G Ninja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX="$(pwd)/install" \
-DVCPKG_ROOT="${VCPKG_ROOT}" \
-Dremill_DIR="$(pwd)/../../remill/build/install/lib/cmake/remill" \
-Danvill_DIR="$(pwd)/../../anvill/build/install/lib/cmake/anvill" \
-Danvill_DIR="$(pwd)/../../anvill-mcsema/build/install/lib/cmake/anvill" \
..
cmake --build .
cmake --build . --target install
./install/bin/mcsema-lift-* --version
./install/bin/mcsema-lift-* --arch amd64 --os linux --cfg ../tests/test_suite_generator/generated/prebuilt_cfg/amd64/linux/cfg/hello_world --output hello_world.bc
# See https://github.com/lifting-bits/mcsema/issues/753
if [ ${{ matrix.host.arch }} == "arm64" ] ; then
./install/bin/mcsema-lift-* --arch x86 --os linux --cfg ../tests/test_suite_generator/generated/prebuilt_cfg/x86/linux/cfg/hello_world --output hello_world.bc || true
else
./install/bin/mcsema-lift-* --arch x86 --os linux --cfg ../tests/test_suite_generator/generated/prebuilt_cfg/x86/linux/cfg/hello_world --output hello_world.bc
fi
- name: Publish Release Assets
if: |
github.event.release
Expand Down
38 changes: 32 additions & 6 deletions .github/workflows/vcpkg_ci_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- uses: actions/checkout@v2.3.4
with:
submodules: true
submodules: recursive

- uses: actions/setup-dotnet@v1.8.0
with:
Expand Down Expand Up @@ -111,14 +111,14 @@ jobs:
@dependencies.txt
- name: 'Export Packages'
if: contains(github.event.head_commit.message, 'debug artifacts') || github.event.release
if: contains(env.COMMIT_MESSAGE, 'debug artifacts') || github.event.release
shell: 'bash'
run: |
brew install pixz
./emit_artifacts.sh ${{ env.ARTIFACT_NAME }}
- uses: actions/upload-artifact@v2.2.3
if: "contains(github.event.head_commit.message, 'debug artifacts')"
if: contains(env.COMMIT_MESSAGE, 'debug artifacts') || github.event.release
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ARTIFACT_NAME }}
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
..
cmake --build .
cmake --build . --target install
../scripts/roundtrip.py ./tools/rellic-decomp-* ../tests/tools/decomp "${VCPKG_ROOT}/installed/${TRIPLET}/tools/${{ matrix.llvm }}/clang" || true
../scripts/roundtrip.py ./tools/rellic-decomp-* ../tests/tools/decomp "${VCPKG_ROOT}/installed/${TRIPLET}/tools/llvm/clang"
- name: 'Test remill build'
shell: 'bash'
Expand All @@ -192,6 +192,7 @@ jobs:
cmake --build .
cmake --build . --target install
cmake --build . --target test_dependencies
# Sometimes fails on a flaky test
env CTEST_OUTPUT_ON_FAILURE=1 cmake --build . --target test || true
- name: 'Anvill build - vcpkg remill'
Expand All @@ -204,6 +205,7 @@ jobs:
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DVCPKG_ROOT="${VCPKG_ROOT}" \
-DANVILL_ENABLE_INSTALL_TARGET=ON \
-DANVILL_ENABLE_PYTHON3_LIBS=OFF \
-DCMAKE_INSTALL_PREFIX="$(pwd)/install" \
..
cmake --build .
Expand All @@ -219,6 +221,25 @@ jobs:
cmake -G Ninja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX="$(pwd)/install" \
-DVCPKG_ROOT="${VCPKG_ROOT}" \
-DANVILL_ENABLE_INSTALL_TARGET=ON \
-DANVILL_ENABLE_PYTHON3_LIBS=OFF \
-Dremill_DIR="$(pwd)/../../remill/build/install/lib/cmake/remill" \
..
cmake --build .
cmake --build . --target install
./install/bin/anvill-decompile-json-* -spec ../tools/decompile-json/tests/specs/ret0.json -bc_out ./ret0.bc -ir_out ret0.ir
- name: 'Anvill-McSema build - custom remill'
shell: 'bash'
if: ${{ matrix.llvm != 'llvm-12' }}
run: |
cd anvill-mcsema
mkdir -p build && cd build
cmake -G Ninja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX="$(pwd)/install" \
-DVCPKG_ROOT="${VCPKG_ROOT}" \
-DANVILL_ENABLE_INSTALL_TARGET=ON \
-Dremill_DIR="$(pwd)/../../remill/build/install/lib/cmake/remill" \
..
Expand All @@ -228,19 +249,24 @@ jobs:
- name: 'Test mcsema build'
shell: 'bash'
if: ${{ matrix.llvm == 'llvm-11' }}
if: ${{ matrix.llvm != 'llvm-12' }}
run: |
cd mcsema
mkdir -p build && cd build
cmake -G Ninja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX="$(pwd)/install" \
-DVCPKG_ROOT="${VCPKG_ROOT}" \
-Dremill_DIR="$(pwd)/../../remill/build/install/lib/cmake/remill" \
-Danvill_DIR="$(pwd)/../../anvill/build/install/lib/cmake/anvill" \
-Danvill_DIR="$(pwd)/../../anvill-mcsema/build/install/lib/cmake/anvill" \
..
cmake --build .
cmake --build . --target install
./install/bin/mcsema-lift-* --version
./install/bin/mcsema-lift-* --arch amd64 --os linux --cfg ../tests/test_suite_generator/generated/prebuilt_cfg/amd64/linux/cfg/hello_world --output hello_world.bc
./install/bin/mcsema-lift-* --arch x86 --os linux --cfg ../tests/test_suite_generator/generated/prebuilt_cfg/x86/linux/cfg/hello_world --output hello_world.bc
- name: Publish Release Assets
if: |
github.event.release
Expand Down
34 changes: 30 additions & 4 deletions .github/workflows/vcpkg_ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- uses: actions/checkout@v2.3.4
with:
submodules: true
submodules: recursive

- uses: actions/setup-dotnet@v1.8.0
with:
Expand Down Expand Up @@ -200,8 +200,9 @@ jobs:
# cd build
# cmake -T ClangCl `
# -DCMAKE_VERBOSE_MAKEFILE=ON `
# -DVCPKG_ROOT="${env:VCPKG_ROOT}" `
# -DANVILL_ENABLE_INSTALL_TARGET=ON `
# -DANVILL_INSTALL_PYTHON3_LIBS=OFF `
# -DANVILL_ENABLE_PYTHON3_LIBS=OFF \
# -DVCPKG_ROOT="${env:VCPKG_ROOT}" `
# -DCMAKE_INSTALL_PREFIX="$(pwd)\install" `
# ..
Expand All @@ -219,8 +220,28 @@ jobs:
cmake -T ClangCl `
-DCMAKE_VERBOSE_MAKEFILE=ON `
-DCMAKE_INSTALL_PREFIX="$(pwd)\install" `
-DVCPKG_ROOT="${env:VCPKG_ROOT}" `
-DANVILL_ENABLE_INSTALL_TARGET=ON `
-DANVILL_ENABLE_PYTHON3_LIBS=OFF `
-Dremill_DIR="$(pwd)\..\..\remill\build\install\lib\cmake\remill" `
..
cmake --build . --config Release -j
cmake --build . --config Release --target install
& ( Get-ChildItem install\bin | Where-Object {$_.name -match "anvill-decompile-json-.*.exe"} ) -spec ..\tools\decompile-json\tests\specs\ret0.json -bc_out ret0.bc -ir_out ret0.ir
- name: 'Anvill-McSema build - custom remill'
if: ${{ matrix.llvm == 'llvm-11' }}
run: |
cd anvill-mcsema
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue .\build
New-Item -Path .\build -ItemType Directory
cd build
cmake -T ClangCl `
-DCMAKE_VERBOSE_MAKEFILE=ON `
-DCMAKE_INSTALL_PREFIX="$(pwd)\install" `
-DVCPKG_ROOT="${env:VCPKG_ROOT}" `
-DANVILL_ENABLE_INSTALL_TARGET=ON `
-DANVILL_INSTALL_PYTHON3_LIBS=OFF `
-Dremill_DIR="$(pwd)\..\..\remill\build\install\lib\cmake\remill" `
..
cmake --build . --config Release -j
Expand All @@ -238,14 +259,19 @@ jobs:
cmake -T ClangCl `
-DCMAKE_VERBOSE_MAKEFILE=ON `
-DCMAKE_INSTALL_PREFIX="$(pwd)\install" `
-DVCPKG_ROOT="${env:VCPKG_ROOT}" `
-DMCSEMA_INSTALL_PYTHON2_LIBS=OFF `
-DMCSEMA_INSTALL_PYTHON3_LIBS=OFF `
-Dremill_DIR="$(pwd)\..\..\remill\build\install\lib\cmake\remill" `
-Danvill_DIR="$(pwd)\..\..\anvill\build\install\lib\cmake\anvill" `
-Danvill_DIR="$(pwd)\..\..\anvill-mcsema\build\install\lib\cmake\anvill" `
..
cmake --build . --config Release -j
cmake --build . --config Release --target install
& ( Get-ChildItem install\mcsema\bin | Where-Object {$_.name -match "mcsema-lift-.*.exe"} ) --version
& ( Get-ChildItem install\mcsema\bin | Where-Object {$_.name -match "mcsema-lift-.*.exe"} ) --arch amd64 --os linux --cfg ..\tests\test_suite_generator\generated\prebuilt_cfg\amd64\linux\cfg\hello_world --output hello_world.bc
& ( Get-ChildItem install\mcsema\bin | Where-Object {$_.name -match "mcsema-lift-.*.exe"} ) --arch x86 --os linux --cfg ..\tests\test_suite_generator\generated\prebuilt_cfg\x86\linux\cfg\hello_world --output hello_world.bc
- name: Publish Release Assets
if: |
github.event.release
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@
path = rellic
url = https://github.com/lifting-bits/rellic.git
branch = master
[submodule "anvill-mcsema"]
path = anvill-mcsema
url = https://github.com/lifting-bits/anvill.git
2 changes: 1 addition & 1 deletion anvill
Submodule anvill updated 192 files
1 change: 1 addition & 0 deletions anvill-mcsema
Submodule anvill-mcsema added at bc3183
2 changes: 1 addition & 1 deletion mcsema
5 changes: 2 additions & 3 deletions ports/remill/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO lifting-bits/remill
# Latest commit after v4.0.22 at this time
REF 021b799efc07a38d5f910bb41bdb7e60e4406f23
SHA512 10a33d785be69bda54f08ab9f89ccfd9e71bab632d90541eef2ce1122b1161b690cfb5068ee4ae036152a5ebefe8d53dde7f8bb5f99310f678365e9962a417ff
REF v4.0.24
SHA512 bd1cd52a45174a9f033a490277974fb303dfa8cc4823a51366e9afc31e57d73fb787da98af7efe22675095214a90d14d644714756b8808beec5eb2c648276f82
HEAD_REF master
)

Expand Down
10 changes: 9 additions & 1 deletion ports/remill/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "remill",
"version-string": "4.0.22",
"version-string": "4.0.24",
"description": "Library for lifting of x86, amd64, and aarch64 machine code to LLVM bitcode",
"homepage": "https://github.com/lifting-bits/remill",
"default-features": [
Expand All @@ -24,9 +24,17 @@
"dependencies": [
"llvm-11"
]
},
"llvm-12": {
"description": "Use LLVM 12",
"dependencies": [
"llvm-12"
]
}
},
"dependencies": [
"glog",
"gflags",
"xed"
]
}
2 changes: 1 addition & 1 deletion rellic
Submodule rellic updated 67 files
+7 −11 .github/workflows/ci.yml
+4 −10 .gitignore
+6 −3 .gitmodules
+12 −10 CMakeLists.txt
+1 −1 Dockerfile
+5 −5 README.md
+1 −1 cmake/vcpkg_helper.cmake
+9 −0 libraries/CMakeLists.txt
+12 −0 libraries/doctest/CMakeLists.txt
+1 −0 libraries/doctest/src
+327 −0 rellic/AST/ASTBuilder.cpp
+257 −0 rellic/AST/ASTBuilder.h
+19 −29 rellic/AST/CXXToCDecl.cpp
+14 −15 rellic/AST/CXXToCDecl.h
+4 −12 rellic/AST/Compat/ASTContext.cpp
+4 −12 rellic/AST/Compat/ASTContext.h
+0 −87 rellic/AST/Compat/Expr.cpp
+0 −41 rellic/AST/Compat/Expr.h
+4 −12 rellic/AST/Compat/Mangle.cpp
+4 −12 rellic/AST/Compat/Mangle.h
+4 −12 rellic/AST/Compat/Stmt.cpp
+4 −12 rellic/AST/Compat/Stmt.h
+4 −12 rellic/AST/Compat/Type.h
+15 −22 rellic/AST/CondBasedRefine.cpp
+7 −14 rellic/AST/CondBasedRefine.h
+12 −20 rellic/AST/DeadStmtElim.cpp
+7 −15 rellic/AST/DeadStmtElim.h
+31 −38 rellic/AST/ExprCombine.cpp
+7 −16 rellic/AST/ExprCombine.h
+50 −48 rellic/AST/GenerateAST.cpp
+8 −14 rellic/AST/GenerateAST.h
+135 −328 rellic/AST/IRToASTVisitor.cpp
+8 −13 rellic/AST/IRToASTVisitor.h
+9 −15 rellic/AST/InferenceRule.cpp
+10 −14 rellic/AST/InferenceRule.h
+37 −43 rellic/AST/LoopRefine.cpp
+7 −16 rellic/AST/LoopRefine.h
+14 −21 rellic/AST/NestedCondProp.cpp
+8 −14 rellic/AST/NestedCondProp.h
+14 −22 rellic/AST/NestedScopeCombiner.cpp
+7 −15 rellic/AST/NestedScopeCombiner.h
+16 −23 rellic/AST/ReachBasedRefine.cpp
+7 −15 rellic/AST/ReachBasedRefine.h
+4 −12 rellic/AST/TransformVisitor.h
+5 −282 rellic/AST/Util.cpp
+5 −120 rellic/AST/Util.h
+12 −20 rellic/AST/Z3CondSimplify.cpp
+6 −14 rellic/AST/Z3CondSimplify.h
+188 −229 rellic/AST/Z3ConvVisitor.cpp
+16 −15 rellic/AST/Z3ConvVisitor.h
+4 −12 rellic/BC/Compat/Error.h
+4 −12 rellic/BC/Compat/IRReader.h
+4 −12 rellic/BC/Compat/Value.cpp
+4 −12 rellic/BC/Compat/Value.h
+4 −12 rellic/BC/Compat/Verifier.h
+4 −12 rellic/BC/Util.cpp
+4 −12 rellic/BC/Util.h
+4 −12 rellic/BC/Version.h
+1 −1 rellic/CMakeLists.txt
+6 −12 scripts/build.sh
+10 −0 tests/tools/decomp/float.c
+0 −0 tests/tools/decomp/known-failures/issue_126_bool2bv.c
+22 −30 tools/decomp/Decomp.cpp
+22 −29 tools/headergen/HeaderGen.cpp
+1,239 −0 unittests/AST/ASTBuilder.cpp
+25 −0 unittests/CMakeLists.txt
+10 −0 unittests/UnitTest.cpp
2 changes: 1 addition & 1 deletion remill

0 comments on commit bda1e09

Please sign in to comment.