Skip to content

Problems with de-mangled names (Linux) #67

Description

@loopless

Using Boost 1.83.0
Using boost::dll::experimental::smart_library
Calling get_function(name)

The library does not seem to be generating correct de-mangled names for a C++ function, so it fails to find a "match" in the actual .so
This is only occurring on Linux, on Windows there are no issues. On Linux we are compiling with _GLIBCXX_USE_CXX11_ABI=1

The C++ prototype is

Run (
	std::string const&         	filename,
 	bool const&			 flag,
	std::size_t const           numThreads,
	std::atomic< bool > const&  stopToken,
	std::vector<int64_t> const& selected);

The actual signature is as follows ( using nm to query the .so )

Run( std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool const&, unsigned long, std::atomic<bool> const&, std::vector<long, std::allocator<long> > const&)

When compiled with the Intel ICX (clang) compiler, smart_library makes a mistake with the std::string type
smart_library sees the first parameter as std::basic_string ( not std::__cxx11::basic_string)
Run( std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool const&, unsigned long, std::atomic<bool> const&, std::vector<long"...

When compiled with gcc 11 , it gets the "string" type correct, but comes up with "long unsigned int" as the 4th parameter ( which is size_t)

Run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool const&, long unsigned int, std::atomic<bool> const&, std"...

I am able to see the failures in the function
template<typename Func> std::string mangled_storage_impl::get_function(const std::string &name) const

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedmanglingRelated to mangled import. Probably won't be fixed without a PR

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions