From nobody Mon Feb 20 13:44:17 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PL3YY3W76z3sqD7; Mon, 20 Feb 2023 13:44:17 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PL3YY2vCXz3pvH; Mon, 20 Feb 2023 13:44:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676900657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2YUDFSn5DRgb8YOO1qFowIdnGEfowcTKMEqJbNHrIhQ=; b=G+xrnnKOOHX1Qn3TXNNTOKTInFZ4eX1cMSLXR4zmwHqe9FlqGHTwDzk//XDhN9Q/FvpZD2 mGMjZXWwqw8GiRPka/wxz1+cSiMOoyC2aky0KGuTZsJ9mws1zRwFU/QFZkcf8BWx0TFgVa usGbmUn30fOiy0vrCj6CJJrwZM4y6sEB8h82qjBSiP1EOxdE4GiopRC2opfuJclnX/WcZc +FB5VUN1zb133qjztsgc+61EhSVCXopngkgvNlWRigrps4hH0Cuky7orfe/jwUq5Bh1lF5 6Hv24CsYgZKAYQol/Yv4g9Gc5P26fys5KntC07NNHgv7gSvrw6sxNOEEhfiU/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676900657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2YUDFSn5DRgb8YOO1qFowIdnGEfowcTKMEqJbNHrIhQ=; b=UQxcFhlTLXhsRl3aEkdKAOzwiql++QNEB0y6NKz7G7Xh11iEINKltOtqUdCrCI0ufAhwoA G8o1CPqb3sDbCk9dKWotImScQqGJVKsG4G8vdahpGzLOxUp+53Hb58pA+khzxdZmqSv21N qQMC3h60hF9QMjZj7/JSfvu2jbmhf7OmtX68TNprAw6arslLNO5VT/p223xsFAOC67PbYd z+n1O/XI1idiP9xFEEe/p+YwhRsapXwSBglA8923MmgeiMEckCHw/XsyUMfcNuMuNobnBB Bi9rLU/JpEZ6ddI6E3Fh7cRFH62VMtCvQhH0qIxtl0j5o/strcmToQYEaIyWjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676900657; a=rsa-sha256; cv=none; b=JLmDbQi6b7Q5JSewHWyB5ZbKGPUmFqU74PhdfA61lSz9TT3f/x67A6CVh1fAazxDKg0NlC cuI4tJ/jVqEYku746RWDsm6CGrcibK7kJLjq4vf9+q3oXlDUs98qKVJEtogVYaKPKjdLSx 0JXJpkgFS//dEIB4rcfzI3les4q1mRsU2HVGDpjBe1tM4JyQUP5ALPcUp/gXtCdMbmsf9T rMUG5HnYVHYT1S1w+JEZ7P8XT9URUrgs1L1MHcYySFabUQhc48EqNqNJ+cMYWk52Irtar+ f6Y2rPQQyZKJWeOsf8KTvtFGx9UYzZ+RNcWzmx/XRSav/ZFgAczJOQR86r0xxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PL3YY1hNRzjtR; Mon, 20 Feb 2023 13:44:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31KDiH5Y033972; Mon, 20 Feb 2023 13:44:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31KDiH3G033971; Mon, 20 Feb 2023 13:44:17 GMT (envelope-from git) Date: Mon, 20 Feb 2023 13:44:17 GMT Message-Id: <202302201344.31KDiH3G033971@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Piotr Kubaj Subject: git: 27753529c1e5 - main - java/openjdk8: commit forgotten patch List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27753529c1e5df3acbe6a4058b90295a2bb7d15d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=27753529c1e5df3acbe6a4058b90295a2bb7d15d commit 27753529c1e5df3acbe6a4058b90295a2bb7d15d Author: Piotr Kubaj AuthorDate: 2023-02-20 13:43:24 +0000 Commit: Piotr Kubaj CommitDate: 2023-02-20 13:44:06 +0000 java/openjdk8: commit forgotten patch Reported by: mikael --- .../files/patch-hotspot_agent_src_os_bsd_symtab.c | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/java/openjdk8/files/patch-hotspot_agent_src_os_bsd_symtab.c b/java/openjdk8/files/patch-hotspot_agent_src_os_bsd_symtab.c new file mode 100644 index 000000000000..31e6ef89f82b --- /dev/null +++ b/java/openjdk8/files/patch-hotspot_agent_src_os_bsd_symtab.c @@ -0,0 +1,50 @@ +--- hotspot/agent/src/os/bsd/symtab.c.orig 2023-02-18 20:21:09 UTC ++++ hotspot/agent/src/os/bsd/symtab.c +@@ -204,6 +204,38 @@ struct elf_section { + void *c_data; + }; + ++/* Find an ELF section. */ ++static struct elf_section *find_section_by_name(char *name, ++ int fd, ++ ELF_EHDR *ehdr, ++ ELF_SHDR *shbuf, ++ struct elf_section *scn_cache) ++{ ++ ELF_SHDR* cursct = NULL; ++ char *strtab; ++ int cnt; ++ ++ if (scn_cache[ehdr->e_shstrndx].c_data == NULL) { ++ if ((scn_cache[ehdr->e_shstrndx].c_data ++ = read_section_data(fd, ehdr, cursct)) == NULL) { ++ return NULL; ++ } ++ } ++ ++ strtab = scn_cache[ehdr->e_shstrndx].c_data; ++ ++ for (cursct = shbuf, cnt = 0; ++ cnt < ehdr->e_shnum; ++ cnt++, cursct++) { ++ if (strcmp(cursct->sh_name + strtab, name) == 0) { ++ scn_cache[cnt].c_data = read_section_data(fd, ehdr, cursct); ++ return &scn_cache[cnt]; ++ } ++ } ++ ++ return NULL; ++} ++ + // read symbol table from given fd. + struct symtab* build_symtab(int fd) { + ELF_EHDR ehdr; +@@ -263,7 +295,7 @@ struct symtab* build_symtab(int fd) { + } + + #if defined(ppc64) +- opd_sect = find_section_by_name(".opd", fd, &ehdr, scn_cache); ++ opd_sect = find_section_by_name(".opd", fd, &ehdr, cursct, scn_cache); + if (opd_sect != NULL && opd_sect->c_data != NULL && opd_sect->c_shdr != NULL) { + // plausibility check + opd = opd_sect->c_shdr;