View | Details | Return to bug 70909 | Differences between
and this patch

Collapse All | Expand All

(-)a/include/demangle.h (+3 lines)
Lines 597-602 struct demangle_component Link Here
597
    } s_unary_num;
597
    } s_unary_num;
598
598
599
  } u;
599
  } u;
600
601
  /* Guard against recursive component printing.  Initialize to zero.  */
602
  int d_printing;
600
};
603
};
601
604
602
/* People building mangled trees are expected to allocate instances of
605
/* People building mangled trees are expected to allocate instances of
(-)a/libiberty/cp-demangle.c (+12 lines)
Lines 921-926 d_make_empty (struct d_info *di) Link Here
921
  if (di->next_comp >= di->num_comps)
921
  if (di->next_comp >= di->num_comps)
922
    return NULL;
922
    return NULL;
923
  p = &di->comps[di->next_comp];
923
  p = &di->comps[di->next_comp];
924
  p->d_printing = 0;
924
  ++di->next_comp;
925
  ++di->next_comp;
925
  return p;
926
  return p;
926
}
927
}
Lines 5646-5651 d_print_comp (struct d_print_info *dpi, int options, Link Here
5646
	      const struct demangle_component *dc)
5647
	      const struct demangle_component *dc)
5647
{
5648
{
5648
  struct d_component_stack self;
5649
  struct d_component_stack self;
5650
  /* We need to cheat for the endless recursive printing protection.
5651
     Note that we do allow one level of recursion because... ???  */
5652
  struct demangle_component *dc1 = (struct demangle_component *) dc;
5653
  if (dc1 == NULL || dc1->d_printing > 1)
5654
    {
5655
      d_print_error (dpi);
5656
      return;
5657
    }
5658
  else
5659
    dc1->d_printing++;
5649
5660
5650
  self.dc = dc;
5661
  self.dc = dc;
5651
  self.parent = dpi->component_stack;
5662
  self.parent = dpi->component_stack;
Lines 5654-5659 d_print_comp (struct d_print_info *dpi, int options, Link Here
5654
  d_print_comp_inner (dpi, options, dc);
5665
  d_print_comp_inner (dpi, options, dc);
5655
5666
5656
  dpi->component_stack = self.parent;
5667
  dpi->component_stack = self.parent;
5668
  dc1->d_printing--;
5657
}
5669
}
5658
5670
5659
/* Print a Java dentifier.  For Java we try to handle encoded extended
5671
/* Print a Java dentifier.  For Java we try to handle encoded extended
(-)a/libiberty/cp-demint.c (+3 lines)
Lines 123-128 cplus_demangle_fill_component (struct demangle_component *p, Link Here
123
  p->type = type;
123
  p->type = type;
124
  p->u.s_binary.left = left;
124
  p->u.s_binary.left = left;
125
  p->u.s_binary.right = right;
125
  p->u.s_binary.right = right;
126
  p->d_printing = 0;
126
127
127
  return 1;
128
  return 1;
128
}
129
}
Lines 146-151 cplus_demangle_fill_builtin_type (struct demangle_component *p, Link Here
146
	{
147
	{
147
	  p->type = DEMANGLE_COMPONENT_BUILTIN_TYPE;
148
	  p->type = DEMANGLE_COMPONENT_BUILTIN_TYPE;
148
	  p->u.s_builtin.type = &cplus_demangle_builtin_types[i];
149
	  p->u.s_builtin.type = &cplus_demangle_builtin_types[i];
150
	  p->d_printing = 0;
149
	  return 1;
151
	  return 1;
150
	}
152
	}
151
    }
153
    }
Lines 172-177 cplus_demangle_fill_operator (struct demangle_component *p, Link Here
172
	{
174
	{
173
	  p->type = DEMANGLE_COMPONENT_OPERATOR;
175
	  p->type = DEMANGLE_COMPONENT_OPERATOR;
174
	  p->u.s_operator.op = &cplus_demangle_operators[i];
176
	  p->u.s_operator.op = &cplus_demangle_operators[i];
177
	  p->d_printing = 0;
175
	  return 1;
178
	  return 1;
176
	}
179
	}
177
    }
180
    }
(-)a/libiberty/testsuite/demangle-expected (+70 lines)
Lines 4634-4636 _Z12binary_rightIJLi1ELi2ELi3EEEv1AIXfRplT_LiEEE Link Here
4634
# ?: expression with missing third component could crash.
4634
# ?: expression with missing third component could crash.
4635
AquT_quT_4mxautouT_4mxxx
4635
AquT_quT_4mxautouT_4mxxx
4636
AquT_quT_4mxautouT_4mxxx
4636
AquT_quT_4mxautouT_4mxxx
4637
#
4638
# Test demangler crash PR62279
4639
4640
_ZN5Utils9transformIPN15ProjectExplorer13BuildStepListEZNKS1_18BuildConfiguration14knownStepListsEvEUlS3_E_EE5QListIDTclfp0_cvT__EEEERKS6_IS7_ET0_
4641
QList<decltype ({parm#2}((ProjectExplorer::BuildStepList*)()))> Utils::transform<ProjectExplorer::BuildStepList*, ProjectExplorer::BuildConfiguration::knownStepLists() const::{lambda(ProjectExplorer::BuildStepList*)#1}>(ProjectExplorer::BuildConfiguration::knownStepLists() const::{lambda(ProjectExplorer::BuildStepList*)#1}<QList> const&, ProjectExplorer::BuildConfiguration::knownStepLists() const::{lambda(ProjectExplorer::BuildStepList*)#1})
4642
#
4643
4644
_ZSt7forwardIKSaINSt6thread5_ImplISt12_Bind_simpleIFZN6WIM_DL5Utils9AsyncTaskC4IMNS3_8Hardware12FpgaWatchdogEKFvvEIPS8_EEEibOT_DpOT0_EUlvE_vEEEEEESD_RNSt16remove_referenceISC_E4typeE
4645
std::allocator<std::thread::_Impl<std::_Bind_simple<WIM_DL::Utils::AsyncTask::AsyncTask<void (WIM_DL::Hardware::FpgaWatchdog::*)() const, WIM_DL::Hardware::FpgaWatchdog*>(int, bool, void (WIM_DL::Hardware::FpgaWatchdog::*&&)() const, WIM_DL::Hardware::FpgaWatchdog*&&)::{lambda()#1} ()> > > const&& std::forward<std::allocator<std::thread::_Impl<std::_Bind_simple<WIM_DL::Utils::AsyncTask::AsyncTask<void (WIM_DL::Hardware::FpgaWatchdog::*)() const, WIM_DL::Hardware::FpgaWatchdog*>(int, bool, std::allocator<std::thread::_Impl<std::_Bind_simple<WIM_DL::Utils::AsyncTask::AsyncTask<void (WIM_DL::Hardware::FpgaWatchdog::*)() const, WIM_DL::Hardware::FpgaWatchdog*>(int, bool, void (WIM_DL::Hardware::FpgaWatchdog::*&&)() const, WIM_DL::Hardware::FpgaWatchdog*&&)::{lambda()#1} ()> > > const&&, WIM_DL::Hardware::FpgaWatchdog*&&)::{lambda()#1} ()> > > const>(std::remove_reference<std::allocator<std::thread::_Impl<std::_Bind_simple<WIM_DL::Utils::AsyncTask::AsyncTask<void (WIM_DL::Hardware::FpgaWatchdog::*)() const, WIM_DL::Hardware::FpgaWatchdog*>(int, bool, void (WIM_DL::Hardware::FpgaWatchdog::*&&)() const, WIM_DL::Hardware::FpgaWatchdog*&&)::{lambda()#1} ()> > > const>::type&)
4646
#
4647
# Test demangler crash PR61805
4648
4649
_ZNK5niven5ColorIfLi4EEdvIfEENSt9enable_ifIXsrSt13is_arithmeticIT_E5valueEKNS0_IDTmlcvS5__Ecvf_EELi4EEEE4typeES5_
4650
std::enable_if<std::is_arithmetic<float>::value, niven::Color<decltype (((float)())*((float)())), 4> const>::type niven::Color<float, 4>::operator/<float>(float) const
4651
#
4652
# Test recursion PR70517
4653
4654
_ZSt4moveIRZN11tconcurrent6futureIvE4thenIZ5awaitIS2_EDaOT_EUlRKS6_E_EENS1_INSt5decayIDTclfp_defpTEEE4typeEEES7_EUlvE_EONSt16remove_referenceIS6_E4typeES7_
4655
_ZSt4moveIRZN11tconcurrent6futureIvE4thenIZ5awaitIS2_EDaOT_EUlRKS6_E_EENS1_INSt5decayIDTclfp_defpTEEE4typeEEES7_EUlvE_EONSt16remove_referenceIS6_E4typeES7_
4656
#
4657
# Test recursion PR68383
4658
4659
_ZSt7forwardIRKZN5Write14DataMapGrammarISt20back_insert_iteratorISsEEC4EvEUlRT_E_EOS5_RNSt16remove_referenceIS5_E4typeE
4660
_ZSt7forwardIRKZN5Write14DataMapGrammarISt20back_insert_iteratorISsEEC4EvEUlRT_E_EOS5_RNSt16remove_referenceIS5_E4typeE
4661
#
4662
# Test recursion PR67264
4663
4664
_Z1KIStcvT_E
4665
_Z1KIStcvT_E
4666
4667
_ZcvT_IIS0_EE
4668
_ZcvT_IIS0_EE
4669
4670
_ZcvT_IZcvT_E1fE
4671
_ZcvT_IZcvT_E1fE
4672
4673
_Z1gINcvT_EE
4674
_Z1gINcvT_EE
4675
4676
_ZcvT_ILZcvDTT_EEE
4677
_ZcvT_ILZcvDTT_EEE
4678
4679
_Z1gIJOOT_EEOT_c
4680
_Z1gIJOOT_EEOT_c
4681
4682
_Z1KMMMMMMMMMMMMMMMA_xooooooooooooooo
4683
_Z1KMMMMMMMMMMMMMMMA_xooooooooooooooo
4684
4685
_ZdvMMMMMMMMMMMMMrrrrA_DTdvfp_fp_Eededilfdfdfdfd
4686
_ZdvMMMMMMMMMMMMMrrrrA_DTdvfp_fp_Eededilfdfdfdfd
4687
#
4688
# Test for Infinite Recursion PR67738
4689
4690
_ZNK6Common15ConvertingRangeIN5boost12range_detail17transformed_rangeIZN1a1b1cEbEUljE_KSt6vectorIjSaIjEEEEEcvT_IS7_INS4_1dESaISF_EEEEv
4691
_ZNK6Common15ConvertingRangeIN5boost12range_detail17transformed_rangeIZN1a1b1cEbEUljE_KSt6vectorIjSaIjEEEEEcvT_IS7_INS4_1dESaISF_EEEEv
4692
#
4693
# Test for Infinite Recursion PR68700
4694
4695
_ZN8futurizeI13frozen_schemaE5applyIRZN7seastar7shardedIN7service13storage_proxyEE9invoke_onIZZNS6_22init_messaging_serviceEvENKUljN5utils4UUIDEE8_clEjSA_EUlOT_E_6futureIJS0_EEEET0_jSD_EUlvE_JEEESG_SD_DpOT0_
4696
_ZN8futurizeI13frozen_schemaE5applyIRZN7seastar7shardedIN7service13storage_proxyEE9invoke_onIZZNS6_22init_messaging_serviceEvENKUljN5utils4UUIDEE8_clEjSA_EUlOT_E_6futureIJS0_EEEET0_jSD_EUlvE_JEEESG_SD_DpOT0_
4697
#
4698
# Test for Infinite Recursion PR61460
4699
4700
_ZNK6clover6detail11basic_rangeINS_13adaptor_rangeINS_9addressesEINS2_IRFRNS_5eventEP9_cl_eventEINS_14iterator_rangeIPKS7_EEEEEEEENS0_16iterator_adaptorIS3_INSG_IS9_ISC_EEEEEESI_EcvT_ISt6vectorIPS4_SaISN_EEvEEv
4701
_ZNK6clover6detail11basic_rangeINS_13adaptor_rangeINS_9addressesEINS2_IRFRNS_5eventEP9_cl_eventEINS_14iterator_rangeIPKS7_EEEEEEEENS0_16iterator_adaptorIS3_INSG_IS9_ISC_EEEEEESI_EcvT_ISt6vectorIPS4_SaISN_EEvEEv
4702
#
4703
# Test for Infinite Recursion PR70909
4704
4705
_ZSt4moveIRZN11trompeloeil13call_modifierINS0_12call_matcherIFiiESt5tupleIJNS0_17predicate_matcherIZNS0_11any_matcherIiEEDaPKcEUlOT_E_ZNS6_IiEES7_S9_EUlRSoE_NS0_13typed_matcherIiEEJEEEEEEEN6mock_c36trompeloeil_tag_type_trompeloeil_135ENS0_12matcher_infoIS3_EEE12handle_throwIZN12_GLOBAL__N_131____C_A_T_C_H____T_E_S_T____6454testEvE4$_42EENS1_ISJ_SL_NS0_14throw_injectorISN_EEEESB_EUlRSA_E_EONSt16remove_referenceISA_E4typeESB_
4706
_ZSt4moveIRZN11trompeloeil13call_modifierINS0_12call_matcherIFiiESt5tupleIJNS0_17predicate_matcherIZNS0_11any_matcherIiEEDaPKcEUlOT_E_ZNS6_IiEES7_S9_EUlRSoE_NS0_13typed_matcherIiEEJEEEEEEEN6mock_c36trompeloeil_tag_type_trompeloeil_135ENS0_12matcher_infoIS3_EEE12handle_throwIZN12_GLOBAL__N_131____C_A_T_C_H____T_E_S_T____6454testEvE4$_42EENS1_ISJ_SL_NS0_14throw_injectorISN_EEEESB_EUlRSA_E_EONSt16remove_referenceISA_E4typeESB_

Return to bug 70909