-
Notifications
You must be signed in to change notification settings - Fork 171
8345358: Some DLL Files are missing Windows Properties #611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👋 Welcome back abakhtin! A progress list of the required criteria for merging this PR into |
@alexeybakhtin This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 100 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
CI Failures are not related to the changes. |
@alexeybakhtin This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
Keep it open |
@alexeybakhtin This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
Please review |
Is it possible to create a new test to verify this change? |
Thank you for fixing.
|
@alexeybakhtin This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
This fix should be integrated. |
@alexeybakhtin This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a |
keep open |
@alexeybakhtin This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a |
/touch |
@tkiriyama The pull request is being re-evaluated and the inactivity timeout has been reset. |
@alexeybakhtin This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a |
Hi, @alexeybakhtin |
There is a request to make a test. I'm not sure how to make jtreg test for this issue. |
Hi, @alexeybakhtin I propose the following code, which I made based on tkiriyama`s comment, as a test for this PR fix. jdk/test/lib/property/CheckWindowsProperty.java /*
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @summary file property check for Windows .exe/.dll
* @requires os.family == "windows"
*/
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class CheckWindowsProperty {
public static void main(String[] args) throws Exception {
String targetDir = System.getProperty("test.jdk") + "\\";
String psCommand = String.format(
"Get-ChildItem -Path '%s' -include *.exe,*.dll -Recurse -File | " +
"ForEach-Object { " +
"$vi = $_.VersionInfo; " +
"@($vi.FileName, $vi.CompanyName, $vi.FileDescription, $vi.FileVersion, " +
"$vi.InternalName, $vi.Language, $vi.LegalCopyright, $vi.OriginalFilename, " +
"$vi.ProductName, $vi.ProductVersion) -join ';'" +
"}",
targetDir
);
ProcessBuilder pb = new ProcessBuilder("powershell", "-NoLogo", "-NoProfile",
"-Command", psCommand).redirectErrorStream(true);
Process p = pb.start();
p.getOutputStream().close();
try (BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()))) {
for (String line = br.readLine(); line != null; line = br.readLine()) {
checkFileProperty(line);
}
}
p.waitFor();
int exitCode = p.exitValue();
if (exitCode != 0) {
throw new RuntimeException("ExitCode is " + exitCode + ". PowerShell command failed.");
}
}
static void checkFileProperty(String line) {
// line format
// FileName;CompanyName;FileDescription;FileVersion;InternalName;Language;LegalCopyright;
// OriginalFilename;ProductName;ProductVersion
String[] data = line.split(";", -1);
String filename = data[0].substring(data[0].lastIndexOf(System.getProperty("file.separator")) + 1);
// skip Microsoft redist dll
if (filename.startsWith("api-ms-win") ||
filename.startsWith("msvcp") ||
filename.startsWith("ucrtbase") ||
filename.startsWith("vcruntime")) {
return;
}
if (filename.equals("freetype.dll") || filename.equals("sawindbg.dll")) {
for (int i = 1; i < data.length; i++) {
if (data[i] == null || !data[i].isEmpty()) {
throw new RuntimeException(data[i] +" is set in data[" + i + "]. data[" + i + "] should be empty for " + filename);
}
}
} else {
for (int i = 1; i < data.length; i++) {
if (data[i] == null || data[i].isEmpty()) {
throw new RuntimeException("data[" + i + "] should not be empty for " + filename);
}
}
}
}
} I confirmed that the test result is as follows: when this PR fix is not applied
when this PR fixis applied
I hope this is helpful. |
Hi @kurashige23, Thank you for the proposed test.
I would also add
to the header of the test What do you think? |
Thank you for checking with VMs from other vendors. I understand that the "freetype.dll" and "sawindbg.dll" properties change depending on the vendor, so I agree with your suggestion.
I think it's good. |
Co-authored-by: Taizo Kurashige <[email protected]>
e1561ef
to
9830a0e
Compare
@alexeybakhtin Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
@mrserb @tkiriyama could you please review the test provided by @kurashige23 |
LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like what happened here is JDK-8199639 went into 11u just a month before the original JDK-8345358 that was backported to 8u. The 8199639 change created SetupJdkLibrary
which was converted to SetupNativeCompilation
in the backport. What we should have caught is that this is not a 1-to-1 replacement. SetupJdkLibrary
is a wrapper around SetupNativeCompilation
which - you've guessed it - sets the RC_FLAGS
before calling SetupNativeCompilation
.
I might look and see if it's feasible to backport that change, so we don't miss this again in future, but this minimal fix will solve the current issue.
|
@alexeybakhtin this is just waiting for an approval request. |
Thank you. Just had a missprint in the label |
Ah, no worries. If you use the /approval request command on the PR, you can avoid having to alter the bug manually. /approve yes |
@gnu-andrew |
/integrate |
Going to push as commit 2b36fc1.
Your commit was automatically rebased without conflicts. |
@alexeybakhtin Pushed as commit 2b36fc1. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Add missing properties for the j2gss.dll and sspi_bridge.dll files
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/611/head:pull/611
$ git checkout pull/611
Update a local copy of the PR:
$ git checkout pull/611
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/611/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 611
View PR using the GUI difftool:
$ git pr show -t 611
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/611.diff
Using Webrev
Link to Webrev Comment