-
Notifications
You must be signed in to change notification settings - Fork 167
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
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back abakhtin! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
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. |
Add missing properties for the j2gss.dll and sspi_bridge.dll files
Progress
Issue
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