Giter Club home page Giter Club logo

boomerang's People

Contributors

andrew-aladev avatar arbruijn avatar aszlig avatar ceeac avatar cooloppo avatar gitter-badger avatar greg-szabo avatar hakusdream avatar nemerle avatar powerbf avatar reductor avatar rsaxvc avatar skyripley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boomerang's Issues

Remove conscripts

The code related to conscripts, e.g. Const::m_conscript, ConscriptSetter etc. seem to be unused.
Determine if the code is actually unused and if it is, remove it.

Update help message

last commit is in december of 2015.. but boomerang -h shows 2014

Boomerang alpha 0.3.99 xx/xxx/2014

Segmentation fault on Leviathan6 CTF binary

When running boomerang on the leviathan6 ctf binary, i get the following output
Load:
Not adding 0 sized section ""
Signatures directory does not exist.

Decode:
Valid but undecoded instruction at "80484d7"

Decompile:
[1] 25673 segmentation fault ./boomerang

The original boomerang from http://boomerang.sourceforge.net/ will propperly decompile the binary (however im not sure if its normal that it will miss the local values)

Binary uploaded @ https://www.dropbox.com/s/fldcqugmmt3u5hy/leviathan6

P.s. this is a ctf binary from http://overthewire.org/wargames/leviathan/

Normalize section/segment naming.

There are a few places where boomerang's code references the concept of 'linear area of bytes with meta-data' aka "Section" aka "Segment", but it does not use one name for this, so we have code like

    if (pBF->GetSectionInfoByAddr(pc) == nullptr) {
        LOG << "ERROR: attempted to decode outside any known segment " << pc << "\n";

It would be nice to have a single name for that. and use it throughout the codebase.

My personal vote would be 'sections' - it differentiates things from DOS-16's segments.

Fatal error: msvc_fixes.h: No such file or directory

Latest git repos.
Msys2 environment with gcc 6.2.0, mingw-w64-x86_64-toolchain.

$ make
[ 0%] Automatic moc for target boom_base
[ 0%] Built target boom_base_automoc
[ 1%] Building CXX object CMakeFiles/boom_base.dir/loader/BinaryFileFactory.cpp.o
In file included from D:/Devel/boomerang/src/loader/BinaryFileFactory.cpp:10:0:
D:/Devel/boomerang/src/include/boomerang.h:31:24: fatal error: msvc_fixes.h: No such file or directory
#include "msvc_fixes.h"
^
compilation terminated.
make[2]: *** [CMakeFiles/boom_base.dir/build.make:63: CMakeFiles/boom_base.dir/loader/BinaryFileFactory.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/boom_base.dir/all] Error 2
make: *** [Makefile:95: all] Error 2

Question / discussion about the future of Boomerang

Hello,

I'm opening this issue here since this still seems to be the most popular Boomerang repository.

For the past months I have been refactoring/writing tests/fixing bugs in my fork of Boomerang here (Changelog). This is still a work in progress, however I would like to spark a discussion on how to best revive the project.

I would be happy to merge my changes back to this repository; I can make a PR if that is the outcome of this discussion.

What are your opinions on this matter?

Get rid of memory leaks.

This issue has pretty large footprint, since boomerang was written with garbage collector's help in mind.

I've started working on that on boomerang/leak_be_gone branch .
The plan right now is to use std::shared_ptr/std::uniq_ptr facilities.

@reductor If You have a few minutes, I'd appreciate if You could test this branch on mingw, see if it breaks anything

Improve unit test handling of resources

Currently several tests have issues depending on build output directory, working directory, CfgTest has BOOMERANG_TEST_BASE, however this isn't used for some parts. Other things work on qApp->applicationDirPath().

We should decide on one method and stick with it, currently boomerang relies on the working directory being the root directory, we could be consistent with this, unless there is a better alternative.

Jenkins build for qt5_and_boost or merging into master

Currently the jenkins setup, is working with just the master branch it appears, it would be good to have qt5_and_boost included or merge the qt5_and_boost into master, unless development on master is likely to continue.

Also is there additional cost with this jenkins box? If so you should set up something so people can donate to help cover any costs.

Enhance ADDRESS functionality

ADDRESS is a class that stores both native ( Host machine ) and Target ( the machine given decompiled executable was targeted at ) addresses.
To make it a bit more usable, and to enable some additional sanity checks, it would be a good thing if it supported 'isTarget/isHost' queries.

Project DEPENDENCIES file

Following suggestion by @rsaxvc I'm planning on adding a file containing a list of project's DEPENDENCIES. But that rises an interesting question:

Should we try and make the build as self-contained as possible ? And if so, how far should we go with that approach ? ( we can use CMake's external project support and actually download/configure/build boomerang dependencies )

Or maybe we should assume that all people building boomerang are smart enough to figure things out for themselves, and adding a simple DEPENDENCIES file will be enough ?

My personal opinion is that the less time it takes someone to get boomerang to actually build the better, and the project will 'feel' less clunky to the potential new developers :)

Thoughts ? Suggestions ?

Use or remove range analysis

Range range analysis was added in 3a9c806 however it is not currently used, we need to determine what to do with this code, I have not done any investigation into its usage currently.

Clean up old build files

There are still some old pre-CMake build files laying around which should be cleaned up, there appear to be several within the 'attic' folder, potentially more laying around.

Error: Cast from 'Instruction*' to 'long int' loses precision [-fpermissive]

Last git repos.
Msys2 environment with gcc 6.2.0, mingw-w64-x86_64-toolchain.
Make failed.

D:/Devel/boomerang/src/db/exp.cpp: In member function 'virtual bool RefExp::oper ator==(const Exp&) const':
D:/Devel/boomerang/src/db/exp.cpp:418:19: error: cast from 'Instruction_' to 'lo ng int' loses precision [-fpermissive]
if ((long int)def == -1)
^~~
D:/Devel/boomerang/src/db/exp.cpp:422:29: error: cast from 'Instruction_' to 'lo ng int' loses precision [-fpermissive]
if ((long)((RefExp &)o).def == -1)
^~~
make[2]: *** [db/CMakeFiles/db.dir/build.make:207: db/CMakeFiles/db.dir/exp.cpp. o] Error 1
make[1]: *** [CMakeFiles/Makefile2:520: db/CMakeFiles/db.dir/all] Error 2
make: *** [Makefile:95: all] Error 2

D:/Devel/boomerang/src/db/exp.cpp: In member function 'virtual bool RefExp::oper ator==(const Exp&) const':
D:/Devel/boomerang/src/db/exp.cpp:422:29: error: cast from 'Instruction_' to 'lo ng int' loses precision [-fpermissive]
if ((long)((RefExp &)o).def == -1)
^~~
make[2]: *_* [db/CMakeFiles/db.dir/build.make:207: db/CMakeFiles/db.dir/exp.cpp. o] Error 1
make[1]: *** [CMakeFiles/Makefile2:520: db/CMakeFiles/db.dir/all] Error 2
make: *** [Makefile:95: all] Error 2

Build failing when building tests

[ 65%] Linking CXX executable ../../../out/TypeTest
CMakeFiles/TypeTest.dir/TypeTest.cpp.o: In function `TypeTest::testDataInterval()':
TypeTest.cpp:(.text+0x1ede): undefined reference to `bool QTest::qCompare<bool, int>(bool const&, int const&, char const*, char const*, char const*, int)'
TypeTest.cpp:(.text+0x1f68): undefined reference to `bool QTest::qCompare<bool, int>(bool const&, int const&, char const*, char const*, char const*, int)'
collect2: Error: ld returned 1

Assertion 'sect' failed

When I try to decompile a certain Linux elf executable, I get SIGABRT and this error:

boomerang: /home/razzy/Desktop/boomerang/loader/elf/ElfBinaryFile.cpp:277: virtual bool ElfBinaryFile::RealLoad(const QString&): Assertion `sect' failed.

Since the executable is from a commercial video game (Teleglitch), I'm not sure how to have others test it :/ The Windows executable works fine, however, and decompiles to completion.

The program is not working

I compiled the program for amd64 then I opened it and indicated the file /home/admin/shutdown.exe, output /home/admin/out.
I clicked "DECOMPILATION" but nothing happens. And anyway, no matter what I press, nothing happens, you made a program through the ass?

Fix for a segmentation fault I found.

In proc.cpp line 3264 there may sometimes be a segmentation fault when rename->getDef() returns null. This needs to be tested first, as follows.

    if(rename->getDef() != NULL) {
      SharedType ty = rename->getDef()->getTypeFor(rename->getSubExp1());
      Exp *local = newLocal(ty, *rename);
      if(DEBUG_LIVENESS)
        LOG << "renaming " << rename << " to " << local << "\n";
      mapSymbolTo(rename, local);
    }

CfgTest::testPlacePhi failures

There is currently failures within CfgTest::TestPlacePhi, this test is designed to test the CFG (Control Flow Graph). I have managed to isolate down the issue to a few things.

Most of it stems from DataFlow::placePhiFunctions failing to create the initial list A_org list, due to DataFlow::canRename returning false, there are a few reasons for this, most stemming from UserProc::isLocalOrParamPattern

The causes of this are:

  • The procedures signature is not promoted
  • Rename parameters is not true
  • The stack pointer from Signature::getStackRegister is ESP (r28) when the variable tested in EBP (r29)
  • initSp within UserProc::isLocalOrParamPattern is wrapped in RefExp which does not match the expression, when comparing with the left

There is more to the problem, even fixing these issues, the phi does not match, still yet to verify if the expected is what should really be expected.

Decompile progress bar incorrectly updated

When decompiling "Boomerang::get()->alert_decompiling(this);" is called more then once per prog, causing the progress bar to loop around on windows, and potentially other side effects on other platforms.

Mac version?

Are there any plans for a version that will build on a Mac? Right now I'm getting the following errors with make:

dnewton@newtron ~/Desktop/boomerang/boomerang/build ๐Ÿ‘  make
Scanning dependencies of target boom_base_automoc
[  0%] Automatic moc for target boom_base
[  0%] Built target boom_base_automoc
Scanning dependencies of target boom_base
[  1%] Building CXX object CMakeFiles/boom_base.dir/loader/BinaryFileFactory.cpp.o
[  1%] Building CXX object CMakeFiles/boom_base.dir/boomerang.cpp.o
[  2%] Building CXX object CMakeFiles/boom_base.dir/log.cpp.o
/Users/dnewton/Desktop/boomerang/boomerang/log.cpp:82:18: error: invalid operands to binary expression ('QTextStream' and 'std::ofstream'
      (aka 'basic_ofstream<char>'))
    LOG_STREAM() << out;
    ~~~~~~~~~~~~ ^  ~~~
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:183:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'const void *' for 1st argument; take the address of the argument with &
    QTextStream &operator<<(const void *ptr);
                 ^
/Users/dnewton/Desktop/boomerang/boomerang/include/managed.h:208:14: note: candidate function not viable: no known conversion from
      'std::ofstream' (aka 'basic_ofstream<char>') to 'const AssignSet *' for 2nd argument
QTextStream &operator<<(QTextStream &os, const AssignSet *as);
             ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:167:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'QChar' for 1st argument
    QTextStream &operator<<(QChar ch);
                 ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:168:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'char' for 1st argument
    QTextStream &operator<<(char ch);
                 ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:169:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'short' for 1st argument
    QTextStream &operator<<(signed short i);
                 ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:170:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'unsigned short' for 1st argument
    QTextStream &operator<<(unsigned short i);
                 ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:171:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'int' for 1st argument
    QTextStream &operator<<(signed int i);
                 ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:172:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'unsigned int' for 1st argument
    QTextStream &operator<<(unsigned int i);
                 ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:173:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'long' for 1st argument
    QTextStream &operator<<(signed long i);
                 ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:174:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'unsigned long' for 1st argument
    QTextStream &operator<<(unsigned long i);
                 ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:175:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'qlonglong' (aka 'long long') for 1st argument
    QTextStream &operator<<(qlonglong i);
                 ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:176:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'qulonglong' (aka 'unsigned long long') for 1st argument
    QTextStream &operator<<(qulonglong i);
                 ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:177:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'float' for 1st argument
    QTextStream &operator<<(float f);
                 ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:178:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'double' for 1st argument
    QTextStream &operator<<(double f);
                 ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:179:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'const QString' for 1st argument
    QTextStream &operator<<(const QString &s);
                 ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:180:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'QLatin1String' for 1st argument
    QTextStream &operator<<(QLatin1String s);
                 ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:181:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'const QByteArray' for 1st argument
    QTextStream &operator<<(const QByteArray &array);
                 ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:182:18: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'const char *' for 1st argument
    QTextStream &operator<<(const char *c);
                 ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:220:21: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'QTextStreamFunction' (aka 'QTextStream &(*)(QTextStream &)') for 2nd argument
inline QTextStream &operator<<(QTextStream &s, QTextStreamFunction f)
                    ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qtextstream.h:223:21: note: candidate function not viable: no known conversion
      from 'std::ofstream' (aka 'basic_ofstream<char>') to 'QTextStreamManipulator' for 2nd argument
inline QTextStream &operator<<(QTextStream &s, QTextStreamManipulator m)
                    ^
/Users/dnewton/Desktop/boomerang/boomerang/include/statement.h:321:14: note: candidate function not viable: no known conversion from
      'std::ofstream' (aka 'basic_ofstream<char>') to 'const Instruction *' for 2nd argument
QTextStream &operator<<(QTextStream &os, const Instruction *p);
             ^
/Users/dnewton/Desktop/boomerang/boomerang/include/statement.h:322:14: note: candidate function not viable: no known conversion from
      'std::ofstream' (aka 'basic_ofstream<char>') to 'const InstructionSet *' for 2nd argument
QTextStream &operator<<(QTextStream &os, const InstructionSet *p);
             ^
/Users/dnewton/Desktop/boomerang/boomerang/include/statement.h:323:14: note: candidate function not viable: no known conversion from
      'std::ofstream' (aka 'basic_ofstream<char>') to 'const LocationSet *' for 2nd argument
QTextStream &operator<<(QTextStream &os, const LocationSet *p);
             ^
/Users/dnewton/Desktop/boomerang/boomerang/include/type.h:779:14: note: candidate function not viable: no known conversion from
      'std::ofstream' (aka 'basic_ofstream<char>') to 'const SharedConstType' (aka 'const shared_ptr<const Type>') for 2nd argument
QTextStream &operator<<(QTextStream &os, const SharedConstType &t); // Print the Type pointed to by t
             ^
/Users/dnewton/Desktop/boomerang/boomerang/include/type.h:780:14: note: candidate function not viable: no known conversion from
      'std::ofstream' (aka 'basic_ofstream<char>') to 'const Type' for 2nd argument
QTextStream &operator<<(QTextStream &os, const Type &t); // Print the Type pointed to by t
             ^
/Users/dnewton/Desktop/boomerang/boomerang/include/exp.h:360:14: note: candidate function not viable: no known conversion from
      'std::ofstream' (aka 'basic_ofstream<char>') to 'const Exp *' for 2nd argument
QTextStream &operator<<(QTextStream &os, const Exp *p); // Print the Exp poited to by p
             ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qchar.h:543:28: note: candidate function not viable: no known conversion from
      'QTextStream' to 'QDataStream &' for 1st argument
Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, QChar);
                           ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qbytearray.h:631:28: note: candidate function not viable: no known conversion from
      'QTextStream' to 'QDataStream &' for 1st argument
Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QByteArray &);
                           ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qstring.h:1246:28: note: candidate function not viable: no known conversion from
      'QTextStream' to 'QDataStream &' for 1st argument
Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QString &);
                           ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qobject.h:547:22: note: candidate function not viable: no known conversion from
      'QTextStream' to 'QDebug' for 1st argument
Q_CORE_EXPORT QDebug operator<<(QDebug, const QObject *);
                     ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qiodevice.h:166:22: note: candidate function not viable: no known conversion from
      'QTextStream' to 'QDebug' for 1st argument
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QIODevice::OpenMode modes);
                     ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qregexp.h:114:28: note: candidate function not viable: no known conversion from
      'QTextStream' to 'QDataStream &' for 1st argument
Q_CORE_EXPORT QDataStream &operator<<(QDataStream &out, const QRegExp &regExp);
                           ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qregexp.h:119:22: note: candidate function not viable: no known conversion from
      'QTextStream' to 'QDebug' for 1st argument
Q_CORE_EXPORT QDebug operator<<(QDebug, const QRegExp &);
                     ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qstringlist.h:253:21: note: candidate function not viable: no known conversion
      from 'QTextStream' to 'QDataStream &' for 1st argument
inline QDataStream &operator<<(QDataStream &out, const QStringList &list)
                    ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qvariant.h:533:28: note: candidate function not viable: no known conversion from
      'QTextStream' to 'QDataStream &' for 1st argument
Q_CORE_EXPORT QDataStream& operator<< (QDataStream& s, const QVariant& p);
                           ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qvariant.h:535:28: note: candidate function not viable: no known conversion from
      'QTextStream' to 'QDataStream &' for 1st argument
Q_CORE_EXPORT QDataStream& operator<< (QDataStream& s, const QVariant::Type p);
                           ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qvariant.h:841:22: note: candidate function not viable: no known conversion from
      'QTextStream' to 'QDebug' for 1st argument
Q_CORE_EXPORT QDebug operator<<(QDebug, const QVariant &);
                     ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qvariant.h:842:22: note: candidate function not viable: no known conversion from
      'QTextStream' to 'QDebug' for 1st argument
Q_CORE_EXPORT QDebug operator<<(QDebug, const QVariant::Type);
                     ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qlocale.h:961:28: note: candidate function not viable: no known conversion from
      'QTextStream' to 'QDataStream &' for 1st argument
Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QLocale &);
                           ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qlocale.h:966:22: note: candidate function not viable: no known conversion from
      'QTextStream' to 'QDebug' for 1st argument
Q_CORE_EXPORT QDebug operator<<(QDebug, const QLocale &);
                     ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qdir.h:223:22: note: candidate function not viable: no known conversion from
      'QTextStream' to 'QDebug' for 1st argument
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters);
                     ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qdir.h:224:22: note: candidate function not viable: no known conversion from
      'QTextStream' to 'QDebug' for 1st argument
Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QDir &dir);
                     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:766:1: note: candidate
      template ignored: could not match 'basic_ostream<type-parameter-0-0, type-parameter-0-1>' against 'QTextStream'
operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:813:1: note: candidate
      template ignored: could not match 'basic_ostream<char, type-parameter-0-0>' against 'QTextStream'
operator<<(basic_ostream<char, _Traits>& __os, signed char __c)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:820:1: note: candidate
      template ignored: could not match 'basic_ostream<char, type-parameter-0-0>' against 'QTextStream'
operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:1065:1: note: candidate
      template ignored: could not match 'basic_ostream<type-parameter-0-0, type-parameter-0-1>' against 'QTextStream'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:1089:1: note: candidate
      template ignored: could not match 'basic_ostream<type-parameter-0-0, type-parameter-0-1>' against 'QTextStream'
operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x)
^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qdatastream.h:241:14: note: candidate template ignored: could not match 'QList'
      against 'basic_ofstream'
QDataStream& operator<<(QDataStream& s, const QList<T>& l)
             ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qdatastream.h:267:14: note: candidate template ignored: could not match
      'QLinkedList' against 'basic_ofstream'
QDataStream& operator<<(QDataStream& s, const QLinkedList<T>& l)
             ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qdatastream.h:292:14: note: candidate template ignored: could not match 'QVector'
      against 'basic_ofstream'
QDataStream& operator<<(QDataStream& s, const QVector<T>& v)
             ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qdatastream.h:317:14: note: candidate template ignored: could not match 'QSet'
      against 'basic_ofstream'
QDataStream& operator<<(QDataStream &out, const QSet<T> &set)
             ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qdatastream.h:356:35: note: candidate template ignored: could not match 'QHash'
      against 'basic_ofstream'
Q_OUTOFLINE_TEMPLATE QDataStream &operator<<(QDataStream &out, const QHash<Key, T>& hash)
                                  ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qdatastream.h:400:35: note: candidate template ignored: could not match 'QMap'
      against 'basic_ofstream'
Q_OUTOFLINE_TEMPLATE QDataStream &operator<<(QDataStream &out, const QMap<Key, T> &map)
                                  ^
/usr/local/Cellar/qt5/5.4.0/lib/QtCore.framework/Headers/qdatastream.h:421:21: note: candidate template ignored: could not match 'QPair'
      against 'basic_ofstream'
inline QDataStream& operator<<(QDataStream& s, const QPair<T1, T2>& p)
                    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:1051:5: note: candidate
      template ignored: disabled by 'enable_if' [with _Stream = QTextStream &, _Tp = std::__1::basic_ofstream<char,
      std::__1::char_traits<char> >]
    !is_lvalue_reference<_Stream>::value &&
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:773:1: note: candidate
      template ignored: could not match 'basic_ostream<type-parameter-0-0, type-parameter-0-1>' against 'QTextStream'
operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:806:1: note: candidate
      template ignored: could not match 'basic_ostream<char, type-parameter-0-0>' against 'QTextStream'
operator<<(basic_ostream<char, _Traits>& __os, char __c)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:827:1: note: candidate
      template ignored: could not match 'basic_ostream<type-parameter-0-0, type-parameter-0-1>' against 'QTextStream'
operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __str)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:834:1: note: candidate
      template ignored: could not match 'basic_ostream<type-parameter-0-0, type-parameter-0-1>' against 'QTextStream'
operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:880:1: note: candidate
      template ignored: could not match 'basic_ostream<char, type-parameter-0-0>' against 'QTextStream'
operator<<(basic_ostream<char, _Traits>& __os, const char* __str)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:887:1: note: candidate
      template ignored: could not match 'basic_ostream<char, type-parameter-0-0>' against 'QTextStream'
operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:895:1: note: candidate
      template ignored: could not match 'basic_ostream<char, type-parameter-0-0>' against 'QTextStream'
operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __str)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:1074:1: note: candidate
      template ignored: could not match 'basic_ostream<type-parameter-0-0, type-parameter-0-1>' against 'QTextStream'
operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __ec)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:1082:1: note: candidate
      template ignored: could not match 'basic_ostream<type-parameter-0-0, type-parameter-0-1>' against 'QTextStream'
operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p)
^
1 error generated.
make[2]: *** [CMakeFiles/boom_base.dir/log.cpp.o] Error 1
make[1]: *** [CMakeFiles/boom_base.dir/all] Error 2
make: *** [all] Error 2
dnewton@newtron ~/Desktop/boomerang/boomerang/build

Try to run tests in rlimited environment

When testing, we should gracefully shutdown boomerang process when it starts to go crazy with memory allocations.

needs some research into ruby's setrlimit functionality.

Segmentation fault when decompiling

This has happened with every file I've tried to decompile, mostly Windows exes, but a few elf files as well. At the decompiling stage, Boomerang will get about halfway and immediately crash around the same point every time.
The only way I've been able to circumvent this is to check "Don't decode child processes", but that greatly reduces the code output to a point that's not useful. "Enable data-flow analysis" does not make a change in whether or not it crashes.

I compiled and ran Boomerang on Linux Mint 17.2 Cinnamon 64-bit.

Here are some executables I've tried:
http://advsys.net/ken/voxlap/pnd3d.htm
https://drive.google.com/file/d/0B0Tw1fnDScRsN192NzRqYk8yckE/view
http://www.classicdosgames.com/game/Inner_Worlds.html

I may later try to debug in gdb and provide more information if possible.
Console output (sorry, won't let me attach it):


./boomerang
Not adding 0 sized section ""
Signatures directory does not exist.
Valid but undecoded instruction at "63a1f"
Valid but undecoded instruction at "63a4f"
Valid but undecoded instruction at "676b5"
Valid but undecoded instruction at "675d5"
Valid but undecoded instruction at "2387"
Valid but undecoded instruction at "25a3"
ERROR: unknown instruction INTIB at 4351, ignoring.
Valid but undecoded instruction at "4351"
ERROR: unknown instruction INTIB at 435e, ignoring.
Valid but undecoded instruction at "435e"
Valid but undecoded instruction at "404b"
Valid but undecoded instruction at "63a1f"
Valid but undecoded instruction at "63a4f"
Valid but undecoded instruction at "67735"
Valid but undecoded instruction at "678b5"
Valid but undecoded instruction at "675f5"
Valid but undecoded instruction at "67775"
Valid but undecoded instruction at "3e82"
Valid but undecoded instruction at "5e83"
Valid but undecoded instruction at "61d2"
Valid but undecoded instruction at "3ca9b"
Valid but undecoded instruction at "468b"
Valid but undecoded instruction at "ab17"
Valid but undecoded instruction at "4cddb"
Valid but undecoded instruction at "90cf"
ERROR: unknown instruction INTIB at 3fc1, ignoring.
Valid but undecoded instruction at "3fc1"
ERROR: unknown instruction INTIB at 3fce, ignoring.
Valid but undecoded instruction at "3fce"
Valid but undecoded instruction at "65d77"
Valid but undecoded instruction at "663b3"
Valid but undecoded instruction at "65fd7"
Valid but undecoded instruction at "5e127"
Valid but undecoded instruction at "677b5"
Valid but undecoded instruction at "3583"
Valid but undecoded instruction at "6053"
Valid but undecoded instruction at "3ea7"
ERROR: unknown instruction INTIB at 43a5, ignoring.
Valid but undecoded instruction at "43a5"
ERROR: unknown instruction INTIB at 43c9, ignoring.
Valid but undecoded instruction at "43c9"
Valid but undecoded instruction at "11b9f"
Valid but undecoded instruction at "6c17"
Valid but undecoded instruction at "45ff"
Valid but undecoded instruction at "13c87"
Valid but undecoded instruction at "646db"
Valid but undecoded instruction at "cd47"
Valid but undecoded instruction at "454b"
ERROR: unknown instruction INTIB at 4551, ignoring.
Valid but undecoded instruction at "4551"
ERROR: unknown instruction INTIB at 4565, ignoring.
Valid but undecoded instruction at "4565"
Valid but undecoded instruction at "4cd8b"
Valid but undecoded instruction at "846b"
Valid but undecoded instruction at "3dea"
Valid but undecoded instruction at "63c3b"
Valid but undecoded instruction at "676f5"
Valid but undecoded instruction at "3113"
Valid but undecoded instruction at "32b7"
Valid but undecoded instruction at "3457"
Valid but undecoded instruction at "17ef5"
Valid but undecoded instruction at "39a3"
Valid but undecoded instruction at "196f7"
Valid but undecoded instruction at "196be"
Valid but undecoded instruction at "1974a"
Valid but undecoded instruction at "196da"
Valid but undecoded instruction at "10ddf"
Valid but undecoded instruction at "f5df"
Valid but undecoded instruction at "157cb"
Valid but undecoded instruction at "64985"
Valid but undecoded instruction at "ba73"
Valid but undecoded instruction at "67635"
Valid but undecoded instruction at "62deb"
Valid but undecoded instruction at "63037"
Valid but undecoded instruction at "67615"
Valid but undecoded instruction at "54913"
Valid but undecoded instruction at "1107b"
Valid but undecoded instruction at "5bdb7"
Valid but undecoded instruction at "76d3"
Valid but undecoded instruction at "7737"
Valid but undecoded instruction at "409b"
Valid but undecoded instruction at "677d5"
Valid but undecoded instruction at "1a407"
Valid but undecoded instruction at "1a417"
Valid but undecoded instruction at "67bdf"
Valid but undecoded instruction at "67675"
Valid but undecoded instruction at "5f4f6"
Valid but undecoded instruction at "4ce0f"
Valid but undecoded instruction at "17acb"
Valid but undecoded instruction at "11a0f"
Valid but undecoded instruction at "67715"
Valid but undecoded instruction at "5c3fb"
Valid but undecoded instruction at "749b"
Valid but undecoded instruction at "1355f"
Valid but undecoded instruction at "48a4"
Valid but undecoded instruction at "4b57"
Valid but undecoded instruction at "1be9f"
Valid but undecoded instruction at "18467"
Valid but undecoded instruction at "3984"
Valid but undecoded instruction at "38f7"
Valid but undecoded instruction at "392d"
Valid but undecoded instruction at "19037"
Valid but undecoded instruction at "19627"
Valid but undecoded instruction at "1863b"
Valid but undecoded instruction at "5feab"
Valid but undecoded instruction at "5fc07"
Valid but undecoded instruction at "5facf"
Valid but undecoded instruction at "5fbaf"
Valid but undecoded instruction at "5fbb2"
Valid but undecoded instruction at "5fbce"
Valid but undecoded instruction at "5fb6e"
Valid but undecoded instruction at "5d4b3"
Valid but undecoded instruction at "5d88f"
Valid but undecoded instruction at "60220"
Valid but undecoded instruction at "5fa93"
Valid but undecoded instruction at "5fa4a"
Valid but undecoded instruction at "6016c"
Valid but undecoded instruction at "5eb78"
Valid but undecoded instruction at "5f0b4"
Valid but undecoded instruction at "676d5"
Valid but undecoded instruction at "648af"
Valid but undecoded instruction at "17d9a"
Valid but undecoded instruction at "67655"
Valid but undecoded instruction at "631a7"
Valid but undecoded instruction at "162cb"
Valid but undecoded instruction at "1c093"
Valid but undecoded instruction at "19237"
Valid but undecoded instruction at "185f7"
Valid but undecoded instruction at "5fa6c"
Valid but undecoded instruction at "67895"
Valid but undecoded instruction at "5c7f3"
Valid but undecoded instruction at "64b1b"
Valid but undecoded instruction at "ffdf"
Valid but undecoded instruction at "1417f"
Valid but undecoded instruction at "14347"
Valid but undecoded instruction at "1407f"
Valid but undecoded instruction at "19ea3"
Valid but undecoded instruction at "17fb7"
Valid but undecoded instruction at "191c7"
main function not found
main function not found
main function not found
Error: no entry for INT.Ib' in RTL dictionary Error: no entry forINT.Ib' in RTL dictionary
Error: no entry for INT.Ib' in RTL dictionary Error: no entry forINT.Ib' in RTL dictionary
Error: no entry for INT.Ib' in RTL dictionary Error: no entry forINT.Ib' in RTL dictionary
Error: no entry for INT.Ib' in RTL dictionary Error: no entry forINT.Ib' in RTL dictionary
considering _start
considering proc1
considering proc8
considering proc15
considering proc4
decompiling proc4
considering proc7
considering proc14
decompiling proc14
t decompiling proc7
rprrpttttr decompiling proc15
prtttr decompiling proc8
prprrrrprpttttttttttr decompiling proc1
pr considering proc2
decompiling proc2
considering proc3
considering proc9
considering proc16
considering proc86
considering proc191
considering proc315
decompiling proc315
considering proc316
considering proc440
considering proc382
decompiling proc382
decompiling proc440
rtt considering proc441
considering proc521
considering proc561
decompiling proc561
decompiling proc521
p decompiling proc441
decompiling proc316
rtt decompiling proc191
rprt considering proc192
considering proc17
considering proc87
decompiling proc87
rtt considering proc6
decompiling proc6
prt decompiling proc17
t considering proc193
considering proc317
considering proc442
decompiling proc442
r considering proc363
decompiling proc363
rt decompiling proc317
prrprrrpttttttttr decompiling proc193
rpprrrprrrrprrpprValid but undecoded instruction at "65d77"
Valid but undecoded instruction at "663b3"
Valid but undecoded instruction at "65fd7"
Valid but undecoded instruction at "67835"
Valid but undecoded instruction at "677f5"
Valid but undecoded instruction at "67815"
reconsidering proc86
considering proc576
considering proc577
considering proc583
considering proc586
decompiling proc586
considering proc587
decompiling proc587
considering proc588
decompiling proc588
considering proc589
decompiling proc589
considering proc590
decompiling proc590
considering proc591
considering proc592
decompiling proc592
decompiling proc591
rt considering proc21
considering proc5
decompiling proc5
decompiling proc21
prrtttr decompiling proc583
prttr decompiling proc577
prtt considering proc582
decompiling proc582
rprtttp considering proc203
decompiling proc203
rrpttt considering proc585
decompiling proc585
rprttttr considering proc584
decompiling proc584
prprttttt decompiling proc576
rprprtttt considering proc578
decompiling proc578
rValid but undecoded instruction at "69fc3"
Valid but undecoded instruction at "69e07"
Valid but undecoded instruction at "6a51b"
Valid but undecoded instruction at "6a5c7"
considering proc579
decompiling proc579
considering proc580
considering proc593
considering proc594
decompiling proc594
considering proc595
considering proc596
decompiling proc596
prt considering proc606
decompiling proc606
r considering proc198
considering proc600
decompiling proc600
rp considering proc599
decompiling proc599
considering proc597
considering proc603
decompiling proc603
rttp considering proc598
decompiling proc598
rprtttt decompiling proc597
prtt considering proc601
decompiling proc601
rpttrValid but undecoded instruction at "68563"
Valid but undecoded instruction at "6982b"
Valid but undecoded instruction at "6659b"
considering proc602
considering proc605
considering proc604
considering proc581
decompiling proc581
ttrprppprrpprrrrpprrrrrrpprrrrrrrpprrrrrrpprrrppprrValid but undecoded instruction at "69fc3"
Valid but undecoded instruction at "69e07"
Valid but undecoded instruction at "6a51b"
Valid but undecoded instruction at "6a5c7"
reconsidering proc593
rpprprpprrrrrpprrrrrpprrrrrrrpprrrrrrrpprrrppprrrrprprrprrrrrpprrrrrrrpprrrppprrrppppppttttttttttttttttttttttttttttttttrpprtttrtttttttpttttttttttttttttttttttttttttttttttttttttttttrrppprrtrrrrSegmentation fault

Enable transformation engine

The transformation engine was added in 4e168d9 however, it is currently not used. When enabling this we should ensure everything in polySimplify is covered by transformations and remove polySimplify.

Fix sparc/twofib failure

The twofib code has the following pattern

call twofib
nop
illtrap

and twofib itself is returning like this

jmp     %i7+0xC

instead of using ret ( which is %i7+0x8 ) , so it basically returning to next instruction over.

This will be pretty tough to solve without assuming that no call returns until proven to do so.
The simplest ad-hoc solution would be to have sparc/gcc specific pattern translator, which would replace call/nop/illtrap with call/nop/nop, and when function is doing jmp %i7+0xC replace it with ret.

boomerang.nemerle.eu is down

This repository is now connected to continous integration server: http://boomerang.nemerle.eu

Throws 500 now.

What you're doing is very worthy, thanks. But please avoid results of your work being weak-linked on yourself, or results of your work will end up where original Boomerang is. There're 3rd-party CI services like Travis which take some burden (like server maintenance) off you, allowing to concentrate on real thing - hacking.

Thanks again.

Fixing all the memory leaks.

Despite spending a good chunk of time on switching boomerang over to shared_ptrs, I couldn't solve the memory situation.

Got pretty close with shared_ptr/shared_from_this approach but after putting in 11+ hours into it, it barfed on this little gem:

    this->~PhiAssign(); // Explicitly destroy this, but keep the memory allocated.
    Assign *a = new (this) Assign(type_, lhs_, rhs_); // construct in-place. Note that 'a' == 'this'

So my current thinking is "Copy as much as possible from llvm's approach of single ownership" :

  • Prog owns Modules
  • Modules own Functions
  • Functions own BasicBlocks
  • BasicBlocks own Instructions

Move ownership of loaded binary to Boomerang's core

Loader plugins should get the name and QByteArray containing the binary data of the file, this should allow us to:

  • properly handle the ownership of data, and remove the redundant memory management from all loaders
  • use test-contained binaries to verify loader correctness
  • in the future, store binaries inside serialized project file

UserProc::removeRedundantReturns can invalidate implicit assigned Phi defs.

Implicit assigns come from UserProc::typeAnalysis->UserProc::addImplicitAssigns, when a change has occured with UserProc::removeRedundantReturns this causes UserProc::updateForUseChange which will reassign Phi defs in UserProc::doRenameBlockVars but this does not cover implicit assigns, we could call addImplicitAssigns or typeAnalysis after this in UserProc::updateForUseChange, however with a pass based system and dependencies we could reduce the chance of this sort of thing occuring again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.