Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] GDB: aarch64: Use GCS features to calculate hash of struct aarch64_features
@ 2025-09-17  1:03 Thiago Jung Bauermann
  2025-09-17  2:50 ` Joel Brobecker
  2025-09-17 17:42 ` Luis
  0 siblings, 2 replies; 7+ messages in thread
From: Thiago Jung Bauermann @ 2025-09-17  1:03 UTC (permalink / raw)
  To: gdb-patches; +Cc: Luis, Joel Brobecker

Luis noticed that when adding the gcs and gcs_linux members to struct
aarch64_features in my Guarded Control Stack patch series, I neglected to
modify struct hash<aarch64_features>::operator() to take them into account
when computing its hash.

This can cause GDB to use the wrong aarch64_features object during a
debugging session.

Regression tested on aarch64-linux-gnu.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33440
Suggested-by: Luis <luis.machado.foss@gmail.com>
---

This should also be backported to the branch. Unfortunately I'm not able
to set the target milestone in Bugzilla.

 gdb/arch/aarch64.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gdb/arch/aarch64.h b/gdb/arch/aarch64.h
index 679d845df74e..0fcdba7fb7d6 100644
--- a/gdb/arch/aarch64.h
+++ b/gdb/arch/aarch64.h
@@ -94,6 +94,10 @@ namespace std
 
       /* SME2 feature.  */
       h = h << 1 | features.sme2;
+
+      h = h << 1 | features.gcs;
+      h = h << 1 | features.gcs_linux;
+
       return h;
     }
   };

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-09-17 20:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-17  1:03 [PATCH] GDB: aarch64: Use GCS features to calculate hash of struct aarch64_features Thiago Jung Bauermann
2025-09-17  2:50 ` Joel Brobecker
2025-09-17 14:02   ` Tom Tromey
2025-09-17 20:06     ` Thiago Jung Bauermann
2025-09-17 20:54       ` Joel Brobecker
2025-09-17 17:42 ` Luis
2025-09-17 19:58   ` Thiago Jung Bauermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox