* Update to latest remill APIs and way of using CMake.
* Minor fixes
* Bug fixes for AArch64
* Tweaks
* Adds some nifty functionality useful for debugging some aarch64 bugs
* Fixes a subtle bug
* Bug fixes
* Make the test suite use explicit args
* Bug fix in xrefs
* Disable tests for now
* API improvements. Must be used with the api_improvements branch of both Remill and McSema
fixes for x86 and running the lifted code with klee
* Update dockerfile to clone anvill
* update remill commit id
* Add python3 to dockerfile
* update python3
* disable abi script
* Updated cmake to find anvill
* Update main.cpp
* update find_package for anvill
* WIP:updated prebuild cfg
* update prebuild cfg files
* enable abi build for testsuite
* Fix memory leak
* install missing package for testcases
* frontend: Reflect cfg file changes in dyninst frontend.
* frontend: Update local files copyrights to reflect overall change to agplv3.
* fix failing testcases
* update test cfgs
* Fix test failure with local state pointer
* set the flag to use local state_ptr in default mode
Co-authored-by: kumarak <iit.akshay@gmail.com>
Co-authored-by: Lukas Korencik <xkorenc1@fi.muni.cz>
* bc: Inline calls to semantic functions and wrappers manually.
* bc: Inline calls to semantics and wrappers only if some flags are set.
* Refactor code that is responsible for abi libs loading.
* Wrap global pointers in RAII.
* Update .remill_commit_id
Co-authored-by: Peter Goodman <peter.goodman@gmail.com>
* Attempt to resolve Issue #521
* minor fix
* minor fix
* minor fix
* Simplifications and comments
* If it's a copy of shared data, then don't treat it as an xref
* Error log if there is segment variable with the same name as external var
* Added flag and checks if the variable needs initialization if already defined;
* fix noreturn for the functions throwing exceptions;
* review changes
* Update get_cfg.py
* Update get_cfg.py
* Fix the recovery of exception action table chain
* Update the prebuild cfg for testsuite
* Fix entrypoint function not getting recovered in ida7
* Change the order of idc.GetFunctionName and idc.GetTrueName while looking for function name
* More broadly applies lazy xref initialization to all initializations where the xref size is less than teh value size of the xref itself (pointer size, usually). Moves initialization of lazy xrefs into a new function, __mcsema_early_init, which guards itself against multiple executions. Makes sure that __mcsema_constructor calls __mcsema_early_init first. Finally, makes sure that all native-to-lifted entrypoints call __mcsema_early_init as well, as we have observed cases where the lifted binary contains weak implementations of c++ standard library functions, and these functions are called by native libraries initialized before the call to __mcsema_constructor, thereby resulting in re-entrancy issues.
* Update Function.cpp
* Make sure the __mcsema_early_init guard is in the module.
* Make sure the __mcsema_early_init guard is in the module.
* Fixes for __gmon_start__ and stuff.
* Minor fix
* Adds some symbols
* Minor fix for ida7
* Try to resolve things like calls through PLT thunks via xref entry lookups when a flow cross-reference is missing.
* Adds a new command-line option that adds a request for stack protection on lifted functions.
* Add the stack protector request to more locations
* Add gets to the libc abi.
* Update to use remill's dead store elimination, and be compatible with the indirection-removal done by Arch::PrepareModule.
* Fixes
* Update .remill_commit_id
* Update .remill_commit_id
* Update .remill_commit_id
* Update .remill_commit_id
* Update .remill_commit_id
* Update .remill_commit_id
* InlineAsm fails due to function type mismatch
* disable ada failing testcases;
* Generate ABI library for integration test
* Change ArrayRef to vector; getting corrupted for llvm >= 3.9
* Initial changes to parse the eh_frame and exception table
* linearly scan the function to find missing blocks
* Update protobuf format for lp; need to tag instructions or basic blocks to associate it with the lp
* tag instructions with lp; removed debug logs
* updated comments and protobuf; use utility functions for pointer size;
* travis build failure; make lp_ea optional field
* Collect the exception handling bb chunks; Create a passthrough for the lifted landingpad;
* Generate the passthrough IR and attach the landing pad with function invoke
* Generate the eh_frame/exception table and add personality function with one raising the exception.
* catch/cleanup wrapper for the exception handling; Disable CFG simplification pass temporarily for invoke inst;
* invoke wrapper to fix stack and base pointers
* recover type indices of the exception type
* fix exception table offset
* Add the function definition for setting the rsp/rpb correctly after eh return;
* Changes for abi_library support in exception handling
* Remove unwind attribute from ext_* functions to generate eh table
* Support the lifting of multiple exception types thrown;
* Fix the multiple declaration of personality function in lifted bitcode;
* Add --recover_exception flag to lift the exception table
* Update the list of external functions with c++ ABI's; Fix basic block split issue for exception chunks;
* Weak linkage for external function causing the garbage value for out_of_range destructor. Temporarily disabled;
* cleanup redundant changes and resolve conflicts
* Update --std-defs list with the c++ exception ABIs
* Fix merge fail
* exception test binaries for integration test; Move to clang++ for recompiling the bitcode.
* Fix the exception handling support for llvm 3.5
* Disable the optimization passes for the function having landingpad;
* Temporary changes to add ABI libraries for exception tests.
* Remove the noreturn attribute to fix the problem with -03 optimization
* review comment changes
* Change wrapper function name across invoke;
* review changes
* Updated comments text
* Remove duplicate clauses from the list; Add arguments for personalityfn and fix review comments.
* Update the flag name to --exception_personalityfn;
* Update the flag name to --exception_personality_func;
* Follow the variable naming convention;
* Update comments
* travis build fix for unused variable
* Create the map of type indices from original binary. Runtime routine to fix the RDX with correct type index;
* Add _Unwind_Resume to --abi_libraries functions list;
* Update comments & code restructure
* Exception handling changes and utility functions for 32 bit;
* DWORD for 32-bit system
* 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
* Fixues issue #321.
* This is an attempt to fix the issue Akshay observed, though not by restoring the original code. In a windows binary I am looking at, I have the jump table entries as 4-byte displacements, added to an 8-byte offset.
* This includes some pretty substantial changes. Some are related to jump tables, then things diverged into better handling of .idata sections in PE files, and specifically external calls and devirtualizing them in the lifted bitcode.
* Updates mcsema to understand that the InstructionLifter returns a LiftStatus now, instead of a bool. This allows us to partially resolve Issue #323. Next up is instruction support.
* Add missing function to runtime.
* collect the references of stack variables
* Initial changes to lift stack variables
* Set the stack variable name
* remove the entryBlock for allocating the stack variables
* addressed review comments
* Handling index and scale associated with stack variable; Build will fail because of the required changes in remill;
* Utility to load the register addresses; remove the dependency on remill changes
* Disable function parameters lifting;
* Fixed review comments
* IDA changes to lift the stack variables for apache ATD's. Issue with lifting some variables from status_handler;
* Change CFG proto names to match with other classes
* Remove debug logs
* Change stack allocation variables and general cleanup; Update the blacklist functions for which the stack shuffling does not work;
* Fixed code alignment
* fix tab indentation with spaces
* explicit args to external APIs
* Make AArch64 disassembly detect refs to external functions
* Fix awful bug where code would become undefined since our callinst was not same convention as the called function
* Emit enough code so that AArch64 bitcode gets emitted