3 ms·
I found a 271,800 character demangled symbol name in libmshr
- bombcar 5y agoWell what was it?
- teh_klev 5y agoI know it's annoying, even the article doesn't reveal to us what it is: The longest demangled ELF symbol is 271,800 characters and is defined in the file usr/lib/x86_64-linux-gnu/libmshr.so.2019.2.0.dev0 provided by the libmshr2019.2 package. Sadly this submission is a victim of the wrong kind of title editorialising.
- st_goliath 5y agoI tried to go looking for myself, so I downloaded the AMD64 binary from the Debian page: https://packages.debian.org/unstable/libmshr2019.2 https://packages.debian.org/unstable/libmshr2019.2 After unpacking the data.tar.xz from the deb archive, I unpacked libmshr.so.2019.2.0.dev0 from the specified path. Doing this: readelf -W --demangle=c++ -s libmshr.so.2019.2.0.dev0 | awk ' { if ( length > x ) { x = length; y = $0 } }END{ print y }' > test.txt gave me a text file that is 101,943 bytes in size. Basically a huge C++ template soup, but still quite a bit short from the 271,800 bytes in the headline. If you want to see it, I compressed (568 bytes!) and base64 encoded it: xz test.txt base64 test.txt.xz And uploaded it here: https://paste.debian.net/1237184/ https://paste.debian.net/1237184/ Which can be viewed with this one liner: curl https://paste.debian.net/download/1237184 | base64 -d | xz -d
- teh_klev 5y agoThank you. It's the wee hours here and frankly I just didn't have the energy to do it myself.
- teh_klev 5y agoPlease don't editorialise article submission titles. Even from the bullet point which you cherry picked to use as the title doesn't tell us anything useful other than it's a 271,800 character symbol. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- dataangel 5y agoUmm... A symbol this long is very surprising and interesting. How is this editorializing? It's also a real quote from the linked post.
- rurban 5y agomore interesting would be homoglyphs in C or C++ ABI's, eg by assuming UTF-8 encodings. or at least utf-8 names in the wild. the overlong symbol looks it's coming from here: https://github.com/martinal/mshr/blob/master/src/Polyhedral_multicomponent_mesh_domain_with_features_3.h https://github.com/martinal/mshr/blob/master/src/Polyhedral_... so not an overflow attack, just C++ nonsense.