Bug 68700 - demangler failed with signal 11
Summary: demangler failed with signal 11
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: demangler (show other bugs)
Version: 5.1.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on: 78252
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-04 16:20 UTC by Tomasz Grabiec
Modified: 2019-12-04 23:32 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2015-12-04 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Grabiec 2015-12-04 16:20:20 UTC
Demangler fails on 
'_ZN8futurizeI13frozen_schemaE5applyIRZN7seastar7shardedIN7service13storage_proxyEE9invoke_onIZZNS6_22init_messaging_serviceEvENKUljN5utils4UUIDEE8_clEjSA_EUlOT_E_6futureIJS0_EEEET0_jSD_EUlvE_JEEESG_SD_DpOT0_'

Fedora 22
GDB version 7.9
GCC 5.1.1

See: https://sourceware.org/bugzilla/show_bug.cgi?id=19330


The backtrace is at least thousands frames long and seem to recurse:

(gdb) bt
#0  0x00007face31e3a98 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007face31e572a in __GI_abort () at abort.c:89
#2  0x000000000070d8c6 in dump_core () at ../../gdb/utils.c:577
#3  0x000000000071d2bc in gdb_demangle_signal_handler (signo=11) at ../../gdb/cp-support.c:1504
#4  <signal handler called>
#5  0x000000000085a8c9 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=259, dc=0x7fff5ce747f8)
    at ../../libiberty/cp-demangle.c:4309
#6  0x000000000085e4f4 in d_print_comp (dpi=0x7fff5ce73f00, options=<optimized out>, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#7  0x000000000085be56 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=259, dc=0x7fff5ce74828)
    at ../../libiberty/cp-demangle.c:4347
#8  0x000000000085e4f4 in d_print_comp (dpi=0x7fff5ce73f00, options=<optimized out>, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#9  0x000000000085be56 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=options@entry=259, dc=0x7fff5ce748b8)
    at ../../libiberty/cp-demangle.c:4347
#10 0x000000000085e606 in d_print_comp (dc=<optimized out>, options=<optimized out>, dpi=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#11 d_print_mod (dpi=dpi@entry=0x7fff5ce73f00, options=options@entry=259, mod=0x7fff5ce748b8) at ../../libiberty/cp-demangle.c:5596
#12 0x000000000085ed97 in d_print_mod_list (dpi=dpi@entry=0x7fff5ce73f00, options=options@entry=259, mods=mods@entry=0x7fff5c679580, 
    suffix=suffix@entry=0) at ../../libiberty/cp-demangle.c:5525
#13 0x000000000085f4d1 in d_print_function_type (dpi=dpi@entry=0x7fff5ce73f00, options=options@entry=259, mods=0x7fff5c679580, 
    dc=0x7fff5ce74900) at ../../libiberty/cp-demangle.c:5666
#14 0x000000000085c071 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=<optimized out>, dc=0x7fff5ce74900)
    at ../../libiberty/cp-demangle.c:4850
#15 0x000000000085e4f4 in d_print_comp (dpi=0x7fff5ce73f00, options=<optimized out>, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#16 0x000000000085d937 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=259, dc=0x7fff5ce74918)
    at ../../libiberty/cp-demangle.c:4457
#17 0x000000000085e4f4 in d_print_comp (dpi=0x7fff5ce73f00, options=<optimized out>, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#18 0x000000000085ee20 in d_print_mod_list (dpi=dpi@entry=0x7fff5ce73f00, options=options@entry=259, mods=mods@entry=0x7fff5c679910, 
    suffix=suffix@entry=0) at ../../libiberty/cp-demangle.c:5494
#19 0x000000000085f4d1 in d_print_function_type (dpi=dpi@entry=0x7fff5ce73f00, options=options@entry=259, mods=0x7fff5c679910, 
    dc=0x7fff5ce74a80) at ../../libiberty/cp-demangle.c:5666
#20 0x000000000085c071 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=<optimized out>, dc=0x7fff5ce74a80)
    at ../../libiberty/cp-demangle.c:4850
#21 0x000000000085e4f4 in d_print_comp (dpi=0x7fff5ce73f00, options=<optimized out>, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
---Type <return> to continue, or q <return> to quit---
#22 0x000000000085d937 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=259, dc=0x7fff5ce74a98)
    at ../../libiberty/cp-demangle.c:4457
#23 0x000000000085e4f4 in d_print_comp (dpi=0x7fff5ce73f00, options=<optimized out>, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#24 0x000000000085be56 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=259, dc=0x7fff5ce74b10)
    at ../../libiberty/cp-demangle.c:4347
#25 0x000000000085e4f4 in d_print_comp (dpi=0x7fff5ce73f00, options=<optimized out>, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#26 0x000000000085b4a3 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=259, dc=0x7fff5ce74b28)
    at ../../libiberty/cp-demangle.c:4965
#27 0x000000000085e4f4 in d_print_comp (dpi=0x7fff5ce73f00, options=<optimized out>, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#28 0x000000000085bc23 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=options@entry=259, dc=0x7fff5ce74bb8)
    at ../../libiberty/cp-demangle.c:4516
#29 0x000000000085e606 in d_print_comp (dc=<optimized out>, options=<optimized out>, dpi=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#30 d_print_mod (dpi=dpi@entry=0x7fff5ce73f00, options=options@entry=259, mod=0x7fff5ce74bb8) at ../../libiberty/cp-demangle.c:5596
#31 0x000000000085ed97 in d_print_mod_list (dpi=dpi@entry=0x7fff5ce73f00, options=options@entry=259, mods=mods@entry=0x7fff5c67a080, 
    suffix=suffix@entry=0) at ../../libiberty/cp-demangle.c:5525
#32 0x000000000085f4d1 in d_print_function_type (dpi=dpi@entry=0x7fff5ce73f00, options=options@entry=259, mods=0x7fff5c67a080, 
    dc=0x7fff5ce74c30) at ../../libiberty/cp-demangle.c:5666
#33 0x000000000085c071 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=<optimized out>, dc=0x7fff5ce74c30)
    at ../../libiberty/cp-demangle.c:4850
#34 0x000000000085e4f4 in d_print_comp (dpi=0x7fff5ce73f00, options=<optimized out>, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#35 0x000000000085d937 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=259, dc=0x7fff5ce74c48)
    at ../../libiberty/cp-demangle.c:4457
#36 0x000000000085e4f4 in d_print_comp (dpi=0x7fff5ce73f00, options=<optimized out>, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#37 0x000000000085be56 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=259, dc=0x7fff5ce74ca8)
    at ../../libiberty/cp-demangle.c:4347
#38 0x000000000085e4f4 in d_print_comp (dpi=0x7fff5ce73f00, options=<optimized out>, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#39 0x000000000085b769 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=259, dc=0x7fff5ce74cc0)
    at ../../libiberty/cp-demangle.c:4784
#40 0x000000000085e4f4 in d_print_comp (dpi=0x7fff5ce73f00, options=<optimized out>, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#41 0x000000000085b4a3 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=259, dc=0x7fff5ce74ae0)
---Type <return> to continue, or q <return> to quit---
    at ../../libiberty/cp-demangle.c:4965
#42 0x000000000085e4f4 in d_print_comp (dpi=0x7fff5ce73f00, options=<optimized out>, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#43 0x000000000085c8a3 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=<optimized out>, dc=0x7fff5ce74af8)
    at ../../libiberty/cp-demangle.c:5348
#44 0x000000000085e4f4 in d_print_comp (dpi=0x7fff5ce73f00, options=<optimized out>, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#45 0x000000000085bea5 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=259, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:4361
#46 0x000000000085e4f4 in d_print_comp (dpi=0x7fff5ce73f00, options=<optimized out>, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#47 0x000000000085b4a3 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=259, dc=0x7fff5ce74b28)
    at ../../libiberty/cp-demangle.c:4965
#48 0x000000000085e4f4 in d_print_comp (dpi=0x7fff5ce73f00, options=<optimized out>, dc=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
#49 0x000000000085bc23 in d_print_comp_inner (dpi=dpi@entry=0x7fff5ce73f00, options=options@entry=259, dc=0x7fff5ce74bb8)
    at ../../libiberty/cp-demangle.c:4516
#50 0x000000000085e606 in d_print_comp (dc=<optimized out>, options=<optimized out>, dpi=<optimized out>)
    at ../../libiberty/cp-demangle.c:5383
Comment 1 Markus Trippelsdorf 2015-12-04 21:06:46 UTC
Confirmed.

markus@x4 libiberty % ./a.out _ZN8futurizeI13frozen_schemaE5applyIRZN7seastar7shardedIN7service13storage_proxyEE9invoke_onIZZNS6_22init_messaging_serviceEvENKUljN5utils4UUIDEE8_clEjSA_EUlOT_E_6futureIJS0_EEEET0_jSD_EUlvE_JEEESG_SD_DpOT0_                                                                                                               typed name
  template
    qualified name
      template
        name 'futurize'
        template argument list
          name 'frozen_schema'
      name 'apply'
    template argument list
      reference
        local name
          typed name
            template
              qualified name
                template
                  qualified name
                    name 'seastar'
                    name 'sharded'
                  template argument list
                    qualified name
                      name 'service'
                      name 'storage_proxy'
                name 'invoke_on'
              template argument list
                local name
                  typed name
                    local name
                      typed name
                        qualified name
                          qualified name
                            name 'service'
                            name 'storage_proxy'
                          name 'init_messaging_service'
                        function type
                          argument list
                      const this
                        qualified name
                          lambda 9
                            argument list
                              builtin type unsigned int
                              argument list
                                qualified name
                                  name 'utils'
                                  name 'UUID'
                          operator ()
                    function type
                      argument list
                        builtin type unsigned int
                        argument list
                          qualified name
                            name 'utils'
                            name 'UUID'
                  lambda 0
                    argument list
                      rvalue reference
                        template parameter 0
                template argument list
                  template
                    name 'future'
                    template argument list
                      template argument list
                        name 'frozen_schema'
            function type
              template parameter 1
              argument list
                builtin type unsigned int
                argument list
                  template parameter 0
          lambda 0
            argument list
      template argument list
        template argument list
  function type
    local name
      typed name
        local name
          typed name
            qualified name
              qualified name
                name 'service'
                name 'storage_proxy'
              name 'init_messaging_service'
            function type
              argument list
          const this
            qualified name
              lambda 9
                argument list
                  builtin type unsigned int
                  argument list
                    qualified name
                      name 'utils'
                      name 'UUID'
              operator ()
        function type
          argument list
            builtin type unsigned int
            argument list
              qualified name
                name 'utils'
                name 'UUID'
      lambda 0
        argument list
          rvalue reference
            template parameter 0
    argument list
      template parameter 0
      argument list
        pack expansion
          rvalue reference
            template parameter 1
ASAN:SIGSEGV
=================================================================
==6445==ERROR: AddressSanitizer: stack-overflow on address 0x7fff9b10bf48 (pc 0x0000004046fd bp 0x0ffff3621838 sp 0x7fff9b10bf40 T0)
Comment 2 Mark Wielaard 2016-12-04 17:58:53 UTC
This seems related to Bug 78252 - C++ demangler crashes with infinite recursion with lambda (auto)

With the patch proposed for that bug the symbol demangles to:

service::storage_proxy::init_messaging_service()::{lambda(unsigned int, utils::UUID)#10}::operator()(unsigned int, utils::UUID) const::{lambda(auto&&)#1} futurize<frozen_schema>::apply<future<frozen_schema> seastar::sharded<service::storage_proxy>::invoke_on<service::storage_proxy::init_messaging_service()::{lambda(unsigned int, utils::UUID)#10}::operator()(unsigned int, utils::UUID) const::{lambda(auto&&)#1}, future<frozen_schema> >(unsigned int, service::storage_proxy::init_messaging_service()::{lambda(unsigned int, utils::UUID)#10}::operator()(unsigned int, utils::UUID) const::{lambda(auto&&)#1})::{lambda()#1}&>(future<frozen_schema> seastar::sharded<service::storage_proxy>::invoke_on<service::storage_proxy::init_messaging_service()::{lambda(unsigned int, utils::UUID)#10}::operator()(unsigned int, utils::UUID) const::{lambda(auto&&)#1}, future<frozen_schema> >(unsigned int, service::storage_proxy::init_messaging_service()::{lambda(unsigned int, utils::UUID)#10}::operator()(unsigned int, utils::UUID) const::{lambda(auto&&)#1})::{lambda()#1}&)
Comment 3 Christian Biesinger 2019-12-04 23:32:48 UTC
This does not seem to crash on binutils trunk, but it does not demangle either.