Skip to content

Commit

Permalink
Release of v0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeac committed Oct 11, 2019
2 parents c7cc1fc + 5435d55 commit d4d9aea
Show file tree
Hide file tree
Showing 64 changed files with 533 additions and 643 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ matrix:
osx_image: xcode10
install:
before_script:
- HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install qt capstone bison flex ccache
- HOMEBREW_NO_INSTALL_CLEANUP=1 brew install qt capstone bison flex ccache
- mkdir build && cd build
script:
- cmake -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5/ -DFLEX_EXECUTABLE=$(brew --prefix flex)/bin/flex -DBISON_EXECUTABLE=$(brew --prefix bison)/bin/bison -DBOOMERANG_BUILD_UNIT_TESTS=ON ..
Expand Down
17 changes: 17 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
v0.5.1 (2019-10-11)
-----------------------
- Fixed: Possible crash when replacing Phi by Assign.
- Fixed: Possible crash when analyzing binaries with a large number of debug information on Windows.
- Fixed: Wrong decompilation of binaries containing a `bswap` instruction.
- Fixed: Wrong decompilation of binaries containing an `xadd` instruction in some cases.
- Fixed: Non-deterministic decompilation of functions containing removable return values.
- Fixed: Non-deterministic order of case labels in some cases.
- Fixed: Zero return value of boomerang-cli when command-line switch processing fails.
- Fixed: Missing semantics for 16-bit `cmovCC`-type instructions.
- Fixed: Missing semantics for `cmpxchg` and `cmpxchg8b` instructions.
- Feature: Added '--log-level' switch to change log verbosity on startup.
- Removed: Deprecated '-ds' switch.
- Removed: Deprecated '-pa' switch.
- Removed: Deprecated '-X' switch.
- Technical: Updated minimum required version of dependencies.

v0.5.0 (2019-7-11)
------------------
- Fixed: Crashes when reading malformed SSL specification files.
Expand Down
8 changes: 4 additions & 4 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ it is currently recommended to build the development version (`develop` branch)

- A 64 bit operating system (32 bit might or might not work, but it is not supported.)
- A C++17 compiler (GCC 7+, Clang 6+, MSVC 2017+ are known to work)
- [CMake](https://cmake.org/download/) 3.8+
- [Qt5](https://www.qt.io/download-open-source/) (Qt 5.11+ is known to work, earlier versions should also work)
- [Capstone](http://www.capstone-engine.org/) 3.0.5+
- [GNU bison](https://www.gnu.org/software/bison/) 3.0+ (3.0.5+ is recommended)
- [CMake](https://cmake.org/download/) 3.13+
- [Qt5](https://www.qt.io/download-open-source/) (Qt 5.12+ is known to work, earlier versions should also work)
- [Capstone](http://www.capstone-engine.org/) 4.0.1+
- [GNU bison](https://www.gnu.org/software/bison/) 3.3+
- [GNU flex](https://github.com/westes/flex) 2.6+
- [CCache](https://ccache.samba.org/download.html) 3.2+ (optional, for recompilation speed)
- [Doxygen](http://www.doxygen.nl/) 1.8+ (optional, for documentation)
Expand Down
6 changes: 0 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ init:
- cmd: cmake --version
- cmd: msbuild /version

install:
- cd C:\Tools\vcpkg
- git fetch
- git checkout 06d5d393b962604ae0a0f8fa6cfd1a89d0627e83
- cd %APPVEYOR_BUILD_FOLDER%

before_build:
- ps: cd C:\projects\boomerang
- ps: mkdir build
Expand Down
8 changes: 2 additions & 6 deletions cmake-scripts/boomerang-dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ if (Qt5_FOUND)
endif (Qt5_FOUND)

find_package(Threads)
find_package(Capstone 3.0.5 REQUIRED)
find_package(Capstone 4.0.1 REQUIRED)

find_package(FLEX 2.6 REQUIRED)
find_package(BISON 3.0 REQUIRED)

if (BISON_VERSION VERSION_LESS 3.0.5)
message(WARNING "It is recommended to use Bison 3.0.5 or later")
endif ()
find_package(BISON 3.3 REQUIRED)
2 changes: 1 addition & 1 deletion cmake-scripts/boomerang-utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include(CMakeParseArguments)

#
# Copy the Debug and Release DLL(s) for an IMPORTED target to the output directory on Windows
# Example: BOOMERANG_COPY_IMPORTED_DLL(Qt5::Core)
# Example: BOOMERANG_COPY_IMPORTED_DLL(boomerang Qt5::Core)
#
function(BOOMERANG_COPY_IMPORTED_DLL TargetName ImportedName)
if (MSVC)
Expand Down
129 changes: 122 additions & 7 deletions data/ssl/x86.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ AND.rm64.reg64 dest, src
# BSWAP
BSWAP.reg16 dest
*16* dest := ((dest & 0x00FF) << 8) |
((dest & 0xFF00) > 8)
((dest & 0xFF00) >> 8)
;


Expand Down Expand Up @@ -1262,87 +1262,143 @@ CMC


# CMOVcc
CMOVA.reg16.reg16 dest, src *16* dest := [(~%CF && ~%ZF) ? src : dest];
CMOVA.reg16.rm16 dest, src *16* dest := [(~%CF && ~%ZF) ? src : dest];
CMOVA.reg32.reg32 dest, src *32* dest := [(~%CF && ~%ZF) ? src : dest];
CMOVA.reg32.rm32 dest, src *32* dest := [(~%CF && ~%ZF) ? src : dest];

CMOVAE.reg16.reg16 dest, src *16* dest := [(%CF = 0) ? src : dest];
CMOVAE.reg16.rm16 dest, src *16* dest := [(%CF = 0) ? src : dest];
CMOVAE.reg32.reg32 dest, src *32* dest := [(%CF = 0) ? src : dest];
CMOVAE.reg32.rm32 dest, src *32* dest := [(%CF = 0) ? src : dest];

CMOVB.reg16.reg16 dest, src *16* dest := [(%CF = 1) ? src : dest];
CMOVB.reg16.rm16 dest, src *16* dest := [(%CF = 1) ? src : dest];
CMOVB.reg32.reg32 dest, src *32* dest := [(%CF = 1) ? src : dest];
CMOVB.reg32.rm32 dest, src *32* dest := [(%CF = 1) ? src : dest];

CMOVBE.reg16.reg16 dest, src *16* dest := [(%CF || %ZF) ? src : dest];
CMOVBE.reg16.rm16 dest, src *16* dest := [(%CF || %ZF) ? src : dest];
CMOVBE.reg32.reg32 dest, src *32* dest := [(%CF || %ZF) ? src : dest];
CMOVBE.reg32.rm32 dest, src *32* dest := [(%CF || %ZF) ? src : dest];

CMOVC.reg16.reg16 dest, src *16* dest := [(%CF = 1) ? src : dest];
CMOVC.reg16.rm16 dest, src *16* dest := [(%CF = 1) ? src : dest];
CMOVC.reg32.reg32 dest, src *32* dest := [(%CF = 1) ? src : dest];
CMOVC.reg32.rm32 dest, src *32* dest := [(%CF = 1) ? src : dest];

CMOVE.reg16.reg16 dest, src *16* dest := [(%ZF = 1) ? src : dest];
CMOVE.reg16.rm16 dest, src *16* dest := [(%ZF = 1) ? src : dest];
CMOVE.reg32.reg32 dest, src *32* dest := [(%ZF = 1) ? src : dest];
CMOVE.reg32.rm32 dest, src *32* dest := [(%ZF = 1) ? src : dest];

CMOVG.reg16.reg16 dest, src *16* dest := [(~%ZF && ~(%SF ^ %OF)) ? src : dest];
CMOVG.reg16.rm16 dest, src *16* dest := [(~%ZF && ~(%SF ^ %OF)) ? src : dest];
CMOVG.reg32.reg32 dest, src *32* dest := [(~%ZF && ~(%SF ^ %OF)) ? src : dest];
CMOVG.reg32.rm32 dest, src *32* dest := [(~%ZF && ~(%SF ^ %OF)) ? src : dest];

CMOVGE.reg16.reg16 dest, src *16* dest := [(~(%SF ^ %OF)) ? src : dest];
CMOVGE.reg16.rm16 dest, src *16* dest := [(~(%SF ^ %OF)) ? src : dest];
CMOVGE.reg32.reg32 dest, src *32* dest := [(~(%SF ^ %OF)) ? src : dest];
CMOVGE.reg32.rm32 dest, src *32* dest := [(~(%SF ^ %OF)) ? src : dest];

CMOVL.reg16.reg16 dest, src *16* dest := [(%SF ^ %OF) ? src : dest];
CMOVL.reg16.rm16 dest, src *16* dest := [(%SF ^ %OF) ? src : dest];
CMOVL.reg32.reg32 dest, src *32* dest := [(%SF ^ %OF) ? src : dest];
CMOVL.reg32.rm32 dest, src *32* dest := [(%SF ^ %OF) ? src : dest];

CMOVLE.reg16.reg16 dest, src *16* dest := [(%ZF || (%SF ^ %OF)) ? src : dest];
CMOVLE.reg16.rm16 dest, src *16* dest := [(%ZF || (%SF ^ %OF)) ? src : dest];
CMOVLE.reg32.reg32 dest, src *32* dest := [(%ZF || (%SF ^ %OF)) ? src : dest];
CMOVLE.reg32.rm32 dest, src *32* dest := [(%ZF || (%SF ^ %OF)) ? src : dest];

CMOVNA.reg16.reg16 dest, src *16* dest := [(%CF || %ZF) ? src : dest];
CMOVNA.reg16.rm16 dest, src *16* dest := [(%CF || %ZF) ? src : dest];
CMOVNA.reg32.reg32 dest, src *32* dest := [(%CF || %ZF) ? src : dest];
CMOVNA.reg32.rm32 dest, src *32* dest := [(%CF || %ZF) ? src : dest];

CMOVNAE.reg16.reg16 dest, src *16* dest := [(%CF = 1) ? src : dest];
CMOVNAE.reg16.rm16 dest, src *16* dest := [(%CF = 1) ? src : dest];
CMOVNAE.reg32.reg32 dest, src *32* dest := [(%CF = 1) ? src : dest];
CMOVNAE.reg32.rm32 dest, src *32* dest := [(%CF = 1) ? src : dest];

CMOVNB.reg16.reg16 dest, src *16* dest := [(%CF = 0) ? src : dest];
CMOVNB.reg16.rm16 dest, src *16* dest := [(%CF = 0) ? src : dest];
CMOVNB.reg32.reg32 dest, src *32* dest := [(%CF = 0) ? src : dest];
CMOVNB.reg32.rm32 dest, src *32* dest := [(%CF = 0) ? src : dest];

CMOVNBE.reg16.reg16 dest, src *16* dest := [(~%CF && ~%ZF) ? src : dest];
CMOVNBE.reg16.rm16 dest, src *16* dest := [(~%CF && ~%ZF) ? src : dest];
CMOVNBE.reg32.reg32 dest, src *32* dest := [(~%CF && ~%ZF) ? src : dest];
CMOVNBE.reg32.rm32 dest, src *32* dest := [(~%CF && ~%ZF) ? src : dest];

CMOVNC.reg16.reg16 dest, src *16* dest := [(%CF = 0) ? src : dest];
CMOVNC.reg16.rm16 dest, src *16* dest := [(%CF = 0) ? src : dest];
CMOVNC.reg32.reg32 dest, src *32* dest := [(%CF = 0) ? src : dest];
CMOVNC.reg32.rm32 dest, src *32* dest := [(%CF = 0) ? src : dest];

CMOVNE.reg16.reg16 dest, src *16* dest := [(%ZF = 0) ? src : dest];
CMOVNE.reg16.rm16 dest, src *16* dest := [(%ZF = 0) ? src : dest];
CMOVNE.reg32.reg32 dest, src *32* dest := [(%ZF = 0) ? src : dest];
CMOVNE.reg32.rm32 dest, src *32* dest := [(%ZF = 0) ? src : dest];

CMOVNG.reg16.reg16 dest, src *16* dest := [(%ZF || (%SF ^ %OF)) ? src : dest];
CMOVNG.reg16.rm16 dest, src *16* dest := [(%ZF || (%SF ^ %OF)) ? src : dest];
CMOVNG.reg32.reg32 dest, src *32* dest := [(%ZF || (%SF ^ %OF)) ? src : dest];
CMOVNG.reg32.rm32 dest, src *32* dest := [(%ZF || (%SF ^ %OF)) ? src : dest];

CMOVNGE.reg16.reg16 dest, src *16* dest := [(~%ZF && ~(%SF ^ %OF)) ? src : dest];
CMOVNGE.reg16.rm16 dest, src *16* dest := [(~%ZF && ~(%SF ^ %OF)) ? src : dest];
CMOVNGE.reg32.reg32 dest, src *32* dest := [(~%ZF && ~(%SF ^ %OF)) ? src : dest];
CMOVNGE.reg32.rm32 dest, src *32* dest := [(~%ZF && ~(%SF ^ %OF)) ? src : dest];

CMOVNL.reg16.reg16 dest, src *16* dest := [(~(%SF ^ %OF)) ? src : dest];
CMOVNL.reg16.rm16 dest, src *16* dest := [(~(%SF ^ %OF)) ? src : dest];
CMOVNL.reg32.reg32 dest, src *32* dest := [(~(%SF ^ %OF)) ? src : dest];
CMOVNL.reg32.rm32 dest, src *32* dest := [(~(%SF ^ %OF)) ? src : dest];

CMOVNLE.reg16.reg16 dest, src *16* dest := [(~%ZF && ~(%SF ^ %OF)) ? src : dest];
CMOVNLE.reg16.rm16 dest, src *16* dest := [(~%ZF && ~(%SF ^ %OF)) ? src : dest];
CMOVNLE.reg32.reg32 dest, src *32* dest := [(~%ZF && ~(%SF ^ %OF)) ? src : dest];
CMOVNLE.reg32.rm32 dest, src *32* dest := [(~%ZF && ~(%SF ^ %OF)) ? src : dest];

CMOVNO.reg16.reg16 dest, src *16* dest := [(~%OF) ? src : dest];
CMOVNO.reg16.rm16 dest, src *16* dest := [(~%OF) ? src : dest];
CMOVNO.reg32.reg32 dest, src *32* dest := [(~%OF) ? src : dest];
CMOVNO.reg32.rm32 dest, src *32* dest := [(~%OF) ? src : dest];

CMOVNP.reg16.reg16 dest, src *16* dest := [(~%PF) ? src : dest];
CMOVNP.reg16.rm16 dest, src *16* dest := [(~%PF) ? src : dest];
CMOVNP.reg32.reg32 dest, src *32* dest := [(~%PF) ? src : dest];
CMOVNP.reg32.rm32 dest, src *32* dest := [(~%PF) ? src : dest];

CMOVNS.reg16.reg16 dest, src *16* dest := [(~%SF) ? src : dest];
CMOVNS.reg16.rm16 dest, src *16* dest := [(~%SF) ? src : dest];
CMOVNS.reg32.reg32 dest, src *32* dest := [(~%SF) ? src : dest];
CMOVNS.reg32.rm32 dest, src *32* dest := [(~%SF) ? src : dest];

CMOVNZ.reg16.reg16 dest, src *16* dest := [(~%ZF) ? src : dest];
CMOVNZ.reg16.rm16 dest, src *16* dest := [(~%ZF) ? src : dest];
CMOVNZ.reg32.reg32 dest, src *32* dest := [(~%ZF) ? src : dest];
CMOVNZ.reg32.rm32 dest, src *32* dest := [(~%ZF) ? src : dest];

CMOVO.reg16.reg16 dest, src *16* dest := [(%OF) ? src : dest];
CMOVO.reg16.rm16 dest, src *16* dest := [(%OF) ? src : dest];
CMOVO.reg32.reg32 dest, src *32* dest := [(%OF) ? src : dest];
CMOVO.reg32.rm32 dest, src *32* dest := [(%OF) ? src : dest];

CMOVP.reg16.reg16 dest, src *16* dest := [(%PF) ? src : dest];
CMOVP.reg16.rm16 dest, src *16* dest := [(%PF) ? src : dest];
CMOVP.reg32.reg32 dest, src *32* dest := [(%PF) ? src : dest];
CMOVP.reg32.rm32 dest, src *32* dest := [(%PF) ? src : dest];

CMOVS.reg16.reg16 dest, src *16* dest := [(%SF) ? src : dest];
CMOVS.reg16.rm16 dest, src *16* dest := [(%SF) ? src : dest];
CMOVS.reg32.reg32 dest, src *32* dest := [(%SF) ? src : dest];
CMOVS.reg32.rm32 dest, src *32* dest := [(%SF) ? src : dest];

CMOVZ.reg16.reg16 dest, src *16* dest := [(%ZF) ? src : dest];
CMOVZ.reg16.rm16 dest, src *16* dest := [(%ZF) ? src : dest];
CMOVZ.reg32.reg32 dest, src *32* dest := [(%ZF) ? src : dest];
CMOVZ.reg32.rm32 dest, src *32* dest := [(%ZF) ? src : dest];

Expand Down Expand Up @@ -1465,13 +1521,40 @@ CMP.rm64.reg64 lhs, rhs


# CMPXCHG
CMPXCHG.reg8.reg8 dest, src
*1* %ZF := %al = dest
*8* %ZF = 1 => dest := src
*8* %ZF = 0 => %al := dest
;

CMPXCHG.reg16.reg16 dest, src
*1* %ZF := %ax = dest
*16* %ZF = 1 => dest := src
*16* %ZF = 0 => %ax := dest
;

CMPXCHG.reg32.reg32 dest, src
*1* %ZF := %eax = dest
*32* %ZF = 1 => dest := src
*32* %ZF = 0 => %eax := dest
;

CMPXCHG.rm32.reg32 dest, src
*1* %ZF := %eax = dest
*32* %ZF = 1 => dest := src
*32* %ZF = 0 => %eax := dest
;


# CMPXCHG8B
CMPXCHG8B.rm64 dest
*1* %ZF := (dest@[0:31] = %eax) && (dest@[32:63] = %edx)
*64* %ZF = 1 => dest := %ebx | %ecx << 32
*32* %ZF = 0 => %eax := dest@[0:31]
*32* %ZF = 0 => %edx := dest@[32:63]
;


# CWD
CWD
*16* %dx := [%ax@[15:15] = 0 ? 0:0xFFFF]
Expand Down Expand Up @@ -4116,28 +4199,60 @@ WAIT


# XADD
XADD.reg8.reg8 dest, src
*8* tmp_src := src
*8* tmpb := src + dest
*8* src := dest
*8* dest := tmpb
ADDFLAGS8(tmp_src, src, dest)
;

XADD.rm8.reg8 dest, src
*8* tmp_src := src
*8* tmpb := src + dest
*8* src := dest
*8* dest := tmpb
ADDFLAGS8(tmp_src, src, dest)
;

XADD.reg16.reg16 dest, src
*16* tmp_src := src
*16* tmph := src + dest
*16* src := dest
*16* dest := tmph
ADDFLAGS16(tmp_src, src, dest)
;

XADD.rm16.reg16 dest, src
*16* tmp_src := src
*16* tmph := src + dest
*16* src := dest
*16* dest := tmph
ADDFLAGS16(tmp_src, src, dest)
;

XADD.reg32.reg32 dest, src
*32* tmp_src := src
*32* tmp1 := src + dest
*32* src := dest
*32* dest := tmp1
ADDFLAGS32(tmp_src, src, dest)
;

XADD.rm32.reg32 dest, src
*8* tmp1 := src + dest
*8* src := dest
*8* dest := tmp1
*32* tmp_src := src
*32* tmp1 := src + dest
*32* src := dest
*32* dest := tmp1
ADDFLAGS32(tmp_src, src, dest)
;

XADD.rm64.reg64 dest, src
*8* tmp1 := src + dest
*8* src := dest
*8* dest := tmp1
*64* tmp_src := src
*64* tmp1 := src + dest
*64* src := dest
*64* dest := tmp1
ADDFLAGS64(tmp_src, src, dest)
;


Expand Down
6 changes: 3 additions & 3 deletions scripts/appveyor-generate.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

$QT_VERSION="5.11"
$QT_VERSION="5.12"

if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") {
$CMAKE_GENERATOR_NAME = "Visual Studio 15 2017 Win64"
Expand All @@ -11,13 +11,13 @@ $env:QTDIR = "$QT_BASE_DIR"
# Install flex + bison via winflexbison
if (!(Test-Path winflexbison.zip)) {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
if (Invoke-WebRequest -Uri https://github.com/lexxmark/winflexbison/releases/download/v2.5.16/winflexbison-2.5.16.zip -OutFile winflexbison.zip) {
if (Invoke-WebRequest -Uri https://github.com/lexxmark/winflexbison/releases/download/v2.5.18/win_flex_bison-2.5.18.zip -OutFile winflexbison.zip) {
Write-Output "Could not download winflexbison"
exit 1
}
}

$expectedhash = "223CEBAAD0E1AF63A04F5C71F578AFB9C2233C09B5D69EA78C63F810EBD1364B"
$expectedhash = "095CF65CB3F12EE5888022F93109ACBE6264E5F18F6FFCE0BDA77FEB31B65BD8"
$actualhash = (Get-FileHash -Algorithm "SHA256" winflexbison.zip).hash

if ($actualhash -ne $expectedhash) {
Expand Down
1 change: 0 additions & 1 deletion src/boomerang-cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ set(boomerang-cli-sources
Console
CommandlineDriver
Main
MiniDebugger
)

BOOMERANG_LIST_APPEND_FOREACH(boomerang-cli-sources ".cpp")
Expand Down
Loading

0 comments on commit d4d9aea

Please sign in to comment.