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

detect_cxxstring_abi is unreliable when library includes std::map::erase[abi:cxx11] symbol #1280

Open
topolarity opened this issue May 3, 2023 · 1 comment

Comments

@topolarity
Copy link
Contributor

topolarity commented May 3, 2023

Found this when I was working on Glibmm.

These symbols are incorrectly detected as evidence of a cxx11 string ABI by BinaryBuilder:

sandbox:${WORKSPACE}/srcdir/glibmm-2.66.6/builddir # nm /workspace/destdir/lib/libgiomm-2.4.so | c++filt | grep cxx11
00000000001617f4 t std::map<Glib::ustring, (anonymous namespace)::OptionArgCallbackData*, std::less<Glib::ustring>, std::allocator<std::pair<Glib::ustring const, (anonymous namespace)::OptionArgCallbackData*> > >::erase[abi:cxx11](std::_Rb_tree_iterator<std::pair<Glib::ustring const, (anonymous namespace)::OptionArgCallbackData*> >)
0000000000161ae4 t std::_Rb_tree<Glib::ustring, std::pair<Glib::ustring const, (anonymous namespace)::OptionArgCallbackData*>, std::_Select1st<std::pair<Glib::ustring const, (anonymous namespace)::OptionArgCallbackData*> >, std::less<Glib::ustring>, std::allocator<std::pair<Glib::ustring const, (anonymous namespace)::OptionArgCallbackData*> > >::erase[abi:cxx11](std::_Rb_tree_iterator<std::pair<Glib::ustring const, (anonymous namespace)::OptionArgCallbackData*> >)

There are probably others too.

@giordano
Copy link
Member

giordano commented May 3, 2023

That's coming from

# Shove the symbol names through c++filt (since we don't want to have to
# reimplement the parsing logic in Julia). If anything has `cxx11` tags,
# then mark it as such.
if any(occursin("[abi:cxx11]", c) || occursin("std::__cxx11", c) for c in symbol_names)
return "cxx11"
end
So this criterion is inaccurate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants