Giter Site home page Giter Site logo

Comments (6)

gabrielesvelto avatar gabrielesvelto commented on August 15, 2024

I've fed the symbols into llvm-cxxfilt and the results are here. These all seem to have an odd ::$_<number> component, for example:

std::__invoke_result<mozilla::webgl::ChooseDeviceReplacement(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::$_41>

from cpp_demangle.

khuey avatar khuey commented on August 15, 2024

These fail to demangle here (with "error: an error occurred when formatting an argument") but none of them panic. What is the panic stack?

from cpp_demangle.

khuey avatar khuey commented on August 15, 2024

These seem to trigger a loop when printing the symbol that eventually hits the recursion limit.

from cpp_demangle.

khuey avatar khuey commented on August 15, 2024

I fixed one issue that's definitely a cpp_demangle bug, but after that we still don't agree with LLVM or libiberty (which also don't agree with each other)

cpp_demangle

mozilla::CompactPair<mozilla::net::SimpleChannelCallbacks*, mozilla::DefaultDelete<mozilla::net::SimpleChannelCallbacks> >::CompactPairHelper<mozilla::net::SimpleChannelCallbacksImpl<nsAnnoProtocolHandler::NewFaviconChannel(nsIURI*, nsIURI, nsILoadInfo*, nsIChannel**)::$_15, already_AddRefed<nsILoadInfo*> NS_NewSimpleChannel<nsAnnoProtocolHandler, nsIChannel**>(nsIURI, nsILoadInfo, nsAnnoProtocolHandler*, nsIChannel**&&)::{lambda(bool, nsIChannel, nsIURI)#1}, nsAnnoProtocolHandler>*, mozilla::DefaultDelete<already_AddRefed<nsILoadInfo*> NS_NewSimpleChannel<nsAnnoProtocolHandler, nsIChannel**>(nsIURI, nsILoadInfo, nsAnnoProtocolHandler*, nsIChannel**&&)::{lambda(bool, nsIChannel, nsIURI)#1}> >(mozilla::DefaultDelete<already_AddRefed<nsILoadInfo*> NS_NewSimpleChannel<nsAnnoProtocolHandler, nsIChannel**>(nsIURI, nsILoadInfo, nsAnnoProtocolHandler*, nsIChannel**&&)::{lambda(bool, nsIChannel, nsIURI)#1}>)

lllvm-cxxfilt 16 (llvm/llvm-project@c0d954a)

mozilla::CompactPair<mozilla::net::SimpleChannelCallbacks*, mozilla::DefaultDelete<mozilla::net::SimpleChannelCallbacks>>::CompactPair<mozilla::net::SimpleChannelCallbacksImpl<nsAnnoProtocolHandler::NewFaviconChannel(nsIURI*, nsIURI, nsILoadInfo*, nsIChannel**)::$_15, already_AddRefed<nsILoadInfo*> NS_NewSimpleChannel<nsAnnoProtocolHandler, nsIChannel**>(nsIURI, nsILoadInfo, nsAnnoProtocolHandler*, nsIChannel**&&)::'lambda'(bool, nsIChannel, nsIURI), nsAnnoProtocolHandler>*, mozilla::DefaultDelete<already_AddRefed<nsILoadInfo*> NS_NewSimpleChannel<nsAnnoProtocolHandler, nsIChannel**>(nsIURI, nsILoadInfo, nsAnnoProtocolHandler*, nsIChannel**&&)::'lambda'(bool, nsIChannel, nsIURI)>>(already_AddRefed<nsILoadInfo*>&&, nsIChannel**)

libiberty (binutils 2.38.50)

mozilla::CompactPair<mozilla::net::SimpleChannelCallbacks*, mozilla::DefaultDelete<mozilla::net::SimpleChannelCallbacks> >::CompactPairHelper<mozilla::net::SimpleChannelCallbacksImpl<nsAnnoProtocolHandler::NewFaviconChannel(nsIURI*, nsAnnoProtocolHandler, nsILoadInfo*, nsIChannel**)::$_15, NS_NewSimpleChannel<mozilla::net::SimpleChannelCallbacksImpl, nsIChannel*>(nsAnnoProtocolHandler, nsIURI*, mozilla::net::SimpleChannelCallbacksImpl*, nsIChannel*&&)::{lambda(bool, nsILoadInfo*, nsAnnoProtocolHandler)#1}, mozilla::net::SimpleChannelCallbacksImpl>*, mozilla::DefaultDelete<nsIChannel*&&> >(already_AddRefed&&, mozilla::net::SimpleChannelCallbacksImpl<nsAnnoProtocolHandler::NewFaviconChannel(nsIURI*, nsAnnoProtocolHandler, nsILoadInfo*, nsIChannel**)::$_15, NS_NewSimpleChannel<mozilla::net::SimpleChannelCallbacksImpl, nsIChannel*>(nsAnnoProtocolHandler, nsIURI*, mozilla::net::SimpleChannelCallbacksImpl*, nsIChannel*&&)::{lambda(bool, nsILoadInfo*, nsAnnoProtocolHandler)#1}, mozilla::net::SimpleChannelCallbacksImpl>**)

It would really help to know where these symbols come from in the Mozilla source to determine which (if any) are correct.

from cpp_demangle.

gabrielesvelto avatar gabrielesvelto commented on August 15, 2024

I believe that's coming from here. But it's just a guess given the types that show up in the demangled versions.

from cpp_demangle.

khuey avatar khuey commented on August 15, 2024

After looking at this with fresh eyes I think the symbol is incorrectly mangled. The above comes from demangling

_ZN7mozilla11CompactPairIPNS_3net22SimpleChannelCallbacksENS_13DefaultDeleteIS2_EEECI2NS_6detail17CompactPairHelperIS3_S5_LNS7_11StorageTypeE1ELS9_0EEEIPNS1_26SimpleChannelCallbacksImplIZN21nsAnnoProtocolHandler17NewFaviconChannelEP6nsIURISD_P11nsILoadInfoPP10nsIChannelE4$_15Z19NS_NewSimpleChannelISC_SJ_E16already_AddRefedISG_ESD_SF_PT_OT0_EUlbSH_SD_E_SC_EENS4_ISS_EEEEOSN_SQ_

CompactPairHelper doesn't appear in the llvm-cxxfilt demangling despite appearing in the symbol. And detail doesn't appear in the demangling in any tool! I think itanium-cxx-abi/cxx-abi#68 is also present here.

from cpp_demangle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.