[Bug testsuite/34340] ptid_t selftest segfaults
"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=34340 --- Comment #3 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=c6ed245a1999a1b424d71ca3d3f72ecab639f9f9 commit c6ed245a1999a1b424d71ca3d3f72ecab639f9f9 Author: Tom Tromey <[email protected]> Date: Thu Jul 2 06:51:36 2026 -0600 Fix ptid_t selftest crash Sam James pointed out that my recent patch to add ptid_t::parse caused a selftest crash. At first I couldn't see why this did not crash for me, but then I realized that ptid_t::parse didn't unconditionally initialize '*obuf'. Initializing it to nullptr made this crash reliably. The underlying bug is that some code paths in ptid_t::parse don't set obuf on return. This patch fixes the bug by passing 'obuf' down to hex_or_minus_one. Since this is straightforward and fixes a new crash, I'm checking it in. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34340 -- You are receiving this mail because: You are on the CC list for the bug.