[Bug remote/33979] GDB client sends malformed thread-id when tid >31 bit unsigned integer

"cvs-commit at gcc dot gnu.org via Gdb-prs" <[email protected]>
Newsgroups gmane.comp.gdb.bugs.discuss
Message-ID <[email protected]/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=33979

--- Comment #12 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <[email protected]>:

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

commit e88bc211aebd80281c569e9144634d4f02004a7b
Author: Tom Tromey <[email protected]>
Date:   Thu Jul 2 13:32:25 2026 -0600

    Document remote protocol pid and thread id sizes

    The recent ptid work came from a bug where a problem was observed due
    to sign extension.  That bug also suggested documenting the guaranteed
    range of thread- and process-ids in the remote protocol.

    This patch documents these as being 32-bit values at minimum.  I also
    added static asserts to ensure this is true -- note that although
    'int' may be 16 bit per the C standard, I doubt gdb would build on
    such a host.

    I didn't specify a maximum because it is host-dependent.  This is
    perhaps something to change, and while I do have some work in this
    area, it's quite invasive.  Also, while widening the range here would
    be good, it would also be incompatible in a sense, where a newer
    protocol implementation may end up using values not supported by older
    versions of gdb.  Perhaps one idea would be to simply change these
    both to int32_t and move on.

    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33979
    Reviewed-By: Eli Zaretskii <[email protected]>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.