Skip to content
This repository has been archived by the owner on Oct 29, 2020. It is now read-only.

Segmentation Fault When Processing Headers #3

Open
artemdinaburg opened this issue Sep 4, 2018 · 0 comments
Open

Segmentation Fault When Processing Headers #3

artemdinaburg opened this issue Sep 4, 2018 · 0 comments

Comments

@artemdinaburg
Copy link
Contributor

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&) ()
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant