Bug 31153 - [native-gdbserver] FAIL: gdb.ada/tasks.exp: info threads
Summary: [native-gdbserver] FAIL: gdb.ada/tasks.exp: info threads
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 15.1
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-12 21:04 UTC by Simon Marchi
Modified: 2024-01-09 14:15 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Marchi 2023-12-12 21:04:22 UTC
Since commit:

commit 07b3255c3bae7126a0d679f957788560351eb236
Author: Tom Tromey <tom@tromey.com>
Date:   Thu Jul 13 17:28:48 2023 -0600

    Filter invalid encodings from Linux thread names

I see the following failures when testing with native-gdbserver:

  FAIL: gdb.ada/tasks.exp: info threads
  FAIL: gdb.threads/names.exp: list threads
Comment 1 Tom Tromey 2023-12-12 23:56:56 UTC
Sorry, I meant to look into this one.
Comment 3 Sourceware Commits 2024-01-09 14:14:16 UTC
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=862180a2d10963494356ec089a16b808bab736bd

commit 862180a2d10963494356ec089a16b808bab736bd
Author: Tom Tromey <tromey@adacore.com>
Date:   Fri Dec 15 07:56:45 2023 -0700

    Fix two bugs in gdbserver thread name handling
    
    Simon pointed out that my earlier patch to gdbserver's thread name
    code:
    
        commit 07b3255c3bae7126a0d679f957788560351eb236
        Author: Tom Tromey <tom@tromey.com>
        Date:   Thu Jul 13 17:28:48 2023 -0600
    
            Filter invalid encodings from Linux thread names
    
    ... introduced a regression.  This bug was that the iconv output was
    not \0-terminated.
    
    Looking at it, I found another bug as well -- replace_non_ascii would
    not \0-terminate, and also would return the wrong pointer
    
    This patch fixes both of them.
    
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31153
Comment 4 Tom Tromey 2024-01-09 14:15:57 UTC
Fixed.