From owner-svn-src-all@freebsd.org Sat Apr 25 15:51:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3FC42B641C; Sat, 25 Apr 2020 15:51:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498bBC4Nh7z4FkR; Sat, 25 Apr 2020 15:51:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77E62A116; Sat, 25 Apr 2020 15:51:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFpV2q076021; Sat, 25 Apr 2020 15:51:31 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFpV5I076020; Sat, 25 Apr 2020 15:51:31 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251551.03PFpV5I076020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 15:51:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360318 - in stable: 11/contrib/binutils/bfd 11/contrib/binutils/binutils 12/contrib/binutils/bfd 12/contrib/binutils/binutils X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/binutils/bfd 11/contrib/binutils/binutils 12/contrib/binutils/bfd 12/contrib/binutils/binutils X-SVN-Commit-Revision: 360318 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:51:31 -0000 Author: dim Date: Sat Apr 25 15:51:30 2020 New Revision: 360318 URL: https://svnweb.freebsd.org/changeset/base/360318 Log: MFC r354057 (by brooks): binutils: Fix bugs found by -Wpointer-compare The MIPS bug was introduced by upstream commit 7403cb630, which failed to account for the additional indirection introduced and also dropped one of the checks; change it to the standard "NULL-or-empty" check as used elsewhere in BFD, which is also what upstream now has. Submitted by: James Clarke Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D21911 Modified: stable/11/contrib/binutils/bfd/elfxx-mips.c stable/11/contrib/binutils/binutils/stabs.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/binutils/bfd/elfxx-mips.c stable/12/contrib/binutils/binutils/stabs.c Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/binutils/bfd/elfxx-mips.c ============================================================================== --- stable/11/contrib/binutils/bfd/elfxx-mips.c Sat Apr 25 15:45:43 2020 (r360317) +++ stable/11/contrib/binutils/bfd/elfxx-mips.c Sat Apr 25 15:51:30 2020 (r360318) @@ -3966,7 +3966,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_b *namep = bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link, sym->st_name); - if (*namep == '\0') + if (*namep == NULL || **namep == '\0') *namep = bfd_section_name (input_bfd, sec); target_is_16_bit_code_p = (sym->st_other == STO_MIPS16); Modified: stable/11/contrib/binutils/binutils/stabs.c ============================================================================== --- stable/11/contrib/binutils/binutils/stabs.c Sat Apr 25 15:45:43 2020 (r360317) +++ stable/11/contrib/binutils/binutils/stabs.c Sat Apr 25 15:51:30 2020 (r360318) @@ -2668,7 +2668,7 @@ parse_stab_members (void *dhandle, struct stab_handle ++*pp; voffset &= 0x7fffffff; - if (**pp == ';' || *pp == '\0') + if (**pp == ';' || **pp == '\0') { /* Must be g++ version 1. */ context = DEBUG_TYPE_NULL;