Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack-overflow in src/ast_sel_cmp.cpp:349 #3104

Open
puppet-meteor opened this issue May 26, 2020 · 0 comments
Open

stack-overflow in src/ast_sel_cmp.cpp:349 #3104

puppet-meteor opened this issue May 26, 2020 · 0 comments
Labels

Comments

@puppet-meteor
Copy link

puppet-meteor commented May 26, 2020

Version: sassc-3.6.1-8-g3e73 libsass-3.6.3-57-g9515

OS: Ubuntu 16.04 LTS

POC: https://github.com/puppet-meteor/NLP_POC/blob/master/sassc/POC_13_000004

cmd: ./sassc POC

ASAN log:

=================================================================
==40794==ERROR: AddressSanitizer: stack-overflow on address 0x7fffff7fefc8 (pc 0x7ffff6ee1749 bp 0x7fffff7ff840 sp 0x7fffff7fefd0 T0)
#0 0x7ffff6ee1748 in memcmp (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x77748)
#1 0x720c59 in std::char_traits::compare(char const*, char const*, unsigned long) /usr/include/c++/5/bits/char_traits.h:262
#2 0x720c59 in __gnu_cxx::__enable_if<std::__is_char::__value, bool>::__type std::operator==(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) /usr/include/c++/5/bits/basic_string.h:4914
#3 0x720c59 in Sass::TypeSelector::operator==(Sass::TypeSelector const&) const src/ast_sel_cmp.cpp:349
#4 0x65fca5 in bool Sass::PtrObjEqualityFnSass::SimpleSelector(Sass::SimpleSelector const*, Sass::SimpleSelector const*) src/ast_helpers.hpp:127
#5 0x65fca5 in bool Sass::ObjEqualityFn<Sass::SharedImplSass::SimpleSelector >(Sass::SharedImplSass::SimpleSelector const&, Sass::SharedImplSass::SimpleSelector const&) src/ast_helpers.hpp:141
#6 0x65fca5 in bool Sass::ObjEquality::operator()<Sass::SharedImplSass::SimpleSelector >(Sass::SharedImplSass::SimpleSelector const&, Sass::SharedImplSass::SimpleSelector const&) const src/ast_helpers.hpp:148
#7 0x65fca5 in std::__detail::_Equal_helper<Sass::SharedImplSass::SimpleSelector, std::pair<Sass::SharedImplSass::SimpleSelector const, std::unordered_set<Sass::SharedImplSass::SelectorList, Sass::ObjPtrHash, Sass::ObjPtrEquality, std::allocator<Sass::SharedImplSass::SelectorList > > >, std::__detail::_Select1st, Sass::ObjEquality, unsigned long, true>::_S_equals(Sass::ObjEquality const&, std::__detail::_Select1st const&, Sass::SharedImplSass::SimpleSelector const&, unsigned long, std::__detail::_Hash_node<std::pair<Sass::SharedImplSass::SimpleSelector const, std::unordered_set<Sass::SharedImplSass::SelectorList, Sass::ObjPtrHash, Sass::ObjPtrEquality, std::allocator<Sass::SharedImplSass::SelectorList > > >, true>) /usr/include/c++/5/bits/hashtable_policy.h:1322
#8 0x65fca5 in std::__detail::_Hashtable_base<Sass::SharedImplSass::SimpleSelector, std::pair<Sass::SharedImplSass::SimpleSelector const, std::unordered_set<Sass::SharedImplSass::SelectorList, Sass::ObjPtrHash, Sass::ObjPtrEquality, std::allocator<Sass::SharedImplSass::SelectorList > > >, std::__detail::_Select1st, Sass::ObjEquality, Sass::ObjHash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<true, false, true> >::_M_equals(Sass::SharedImplSass::SimpleSelector const&, unsigned long, std::__detail::_Hash_node<std::pair<Sass::SharedImplSass::SimpleSelector const, std::unordered_set<Sass::SharedImplSass::SelectorList, Sass::ObjPtrHash, Sass::ObjPtrEquality, std::allocator<Sass::SharedImplSass::SelectorList > > >, true>
) const /usr/include/c++/5/bits/hashtable_policy.h:1704
#9 0x65fca5 in std::_Hashtable<Sass::SharedImplSass::SimpleSelector, std::pair<Sass::SharedImplSass::SimpleSelector const, std::unordered_set<Sass::SharedImplSass::SelectorList, Sass::ObjPtrHash, Sass::ObjPtrEquality, std::allocator<Sass::SharedImplSass::SelectorList > > >, std::allocator<std::pair<Sass::SharedImplSass::SimpleSelector const, std::unordered_set<Sass::SharedImplSass::SelectorList, Sass::ObjPtrHash, Sass::ObjPtrEquality, std::allocator<Sass::SharedImplSass::SelectorList > > > >, std::__detail::_Select1st, Sass::ObjEquality, Sass::ObjHash, 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, Sass::SharedImplSass::SimpleSelector const&, unsigned long) const /usr/include/c++/5/bits/hashtable.h:1433
#10 0x647a24 in std::_Hashtable<Sass::SharedImplSass::SimpleSelector, std::pair<Sass::SharedImplSass::SimpleSelector const, std::unordered_set<Sass::SharedImplSass::SelectorList, Sass::ObjPtrHash, Sass::ObjPtrEquality, std::allocator<Sass::SharedImplSass::SelectorList > > >, std::allocator<std::pair<Sass::SharedImplSass::SimpleSelector const, std::unordered_set<Sass::SharedImplSass::SelectorList, Sass::ObjPtrHash, Sass::ObjPtrEquality, std::allocator<Sass::SharedImplSass::SelectorList > > > >, std::__detail::_Select1st, Sass::ObjEquality, Sass::ObjHash, 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, Sass::SharedImplSass::SimpleSelector const&, unsigned long) const /usr/include/c++/5/bits/hashtable.h:632
#11 0x647a24 in std::__detail::_Map_base<Sass::SharedImplSass::SimpleSelector, std::pair<Sass::SharedImplSass::SimpleSelector const, std::unordered_set<Sass::SharedImplSass::SelectorList, Sass::ObjPtrHash, Sass::ObjPtrEquality, std::allocator<Sass::SharedImplSass::SelectorList > > >, std::allocator<std::pair<Sass::SharedImplSass::SimpleSelector const, std::unordered_set<Sass::SharedImplSass::SelectorList, Sass::ObjPtrHash, Sass::ObjPtrEquality, std::allocator<Sass::SharedImplSass::SelectorList > > > >, std::__detail::_Select1st, Sass::ObjEquality, Sass::ObjHash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true>, true>::operator /usr/include/c++/5/bits/hashtable_policy.h:618
#12 0x647a24 in std::unordered_map<Sass::SharedImplSass::SimpleSelector, std::unordered_set<Sass::SharedImplSass::SelectorList, Sass::ObjPtrHash, Sass::ObjPtrEquality, std::allocator<Sass::SharedImplSass::SelectorList > >, Sass::ObjHash, Sass::ObjEquality, std::allocator<std::pair<Sass::SharedImplSass::SimpleSelector const, std::unordered_set<Sass::SharedImplSass::SelectorList, Sass::ObjPtrHash, Sass::ObjPtrEquality, std::allocator<Sass::SharedImplSass::SelectorList > > > > >::operator /usr/include/c++/5/bits/unordered_map.h:672
#13 0x647a24 in Sass::Extender::registerSelector(Sass::SharedImplSass::SelectorList const&, Sass::SharedImplSass::SelectorList const&) src/extender.cpp:215
#14 0x64811e in Sass::Extender::registerSelector(Sass::SharedImplSass::SelectorList const&, Sass::SharedImplSass::SelectorList const&) src/extender.cpp:219
#15 0x64811e in Sass::Extender::registerSelector(Sass::SharedImplSass::SelectorList const&, Sass::SharedImplSass::SelectorList const&) src/extender.cpp:219
...................................................
SUMMARY: AddressSanitizer: stack-overflow ??:0 memcmp
==40794==ABORTING

@mgreter mgreter added the Fuzzy label Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants