public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/96345] New: __cxa demangle fails to demangle a very long string
@ 2020-07-27 19:55 hededrk at gmail dot com
  2020-07-27 19:57 ` [Bug libstdc++/96345] " hededrk at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: hededrk at gmail dot com @ 2020-07-27 19:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96345

            Bug ID: 96345
           Summary: __cxa demangle fails to demangle a very long string
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hededrk at gmail dot com
  Target Milestone: ---

I found this bug because one of my tests started to fail (not sure when it
started to fail because I've set up CI only yesterday). I assume this is a bug
because GCC is able to produce such names.

Steps to reproduce:
1. compile attached file
        g++ -c cxa_demangle_fail.cpp

2. obtain mangled name with nm
        nm cxa_demangle_fail.o

3. pass that name into abi::__cxa_demangle
        auto name   = /*long string*/;
        size_t size = 1024;
        auto memory = static_cast<char*>(malloc(size));

        int status;
        auto demangled = abi::__cxa_demangle(name, memory, &size, &status);

Result: __cxa_demangle fails with code -2.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libstdc++/96345] __cxa demangle fails to demangle a very long string
  2020-07-27 19:55 [Bug libstdc++/96345] New: __cxa demangle fails to demangle a very long string hededrk at gmail dot com
@ 2020-07-27 19:57 ` hededrk at gmail dot com
  2020-07-27 19:58 ` hededrk at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hededrk at gmail dot com @ 2020-07-27 19:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96345

--- Comment #1 from V <hededrk at gmail dot com> ---
Created attachment 48936
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48936&action=edit
failing example

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libstdc++/96345] __cxa demangle fails to demangle a very long string
  2020-07-27 19:55 [Bug libstdc++/96345] New: __cxa demangle fails to demangle a very long string hededrk at gmail dot com
  2020-07-27 19:57 ` [Bug libstdc++/96345] " hededrk at gmail dot com
@ 2020-07-27 19:58 ` hededrk at gmail dot com
  2020-07-27 21:18 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hededrk at gmail dot com @ 2020-07-27 19:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96345

--- Comment #2 from V <hededrk at gmail dot com> ---
Created attachment 48937
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48937&action=edit
function with name that __cxa_demangle rejects

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libstdc++/96345] __cxa demangle fails to demangle a very long string
  2020-07-27 19:55 [Bug libstdc++/96345] New: __cxa demangle fails to demangle a very long string hededrk at gmail dot com
  2020-07-27 19:57 ` [Bug libstdc++/96345] " hededrk at gmail dot com
  2020-07-27 19:58 ` hededrk at gmail dot com
@ 2020-07-27 21:18 ` pinskia at gcc dot gnu.org
  2020-07-28  4:49 ` hededrk at gmail dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2020-07-27 21:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96345

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Does c++filt demangle it?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libstdc++/96345] __cxa demangle fails to demangle a very long string
  2020-07-27 19:55 [Bug libstdc++/96345] New: __cxa demangle fails to demangle a very long string hededrk at gmail dot com
                   ` (2 preceding siblings ...)
  2020-07-27 21:18 ` pinskia at gcc dot gnu.org
@ 2020-07-28  4:49 ` hededrk at gmail dot com
  2020-07-28  8:50 ` hededrk at gmail dot com
  2022-05-30  9:39 ` [Bug demangler/96345] " hededrk at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: hededrk at gmail dot com @ 2020-07-28  4:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96345

--- Comment #4 from V <hededrk at gmail dot com> ---
No, c++filt also does not demangle it.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libstdc++/96345] __cxa demangle fails to demangle a very long string
  2020-07-27 19:55 [Bug libstdc++/96345] New: __cxa demangle fails to demangle a very long string hededrk at gmail dot com
                   ` (3 preceding siblings ...)
  2020-07-28  4:49 ` hededrk at gmail dot com
@ 2020-07-28  8:50 ` hededrk at gmail dot com
  2022-05-30  9:39 ` [Bug demangler/96345] " hededrk at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: hededrk at gmail dot com @ 2020-07-28  8:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96345

--- Comment #5 from V <hededrk at gmail dot com> ---
(In reply to Andrew Pinski from comment #3)
> Does c++filt demangle it?

I've fed output of nm into c++filt and this function came out mangled, while
others were demangled.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug demangler/96345] __cxa demangle fails to demangle a very long string
  2020-07-27 19:55 [Bug libstdc++/96345] New: __cxa demangle fails to demangle a very long string hededrk at gmail dot com
                   ` (4 preceding siblings ...)
  2020-07-28  8:50 ` hededrk at gmail dot com
@ 2022-05-30  9:39 ` hededrk at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: hededrk at gmail dot com @ 2022-05-30  9:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96345

V <hededrk at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|10.1.0                      |12.1.1
               Host|                            |x86_64
             Target|                            |x86_64

--- Comment #6 from V <hededrk at gmail dot com> ---
Still fails as of GCC 12.1.

I've shortened the input string, it fails with names longer than 999
characters.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-05-30  9:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 19:55 [Bug libstdc++/96345] New: __cxa demangle fails to demangle a very long string hededrk at gmail dot com
2020-07-27 19:57 ` [Bug libstdc++/96345] " hededrk at gmail dot com
2020-07-27 19:58 ` hededrk at gmail dot com
2020-07-27 21:18 ` pinskia at gcc dot gnu.org
2020-07-28  4:49 ` hededrk at gmail dot com
2020-07-28  8:50 ` hededrk at gmail dot com
2022-05-30  9:39 ` [Bug demangler/96345] " hededrk at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).