[Bug demangler/99935] Stack exhaustion demangling rust mangled name

2022-02-01 Thread nickc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99935

Nick Clifton  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #11 from Nick Clifton  ---
Fixed on mainline.

[Bug demangler/99935] Stack exhaustion demangling rust mangled name

2022-01-31 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99935

--- Comment #10 from CVS Commits  ---
The master branch has been updated by Nick Clifton :

https://gcc.gnu.org/g:f10bec5ffa487ad3033ed5f38cfd0fc7d696deab

commit r12-6945-gf10bec5ffa487ad3033ed5f38cfd0fc7d696deab
Author: Nick Clifton 
Date:   Mon Jan 31 14:28:42 2022 +

libiberty: Fix infinite recursion in rust demangler.

libiberty/
PR demangler/98886
PR demangler/99935
* rust-demangle.c (struct rust_demangler): Add a recursion
counter.
(demangle_path): Increment/decrement the recursion counter upon
entry and exit.  Fail if the counter exceeds a fixed limit.
(demangle_type): Likewise.
(rust_demangle_callback): Initialise the recursion counter,
disabling if requested by the option flags.

[Bug demangler/99935] Stack exhaustion demangling rust mangled name

2022-01-26 Thread nickc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99935

--- Comment #9 from Nick Clifton  ---
A revised patch to fix this PR has been prroposed on gcc-patches:

  https://gcc.gnu.org/pipermail/gcc-patches/2022-January/589277.html

[Bug demangler/99935] Stack exhaustion demangling rust mangled name

2022-01-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99935

Andrew Pinski  changed:

   What|Removed |Added

 CC||terrynini38514 at gmail dot com

--- Comment #8 from Andrew Pinski  ---
*** Bug 100968 has been marked as a duplicate of this bug. ***

[Bug demangler/99935] Stack exhaustion demangling rust mangled name

2022-01-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99935

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2022-01-22

[Bug demangler/99935] Stack exhaustion demangling rust mangled name

2022-01-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99935

Andrew Pinski  changed:

   What|Removed |Added

 CC||featherrain26 at gmail dot com

--- Comment #7 from Andrew Pinski  ---
*** Bug 98889 has been marked as a duplicate of this bug. ***

[Bug demangler/99935] Stack exhaustion demangling rust mangled name

2022-01-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99935

Andrew Pinski  changed:

   What|Removed |Added

 CC||eliz at gnu dot org

--- Comment #6 from Andrew Pinski  ---
*** Bug 101779 has been marked as a duplicate of this bug. ***

[Bug demangler/99935] Stack exhaustion demangling rust mangled name

2022-01-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99935

--- Comment #5 from Andrew Pinski  ---
*** Bug 104186 has been marked as a duplicate of this bug. ***

[Bug demangler/99935] Stack exhaustion demangling rust mangled name

2022-01-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99935

Andrew Pinski  changed:

   What|Removed |Added

 CC||sanjayr at ymail dot com

--- Comment #4 from Andrew Pinski  ---
*** Bug 104185 has been marked as a duplicate of this bug. ***

[Bug demangler/99935] Stack exhaustion demangling rust mangled name

2021-08-11 Thread nickc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99935

--- Comment #3 from Nick Clifton  ---
(In reply to Jonathan Wakely from comment #2)
> This patch breaks MinGW, see PR 101779

But it can be fixed by:
  https://sourceware.org/bugzilla/show_bug.cgi?id=28207

[Bug demangler/99935] Stack exhaustion demangling rust mangled name

2021-08-05 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99935

--- Comment #2 from Jonathan Wakely  ---
This patch breaks MinGW, see PR 101779

[Bug demangler/99935] Stack exhaustion demangling rust mangled name

2021-05-07 Thread nickc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99935

--- Comment #1 from Nick Clifton  ---
Created attachment 50777
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50777=edit
Proposed patch

Here is a possible patch for the problem, adding a recursion limit to the
demangle_path() function.

Note - a variation of this bug appears to have been reported on the Ubuntu
mailing lists with a different reproducer:

  https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/1925348