Bug 72822 - libiberty/ demangler crash
Summary: libiberty/ demangler crash
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: demangler (show other bugs)
Version: 6.1.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on: 61460
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-05 21:40 UTC by Jan Kratochvil
Modified: 2017-03-09 08:39 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kratochvil 2016-08-05 21:40:15 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1364588

r239179 2016-08-05

_ZNK6clover6detail11basic_rangeINS_13adaptor_rangeIZNS_6kernel6launchERNS_13command_queueERKSt6vectorImSaImEESA_SA_EUlmE_JRS8_EEENS0_16iterator_adaptorISB_JN9__gnu_cxx17__normal_iteratorIPmS8_EEEEESJ_EcvT_IS6_IPjSaISN_EEvEEv

echo -e '\n_ZNK6clover6detail11basic_rangeINS_13adaptor_rangeIZNS_6kernel6launchERNS_13command_queueERKSt6vectorImSaImEESA_SA_EUlmE_JRS8_EEENS0_16iterator_adaptorISB_JN9__gnu_cxx17__normal_iteratorIPmS8_EEEEESJ_EcvT_IS6_IPjSaISN_EEvEEv'|./test-demangle 
Segmentation fault

[...]
#44 0x000000000040cb94 in d_print_comp (dpi=0x7fffffffa190, options=<optimized out>, dc=<optimized out>) at cp-demangle.c:5594
#45 0x0000000000408fa8 in d_print_comp_inner (dpi=0x7fffffffa190, options=275, dc=<optimized out>) at cp-demangle.c:4544
#46 0x000000000040cb94 in d_print_comp (dpi=0x7fffffffa190, options=<optimized out>, dc=<optimized out>) at cp-demangle.c:5594
#47 0x0000000000408fe8 in d_print_comp_inner (dpi=0x7fffffffa190, options=275, dc=<optimized out>) at cp-demangle.c:4742
#48 0x000000000040afcf in d_print_comp (dc=<optimized out>, options=275, dpi=0x7fffffffa190) at cp-demangle.c:5594
#49 d_print_conversion (dc=0x7fffffffb018, options=275, dpi=0x7fffffffa190) at cp-demangle.c:5995
#50 d_print_comp_inner (dpi=0x7fffffffa190, options=275, dc=0x7fffffffb018) at cp-demangle.c:5212
#51 0x000000000040cb94 in d_print_comp (dpi=0x7fffffffa190, options=<optimized out>, dc=<optimized out>) at cp-demangle.c:5594
#52 0x0000000000408fa8 in d_print_comp_inner (dpi=0x7fffffffa190, options=275, dc=<optimized out>) at cp-demangle.c:4544
#53 0x000000000040cb94 in d_print_comp (dpi=0x7fffffffa190, options=<optimized out>, dc=<optimized out>) at cp-demangle.c:5594
#54 0x0000000000408fe8 in d_print_comp_inner (dpi=0x7fffffffa190, options=275, dc=<optimized out>) at cp-demangle.c:4742
#55 0x000000000040afcf in d_print_comp (dc=<optimized out>, options=275, dpi=0x7fffffffa190) at cp-demangle.c:5594
#56 d_print_conversion (dc=0x7fffffffb018, options=275, dpi=0x7fffffffa190) at cp-demangle.c:5995
#57 d_print_comp_inner (dpi=0x7fffffffa190, options=275, dc=0x7fffffffb018) at cp-demangle.c:5212
[...]
#79591 0x0000000000400fdd in main (argc=<optimized out>, argv=0x7fffffffd7a8) at test-demangle.c:317
Comment 1 Fujii Hironori 2016-08-11 12:59:36 UTC
>  $ ./demangle _ZNK6clover6detail11basic_rangeINS_13adaptor_rangeIZNS_6kernel6launchERNS_13command_queueERKSt6vectorImSaImEESA_SA_EUlmE_JRS8_EEENS0_16iterator_adaptorISB_JN9__gnu_cxx17__normal_iteratorIPmS8_EEEEESJ_EcvT_IS6_IPjSaISN_EEvEEv
> typed name
>   const this
>     template
>       qualified name
>         template
>           qualified name
>             qualified name
>               name 'clover'
>               name 'detail'
>             name 'basic_range'
>           template argument list
>             template
>               qualified name
>                 name 'clover'
>                 name 'adaptor_range'
>               template argument list
>                 local name
>                   typed name
>                     qualified name
>                       qualified name
>                         name 'clover'
>                         name 'kernel'
>                       name 'launch'
>                     function type
>                       argument list
>                         reference
>                           qualified name
>                             name 'clover'
>                             name 'command_queue'
>                         argument list
>                           reference
>                             const
>                               template
>                                 qualified name
>                                   name 'std'
>                                   name 'vector'
>                                 template argument list
>                                   builtin type unsigned long
>                                   template argument list
>                                     template
>                                       standard substitution std::allocator
>                                       template argument list
>                                         builtin type unsigned long
>                           argument list
>                             reference
>                               const
>                                 template
>                                   qualified name
>                                     name 'std'
>                                     name 'vector'
>                                   template argument list
>                                     builtin type unsigned long
>                                     template argument list
>                                       template
>                                         standard substitution std::allocator
>                                         template argument list
>                                           builtin type unsigned long
>                             argument list
>                               reference
>                                 const
>                                   template
>                                     qualified name
>                                       name 'std'
>                                       name 'vector'
>                                     template argument list
>                                       builtin type unsigned long
>                                       template argument list
>                                         template
>                                           standard substitution std::allocator
>                                           template argument list
>                                             builtin type unsigned long
>                   lambda 0
>                     argument list
>                       builtin type unsigned long
>                 template argument list
>                   template argument list
>                     reference
>                       template
>                         qualified name
>                           name 'std'
>                           name 'vector'
>                         template argument list
>                           builtin type unsigned long
>                           template argument list
>                             template
>                               standard substitution std::allocator
>                               template argument list
>                                 builtin type unsigned long
>             template argument list
>               template
>                 qualified name
>                   qualified name
>                     name 'clover'
>                     name 'detail'
>                   name 'iterator_adaptor'
>                 template argument list
>                   lambda 0
>                     argument list
>                       builtin type unsigned long
>                   template argument list
>                     template argument list
>                       template
>                         qualified name
>                           name '__gnu_cxx'
>                           name '__normal_iterator'
>                         template argument list
>                           pointer
>                             builtin type unsigned long
>                           template argument list
>                             template
>                               qualified name
>                                 name 'std'
>                                 name 'vector'
>                               template argument list
>                                 builtin type unsigned long
>                                 template argument list
>                                   template
>                                     standard substitution std::allocator
>                                     template argument list
>                                       builtin type unsigned long
>               template argument list
>                 template
>                   qualified name
>                     name '__gnu_cxx'
>                     name '__normal_iterator'
>                   template argument list
>                     pointer
>                       builtin type unsigned long
>                     template argument list
>                       template
>                         qualified name
>                           name 'std'
>                           name 'vector'
>                         template argument list
>                           builtin type unsigned long
>                           template argument list
>                             template
>                               standard substitution std::allocator
>                               template argument list
>                                 builtin type unsigned long
>         conversion operator
>           template parameter 0
>       template argument list
>         template
>           qualified name
>             name 'std'
>             name 'vector'
>           template argument list
>             pointer
>               builtin type unsigned int
>             template argument list
>               template
>                 standard substitution std::allocator
>                 template argument list
>                   qualified name
>                     template
>                       qualified name
>                         qualified name
>                           name 'clover'
>                           name 'detail'
>                         name 'basic_range'
>                       template argument list
>                         template
>                           qualified name
>                             name 'clover'
>                             name 'adaptor_range'
>                           template argument list
>                             local name
>                               typed name
>                                 qualified name
>                                   qualified name
>                                     name 'clover'
>                                     name 'kernel'
>                                   name 'launch'
>                                 function type
>                                   argument list
>                                     reference
>                                       qualified name
>                                         name 'clover'
>                                         name 'command_queue'
>                                     argument list
>                                       reference
>                                         const
>                                           template
>                                             qualified name
>                                               name 'std'
>                                               name 'vector'
>                                             template argument list
>                                               builtin type unsigned long
>                                               template argument list
>                                                 template
>                                                   standard substitution std::allocator
>                                                   template argument list
>                                                     builtin type unsigned long
>                                       argument list
>                                         reference
>                                           const
>                                             template
>                                               qualified name
>                                                 name 'std'
>                                                 name 'vector'
>                                               template argument list
>                                                 builtin type unsigned long
>                                                 template argument list
>                                                   template
>                                                     standard substitution std::allocator
>                                                     template argument list
>                                                       builtin type unsigned long
>                                         argument list
>                                           reference
>                                             const
>                                               template
>                                                 qualified name
>                                                   name 'std'
>                                                   name 'vector'
>                                                 template argument list
>                                                   builtin type unsigned long
>                                                   template argument list
>                                                     template
>                                                       standard substitution std::allocator
>                                                       template argument list
>                                                         builtin type unsigned long
>                               lambda 0
>                                 argument list
>                                   builtin type unsigned long
>                             template argument list
>                               template argument list
>                                 reference
>                                   template
>                                     qualified name
>                                       name 'std'
>                                       name 'vector'
>                                     template argument list
>                                       builtin type unsigned long
>                                       template argument list
>                                         template
>                                           standard substitution std::allocator
>                                           template argument list
>                                             builtin type unsigned long
>                         template argument list
>                           template
>                             qualified name
>                               qualified name
>                                 name 'clover'
>                                 name 'detail'
>                               name 'iterator_adaptor'
>                             template argument list
>                               lambda 0
>                                 argument list
>                                   builtin type unsigned long
>                               template argument list
>                                 template argument list
>                                   template
>                                     qualified name
>                                       name '__gnu_cxx'
>                                       name '__normal_iterator'
>                                     template argument list
>                                       pointer
>                                         builtin type unsigned long
>                                       template argument list
>                                         template
>                                           qualified name
>                                             name 'std'
>                                             name 'vector'
>                                           template argument list
>                                             builtin type unsigned long
>                                             template argument list
>                                               template
>                                                 standard substitution std::allocator
>                                                 template argument list
>                                                   builtin type unsigned long
>                           template argument list
>                             template
>                               qualified name
>                                 name '__gnu_cxx'
>                                 name '__normal_iterator'
>                               template argument list
>                                 pointer
>                                   builtin type unsigned long
>                                 template argument list
>                                   template
>                                     qualified name
>                                       name 'std'
>                                       name 'vector'
>                                     template argument list
>                                       builtin type unsigned long
>                                       template argument list
>                                         template
>                                           standard substitution std::allocator
>                                           template argument list
>                                             builtin type unsigned long
>                     conversion operator
>                       template parameter 0
>         template argument list
>           builtin type void
>   function type
>     argument list
> zsh: segmentation fault (core dumped)  ./demangle 
> $
Comment 2 Jan Kratochvil 2016-08-15 16:12:13 UTC
Without a fix I do not know if it is the same problem or not:

_ZNK6clover6detail11basic_rangeINS_13adaptor_rangeIZNS_6kernel6launchERNS_13command_queueERKSt6vectorImSaImEESA_SA_EUlmE_JRS8_EEENS0_16iterator_adaptorISB_JN9__gnu_cxx17__normal_iteratorIPmS8_EEEEESJ_EcvT_IS6_IPjSaISN_EEvEEv
Comment 3 Jan Kratochvil 2016-09-18 22:24:30 UTC
Without a fix I do not know if it is the same problem or not:

_ZSt7forwardIRZZN6WebKit29NetworkConnectionToWebProcess26writeBlobsToTemporaryFilesERKN3WTF6VectorINS2_6StringELm0ENS2_15CrashOnOverflowELm16EEEmENUlRT_E_clIS7_EEDaSA_EUlvE_EOS9_RNSt16remove_referenceIS9_E4typeE

https://bugzilla.redhat.com/show_bug.cgi?id=1367131
Comment 4 Jan Kratochvil 2016-09-18 22:25:06 UTC
Comment 3 is for: https://bugzilla.redhat.com/show_bug.cgi?id=1377020
Comment 5 Orion Poplawski 2016-11-07 21:59:37 UTC
I'm seeing this as well:

../../gdb/cp-support.c:1615: demangler-warning: unable to demangle '_ZNK6clover6detail11basic_rangeINS_13adaptor_rangeIZNS_6kernel6launchERNS_13command_queueERKSt6vectorImSaImEESA_SA_EUlmE_JRS8_EEENS0_16iterator_adaptorISB_JN9__gnu_cxx17__normal_iteratorIPmS8_EEEEESJ_EcvT_IS6_IPjSaISN_EEvEEv' (demangler failed with signal 11)
Comment 6 Markus Trippelsdorf 2017-03-09 08:39:01 UTC
Fixed by r245978.