]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Update libiberty demangler
authorMark Wielaard <mark@klomp.org>
Tue, 14 Apr 2026 00:26:44 +0000 (02:26 +0200)
committerMark Wielaard <mark@klomp.org>
Tue, 14 Apr 2026 00:26:44 +0000 (02:26 +0200)
Update the libiberty demangler using the auxprogs/update-demangler
script to gcc git commit a8290fb163443276c3df6b20024c6874f93c560c.

This update includes:

- Fix resource exhaustion in rust demangler (PR demangler/106641)
- Update copyright years.

12 files changed:
auxprogs/update-demangler
coregrind/m_demangle/ansidecl.h
coregrind/m_demangle/cp-demangle.c
coregrind/m_demangle/cp-demangle.h
coregrind/m_demangle/cplus-dem.c
coregrind/m_demangle/d-demangle.c
coregrind/m_demangle/demangle.h
coregrind/m_demangle/dyn-string.c
coregrind/m_demangle/dyn-string.h
coregrind/m_demangle/rust-demangle.c
coregrind/m_demangle/safe-ctype.c
coregrind/m_demangle/safe-ctype.h

index 3ac0c04ea0105d5ae02451795e16c9fa64e52ab1..2f13f4bba1d7be301cb656d66a914812daeeecf5 100755 (executable)
@@ -17,8 +17,8 @@ set -e
 #---------------------------------------------------------------------
 
 # You need to modify these revision numbers for your update.
-old_gcc_revision=94bea5dd6c9a06ddb6244be1e5196ff5fbe2b186 # the revision of the previous update
-new_gcc_revision=7921bb4afcb7a3be8e10e63b10acfc2bfa477cae # the revision for this update
+old_gcc_revision=7921bb4afcb7a3be8e10e63b10acfc2bfa477cae # the revision of the previous update
+new_gcc_revision=a8290fb163443276c3df6b20024c6874f93c560c # the revision for this update
 
 # Unless the organization of demangler related files has changed, no
 # changes below this line should be necessary.
index 534b05251d46b5d345bbc665a2bd324f8c946650..14231e8b0d83ff818524d9e0658b09acc1209fe3 100644 (file)
@@ -1,5 +1,5 @@
 /* Compiler compatibility macros
-   Copyright (C) 1991-2025 Free Software Foundation, Inc.
+   Copyright (C) 1991-2026 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
 This program is free software; you can redistribute it and/or modify
index 3bf5a372efce138061ffd9841313885ca96d44f5..9ea5c96267acd24f2f1b723d1f303c97c291b5f3 100644 (file)
@@ -1,5 +1,5 @@
 /* Demangler for g++ V3 ABI.
-   Copyright (C) 2003-2025 Free Software Foundation, Inc.
+   Copyright (C) 2003-2026 Free Software Foundation, Inc.
    Written by Ian Lance Taylor <ian@wasabisystems.com>.
 
    This file is part of the libiberty library, which is part of GCC.
index 9b33a2f84c1c08dba1330dfdbed7d5764087095c..a89aa06bc14bc618cf7ce4773e1f914334f9944e 100644 (file)
@@ -1,5 +1,5 @@
 /* Internal demangler interface for g++ V3 ABI.
-   Copyright (C) 2003-2025 Free Software Foundation, Inc.
+   Copyright (C) 2003-2026 Free Software Foundation, Inc.
    Written by Ian Lance Taylor <ian@wasabisystems.com>.
 
    This file is part of the libiberty library, which is part of GCC.
index 9d173c03db676c82dab05ef3b8a2cde4bdb6af6f..8e55faffbb4e1d4fc6e1ead299faeb4974d17d88 100644 (file)
@@ -1,5 +1,5 @@
 /* Demangler for GNU C++
-   Copyright (C) 1989-2025 Free Software Foundation, Inc.
+   Copyright (C) 1989-2026 Free Software Foundation, Inc.
    Written by James Clark (jjc@jclark.uucp)
    Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling
    Modified by Satish Pai (pai@apollo.hp.com) for HP demangling
index 2f44211eb7ef4869cf70eb108010fb8443d8df2a..a406ddd4bd917ddd5529c409a1e14672fb1fc209 100644 (file)
@@ -1,5 +1,5 @@
 /* Demangler for the D programming language
-   Copyright (C) 2014-2025 Free Software Foundation, Inc.
+   Copyright (C) 2014-2026 Free Software Foundation, Inc.
    Written by Iain Buclaw (ibuclaw@gdcproject.org)
 
 This file is part of the libiberty library.
index 010c103d0be43cccce7051358768c052de5c02f9..075660d6425ef7dab269f9c0fa90a6c31dfc699f 100644 (file)
@@ -1,5 +1,5 @@
 /* Defs for interface to demanglers.
-   Copyright (C) 1992-2025 Free Software Foundation, Inc.
+   Copyright (C) 1992-2026 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public License
index 38ad5eb5ff3fcedde09ecfa87c375b0d2e45c3ca..676178031d9274cd6483454ce8c7ae90fbe43c4a 100644 (file)
@@ -1,5 +1,5 @@
 /* An abstract string datatype.
-   Copyright (C) 1998-2025 Free Software Foundation, Inc.
+   Copyright (C) 1998-2026 Free Software Foundation, Inc.
    Contributed by Mark Mitchell (mark@markmitchell.com).
 
 This file is part of GNU CC.
index 7e07a4d9267fe4d02c6fb2874526ae7d15db16e8..5b0c0671f43c534203b94cc05174c0c5f992be1e 100644 (file)
@@ -1,5 +1,5 @@
 /* An abstract string datatype.
-   Copyright (C) 1998-2025 Free Software Foundation, Inc.
+   Copyright (C) 1998-2026 Free Software Foundation, Inc.
    Contributed by Mark Mitchell (mark@markmitchell.com).
 
 This file is part of GCC.
index 70f13d7c4d0f23fea3e104e71698f06f905d94d9..717d8c45d9d80e78a2ab2850ada31a60e2b8b0f3 100644 (file)
@@ -1,5 +1,5 @@
 /* Demangler for the Rust programming language
-   Copyright (C) 2016-2025 Free Software Foundation, Inc.
+   Copyright (C) 2016-2026 Free Software Foundation, Inc.
    Written by David Tolnay (dtolnay@gmail.com).
    Rewritten by Eduard-Mihai Burtescu (eddyb@lyken.rs) for v0 support.
 
@@ -678,10 +678,17 @@ demangle_binder (struct rust_demangler *rdm)
     return;
 
   bound_lifetimes = parse_opt_integer_62 (rdm, 'G');
+  /* Reject implausibly large lifetime counts to prevent
+     resource exhaustion from crafted symbols (PR demangler/106641).  */
+  if (bound_lifetimes > 1024)
+    {
+      rdm->errored = 1;
+      return;
+    }
   if (bound_lifetimes > 0)
     {
       PRINT ("for<");
-      for (i = 0; i < bound_lifetimes; i++)
+      for (i = 0; i < bound_lifetimes && !rdm->errored; i++)
         {
           if (i > 0)
             PRINT (", ");
index 95c41cd68f01ce712ce1a13be715b9f16ebc08de..bf8b2529e0b40175281cf1d45a9a0c0ba7da2bf1 100644 (file)
@@ -1,6 +1,6 @@
 /* <ctype.h> replacement macros.
 
-   Copyright (C) 2000-2025 Free Software Foundation, Inc.
+   Copyright (C) 2000-2026 Free Software Foundation, Inc.
    Contributed by Zack Weinberg <zackw@stanford.edu>.
 
 This file is part of the libiberty library.
index c0f8042281eb85bec394b39dbcd3c163371f01bd..ae3d8cac140a3ff8843cb0fa846690826a8c60e9 100644 (file)
@@ -1,6 +1,6 @@
 /* <ctype.h> replacement macros.
 
-   Copyright (C) 2000-2025 Free Software Foundation, Inc.
+   Copyright (C) 2000-2026 Free Software Foundation, Inc.
    Contributed by Zack Weinberg <zackw@stanford.edu>.
 
 This file is part of the libiberty library.