Commit Graph

5 Commits

Author SHA1 Message Date
Kuan-Yen Chou 372a3fcea4 Fix the maze example with KLEE (#719)
The x86 and x86_64 binaries are re-compiled with clang-10 from the
vcpkg, cxx-common libraries, because KLEE would fail with segfault if
the LLVM bitcode is lifted from binaries compiled with GCC (10.2.0). It
may be worth looking into why KLEE fails with the bitcodes lifted from
GCC compiled binaries in this case.

The AArch64 binary is re-compiled with aarch64-linux-gnu-gcc (10.2.0),
but mcsema-lift-10.0 fails with the following message.

```
F1228 23:41:38.079257 120074 Analyze.cpp:491] Check failed: dest_size < 64u (64 vs. 64)
*** Check failure stack trace: ***
    @          0x11601cc  google::LogMessageFatal::~LogMessageFatal()
    @           0x785c3c  anvill::XrefExprFolder::VisitTrunc()
    @           0x786108  anvill::XrefExprFolder::VisitICmp()
    @           0x660113  mcsema::(anonymous namespace)::LowerXrefs()::$_1::operator()()
    @           0x65b388  mcsema::(anonymous namespace)::LowerXrefs()
    @           0x65a458  mcsema::OptimizeModule()
    @           0x657bdc  mcsema::LiftCodeIntoModule()
    @           0x66e9ee  main
    @     0x7ffb0e016152  __libc_start_main
    @           0x61bafe  _start
    @              (nil)  (unknown)
```

I have not tried compiling the AArch64 binary with clang
(`-target aarch64-linux-gnu`). It may be worth trying and see if the
resulting bitcode works with KLEE.
2021-01-19 20:01:40 -05:00
Alessandro Gario 1a96bd3712 Update links and remotes to the new organization name (#598)
* Docs: Update links with the new organization name

* CI/Travis: Update remotes with the new organization name

* mcsema-disass: Update links with the new organization name

* Dockerfile: Update remotes with the new organization name
2019-10-27 12:56:23 -04:00
Peter Goodman cc5cd44807 Change /data to tilde/data 2018-01-20 01:06:20 -05:00
Peter Goodman 7d98f47792 Adds missing dependencies in klee maze example. 2018-01-20 00:53:25 -05:00
Peter Goodman 8a9856ada3 Klee maze example (#369)
* In progress. Working on an example of using KLEE on a Maze, but with the maze program being compiled to x86, amd64, and aarch64.

* Making lots of progress on getting lifting and runnning an aarch64 maze program on amd64, but using --explicit_args. The key thing I'm working through right now is a jump offset table, but where the offset is a block pc, rather than a table base. Also adding various bits of code here and there to making runnning with klee more directly doable, and working on a debugging facility to track down when the emulated program counter gets out of sync with the original program.

* Fixed a subtle @PAGE and @PAGEOFF-related reference bug on AArch64. Partially disabled the special jump offset table handling I had in table.py, as it doesn't (yet) handle the shifted table values. However, I still have the code there, so that it can recognize that a basic block address is used as a possible offset, so that I can remove the block address as a reference, which permits a new heuristic on the C++ side to work. On the C++ side, when there's a jump instruction that isn't associated with a cross-reference flow, I try to auto-augment it with addition switch cases, targeting blocks with no predecessors (as present in the CFG). This seems to work reasonably well.

* Improved the scripts and updated the READMEs.

* Minor rephrase

* Minor rephrase
2018-01-13 23:47:55 -05:00