From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: gdb-patches@sourceware.org
Cc: Luis <luis.machado.foss@gmail.com>,
Joel Brobecker <brobecker@adacore.com>
Subject: [PATCH] GDB: aarch64: Use GCS features to calculate hash of struct aarch64_features
Date: Tue, 16 Sep 2025 22:03:49 -0300 [thread overview]
Message-ID: <20250917010349.263373-1-thiago.bauermann@linaro.org> (raw)
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;
}
};
next reply other threads:[~2025-09-17 1:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-17 1:03 Thiago Jung Bauermann [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250917010349.263373-1-thiago.bauermann@linaro.org \
--to=thiago.bauermann@linaro.org \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=luis.machado.foss@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox