From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from kwanyin.sergiodj.net (kwanyin.sergiodj.net [158.69.185.54]) by sourceware.org (Postfix) with ESMTPS id 870B93858D34 for ; Fri, 19 Jun 2020 21:37:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 870B93858D34 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] Don't write to inferior_ptid in aix-thread.c From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Message-Id: <6dbdab44e57d21c895ef60246d0e7aadb3c076a4@gdb-build> Date: Fri, 19 Jun 2020 17:37:48 -0400 X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-testers@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-testers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 21:37:52 -0000 *** TEST RESULTS FOR COMMIT 6dbdab44e57d21c895ef60246d0e7aadb3c076a4 *** commit 6dbdab44e57d21c895ef60246d0e7aadb3c076a4 Author: Pedro Alves AuthorDate: Thu Jun 18 21:28:36 2020 +0100 Commit: Pedro Alves CommitDate: Thu Jun 18 23:18:08 2020 +0100 Don't write to inferior_ptid in aix-thread.c There are other writes in the file, but they seem more harmless. This one is changing the current thread permanently. gdb/ChangeLog: 2020-06-18 Pedro Alves * aix-thread.c (pd_update): Use switch_to_thread. diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2f15382031..cd2af5c7a0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2020-06-18 Pedro Alves + + * aix-thread.c (pd_update): Use switch_to_thread. + 2020-06-18 Pedro Alves * ravenscar-thread.c (ravenscar_thread_target): Update. diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c index f2bd05fef2..3963a08c84 100644 --- a/gdb/aix-thread.c +++ b/gdb/aix-thread.c @@ -902,7 +902,7 @@ pd_update (int set_infpid) { ptid = thread->ptid; if (set_infpid) - inferior_ptid = ptid; + switch_to_thread (thread); } return ptid; }