lifting-bits / abigen Goto Github PK
View Code? Open in Web Editor NEWGenerate McSema ABI libraries from Header Files
Generate McSema ABI libraries from Header Files
Currently when a file cannot be processed, the output is very generic:
The following headers could not be imported:
File name: all.h
Prefixes tried: { }
It would be nice to know why a file could not be processed.
Add a .travis.yml file to build under Travis-CI.
Import tests from cparser: https://github.com/pgoodman/cparser/tree/master/test
Run against tests on build.
Getting a segmentation fault when running on some headers. It looks like it may be infinite recursion in containsFunctionPointerType
.
Starting program: /store/artem/ve/bin/abigen generate -x --profile Ubuntu\ 16.04.5\ LTS --language c11 --header-folders /usr/local/include/ --output abi
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Using profiles from /store/artem/ve/share/abigen/data/platforms
Profile settings
Name: Ubuntu 16.04.5 LTS
Language: C11
GNU extensions: enabled
internal-isystem
/store/artem/ve/share/abigen/data/platforms/ubuntu/16.04.5/usr/local/include
/store/artem/ve/share/abigen/data/platforms/ubuntu/16.04.5/usr/lib/llvm-3.8/lib/clang/3.8.0/include
internal-externc-isystem
/store/artem/ve/share/abigen/data/platforms/ubuntu/16.04.5/usr/include/x86_64-linux-gnu
/store/artem/ve/share/abigen/data/platforms/ubuntu/16.04.5/usr/include
resource-dir: /store/artem/ve/share/abigen/data/platforms/ubuntu/16.04.5/usr/lib/llvm-3.8/lib/clang/3.8.0
Enumerating the include files...
Processing the include headers...
[1/8] deepstate/Stream.h
[2/8] deepstate/Compiler.h
[3/8] deepstate/DeepState.h
[4/8] deepstate/Log.h
[5/8] deepstate/Option.h
Headers imported:
deepstate/Stream.h
deepstate/Compiler.h
deepstate/DeepState.h
deepstate/Log.h
deepstate/Option.h
The following headers could not be imported:
File name: Stream.hpp
Prefixes tried: { 'deepstate', 'include/deepstate', 'local/include/deepstate', 'usr/local/include/deepstate' }
File name: DeepState.hpp
Prefixes tried: { 'deepstate', 'include/deepstate', 'local/include/deepstate', 'usr/local/include/deepstate' }
File name: greenlet.h
Prefixes tried: { 'greenlet', 'python2.7/greenlet', 'include/python2.7/greenlet', 'local/include/python2.7/greenlet', 'usr/local/include/python2.7/greenlet' }
Generating the ABI library...
Symbols:
dup: Duplicated (overloaded) function
var: Variadic function
ptr: Contains a function pointer
Blacklist
Program received signal SIGSEGV, Segmentation fault.
0x0000000000459607 in std::__detail::_Hashtable_ebo_helper<0, std::__detail::_Select1st, true>::_S_cget(std::__detail::_Hashtable_ebo_helper<0, std::__detail::_Select1st, true> const&) ()
(gdb) bt
#0 0x0000000000459607 in std::__detail::_Hashtable_ebo_helper<0, std::__detail::_Select1st, true>::_S_cget(std::__detail::_Hashtable_ebo_helper<0, std::__detail::_Select1st, true> const&) ()
#1 0x00000000004580f8 in std::__detail::_Hash_code_base<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::set<trailofbits::SourceCodeLocation, std::less<trailofbits::SourceCodeLocation>, std::allocator<trailofbits::SourceCodeLocation> > >, std::__detail::_Select1st, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, true>::_M_extract() const ()
#2 0x0000000000455577 in std::__detail::_Hashtable_base<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::set<trailofbits::SourceCodeLocation, std::less<trailofbits::SourceCodeLocation>, std::allocator<trailofbits::SourceCodeLocation> > >, std::__detail::_Select1st, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<true, false, true> >::_M_equals(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, std::__detail::_Hash_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::set<trailofbits::SourceCodeLocation, std::less<trailofbits::SourceCodeLocation>, std::allocator<trailofbits::SourceCodeLocation> > >, true>*) const ()
#3 0x0000000000450aff in std::_Hashtable<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::set<trailofbits::SourceCodeLocation, std::less<trailofbits::SourceCodeLocation>, std::allocator<trailofbits::SourceCodeLocation> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::set<trailofbits::SourceCodeLocation, std::less<trailofbits::SourceCodeLocation>, std::allocator<trailofbits::SourceCodeLocation> > > >, std::__detail::_Select1st, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_find_before_node(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long) const ()
#4 0x00000000004495a4 in std::_Hashtable<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::set<trailofbits::SourceCodeLocation, std::less<trailofbits::SourceCodeLocation>, std::allocator<trailofbits::SourceCodeLocation> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::set<trailofbits::SourceCodeLocation, std::less<trailofbits::SourceCodeLocation>, std::allocator<trailofbits::SourceCodeLocation> > > >, std::__detail::_Select1st, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_find_node(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long) const ()
#5 0x000000000043e2fd in std::_Hashtable<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::set<trailofbits::SourceCodeLocation, std::less<trailofbits::SourceCodeLocation>, std::allocator<trailofbits::SourceCodeLocation> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::set<trailofbits::SourceCodeLocation, std::less<trailofbits::SourceCodeLocation>, std::allocator<trailofbits::SourceCodeLocation> > > >, std::__detail::_Select1st, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const ()
#6 0x0000000000433aa7 in std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::set<trailofbits::SourceCodeLocation, std::less<trailofbits::SourceCodeLocation>, std::allocator<trailofbits::SourceCodeLocation> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::set<trailofbits::SourceCodeLocation, std::less<trailofbits::SourceCodeLocation>, std::allocator<trailofbits::SourceCodeLocation> > > > >::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const ()
#7 0x0000000000410c68 in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#8 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#9 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#10 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#11 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#12 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#13 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#14 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#15 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#16 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#17 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#18 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#19 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#20 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#21 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#22 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#23 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#24 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#25 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#26 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#27 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#28 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#29 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#30 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#31 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#32 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#33 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#34 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#35 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#36 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#37 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#38 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#39 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#40 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#41 0x0000000000410dbd in containsFunctionPointerType(trailofbits::TranslationUnitData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.