FS#72583 - [gdb] Upstream patch corrects gdbserver 11.1 MTE detection bug
Attached to Project:
Arch Linux
Opened by android (android) - Saturday, 30 October 2021, 00:18 GMT
Last edited by Toolybird (Toolybird) - Monday, 29 May 2023, 05:39 GMT
Opened by android (android) - Saturday, 30 October 2021, 00:18 GMT
Last edited by Toolybird (Toolybird) - Monday, 29 May 2023, 05:39 GMT
|
Details
Description:
The attached patch file updates the extra/gdb package to version 11.1-2: 0001-The-included-patch-corrects-an-MTE-detection-bug-in-.patch The patch is based on the git repo retrieved via: $ asp checkout gdb A feature branch is created, then one commit is made from the current HEAD at: cecb9317641192f847ed23575a69ce93a615d9c2 In addition to modifying PKGBUILD, the attached patch file includes a gdbserver patch from upstream, documented in the upstream bug report at: https://sourceware.org/bugzilla/show_bug.cgi?id=28355 The included patch corrects an MTE detection bug in gdbserver 11.1 From the upstream report: "If one has a kernel new enough that it has MTE awareness, and use a new enough gdbserver that knows about the tag_ctl register, it will run into this situation." The text of the error from gdbserver: ../../gdbserver/regcache.cc:257: A problem internal to GDBserver has been detected. Unknown register tag_ctl requested This bug only affects gdbserver 11.1. Steps to reproduce: Detailed instructions for reproducing the bug are documented in the upstream bug report. |
This task depends upon
Closed by Toolybird (Toolybird)
Monday, 29 May 2023, 05:39 GMT
Reason for closing: Fixed
Additional comments about closing: See comments
Monday, 29 May 2023, 05:39 GMT
Reason for closing: Fixed
Additional comments about closing: See comments
This patch is now submitted for review to upstream gdb:
https://sourceware.org/pipermail/gdb-patches/2021-November/182985.html
Can we update extra/gdb to 11.1-2 and incorporate this fix?
Thank you...
The patch has now been merged upstream:
Luis Machado <luis.machado at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #27 from Luis Machado <luis.machado at linaro dot org> ---
Fix pushed to both binutils-gdb-master and gdb-11.
Does this patch applies to 'gdb' package only (i.e. for x86 binary) or aarch64-linux-gnu-gdb needs this patch as well?
The patch has now been merged upstream:
Luis Machado <luis.machado at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #27 from Luis Machado <luis.machado at linaro dot org> ---
Fix pushed to both binutils-gdb-master and gdb-11.
The patch only affects the gdb package, since it contains the gdbserver binary. Only this package needs to be updated.
It could be possible to eliminate the aarch64-linux-gnu-gdb package by configuring gdb with support for multiple target architectures. I believe the "--enable-targets" config option will accept a list of architectures, but I haven't tried this myself.
Sorry for resending my last comment 8-( When I refreshed the page in my browser, I accidentally resent my last post.
> It could be possible to eliminate the aarch64-linux-gnu-gdb package by configuring gdb with support for multiple target architectures.
I would *love* to configure multi-arch support in one package. This will reduce a lot of unneeded work. If you do not mind could you please file a ticket with all the knowledge you have on this topic. And then assign the ticket to me.
OK, I've tested the new gdb 11.1-2 with gdbserver on aarch64 and aarch64-linux-gnu-gdb on x86_64.
Everything looks good! Thanks Anatol!
I think the multi-arch gdb would be convenient also, especially if it can be built with a limited number of arch targets (as opposed to --enable-targets=all).
Now that I'm all setup to build gdb, I'll try that out and let you know...