Re: RFR: 8336289: Obliterate most references to _snprintf in the Windows JDK [v3]

2024-07-16 Thread Daniel Jeliński
On Tue, 16 Jul 2024 08:59:20 GMT, Julian Waters wrote: >> snprintf has been available for all officially and unofficially supported >> compilers for Windows, Visual Studio since version 2015 and gcc since, well, >> forever. snprintf is conforming to C99 since the start when compiling using >>

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v4]

2024-02-27 Thread Daniel Jeliński
On Tue, 27 Feb 2024 11:19:59 GMT, Magnus Ihse Bursie wrote: >> The idea of setting up general "toolchains" in the native build was good, >> but it turned out that we really only need a single toolchain, with a single >> twist: if it should use CC or CPP to link. This is better described by a >

Re: RFR: 8326583: Remove over-generalized DefineNativeToolchain solution [v3]

2024-02-27 Thread Daniel Jeliński
On Mon, 26 Feb 2024 20:21:55 GMT, Magnus Ihse Bursie wrote: >> The idea of setting up general "toolchains" in the native build was good, >> but it turned out that we really only need a single toolchain, with a single >> twist: if it should use CC or CPP to link. This is better described by a >

Integrated: 8311301: MethodExitTest may fail with stack buffer overrun

2023-07-06 Thread Daniel Jeliński
On Tue, 4 Jul 2023 17:33:02 GMT, Daniel Jeliński wrote: > Please review this test-only fix that fixes the size of variables that are > used in methods that expect a pointer. > > On Windows, type `long` is 32 bits, pointers are 64 bits large. The method > `GetThreadLocalSt

Re: RFR: 8311301: MethodExitTest may fail with stack buffer overrun [v2]

2023-07-06 Thread Daniel Jeliński
On Thu, 6 Jul 2023 07:08:00 GMT, David Holmes wrote: >> Daniel Jeliński has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Use void* instead > > test/hotspot/jtreg/serviceability/jvmti/vthread/MethodExitTest

Re: RFR: 8311301: MethodExitTest may fail with stack buffer overrun [v2]

2023-07-06 Thread Daniel Jeliński
On Wed, 5 Jul 2023 06:40:11 GMT, Daniel Jeliński wrote: >> Please review this test-only fix that fixes the size of variables that are >> used in methods that expect a pointer. >> >> On Windows, type `long` is 32 bits, pointers are 64 bits large. The method >> `G

Re: RFR: 8311301: MethodExitTest may fail with stack buffer overrun

2023-07-04 Thread Daniel Jeliński
On Tue, 4 Jul 2023 17:33:02 GMT, Daniel Jeliński wrote: > Please review this test-only fix that fixes the size of variables that are > used in methods that expect a pointer. > > On Windows, type `long` is 32 bits, pointers are 64 bits large. The method > `GetThreadLocalSt

Re: RFR: 8311301: MethodExitTest may fail with stack buffer overrun [v2]

2023-07-04 Thread Daniel Jeliński
> its parameter, which overflows a `long`. The code generated by VS compiler > ignores this, but the code generated by clang crashes the test. > > No new tests. MethodExitTest continues to pass on supported platforms, and > passes on clang+win with this fix. Daniel Jelińsk

RFR: 8311301: MethodExitTest may fail with stack buffer overrun

2023-07-04 Thread Daniel Jeliński
Please review this test-only fix that fixes the size of variables that are used in methods that expect a pointer. On Windows, type `long` is 32 bits, pointers are 64 bits large. The method `GetThreadLocalStorage` writes a pointer (64 bits) to the address given by its parameter, which overflows

Integrated: 8310948: Fix ignored-qualifiers warning in Hotspot

2023-07-03 Thread Daniel Jeliński
On Tue, 27 Jun 2023 12:22:43 GMT, Daniel Jeliński wrote: > Please review this attempt to fix ignored-qualifiers warning. > > Example warnings: > > src/hotspot/share/oops/method.hpp:413:19: warning: 'volatile' type qualifier > on return type has no

Re: RFR: 8310948: Fix ignored-qualifiers warning in Hotspot

2023-07-03 Thread Daniel Jeliński
On Tue, 27 Jun 2023 12:22:43 GMT, Daniel Jeliński wrote: > Please review this attempt to fix ignored-qualifiers warning. > > Example warnings: > > src/hotspot/share/oops/method.hpp:413:19: warning: 'volatile' type qualifier > on return type has no

Re: RFR: 8310948: Fix ignored-qualifiers warning in Hotspot

2023-07-03 Thread Daniel Jeliński
On Mon, 3 Jul 2023 06:47:04 GMT, Daniel Jeliński wrote: >> src/hotspot/cpu/aarch64/aarch64.ad line 2288: >> >>> 2286: >>> //= >>> 2287: >>> 2288: const bool Matcher::m

Re: RFR: 8310948: Fix ignored-qualifiers warning in Hotspot

2023-07-02 Thread Daniel Jeliński
On Mon, 3 Jul 2023 00:19:56 GMT, David Holmes wrote: >> Please review this attempt to fix ignored-qualifiers warning. >> >> Example warnings: >> >> src/hotspot/share/oops/method.hpp:413:19: warning: 'volatile' type qualifier >> on return type has no effect [-Wignored-qualifiers] >>Compiled

Re: RFR: 8310948: Fix ignored-qualifiers warning in Hotspot

2023-06-30 Thread Daniel Jeliński
On Tue, 27 Jun 2023 12:22:43 GMT, Daniel Jeliński wrote: > Please review this attempt to fix ignored-qualifiers warning. > > Example warnings: > > src/hotspot/share/oops/method.hpp:413:19: warning: 'volatile' type qualifier > on return type has no

Re: RFR: 8310948: Fix ignored-qualifiers warning in Hotspot

2023-06-28 Thread Daniel Jeliński
On Tue, 27 Jun 2023 12:22:43 GMT, Daniel Jeliński wrote: > Please review this attempt to fix ignored-qualifiers warning. > > Example warnings: > > src/hotspot/share/oops/method.hpp:413:19: warning: 'volatile' type qualifier > on return type has no

Re: RFR: 8310948: Fix ignored-qualifiers warning in Hotspot

2023-06-28 Thread Daniel Jeliński
On Tue, 27 Jun 2023 12:22:43 GMT, Daniel Jeliński wrote: > Please review this attempt to fix ignored-qualifiers warning. > > Example warnings: > > src/hotspot/share/oops/method.hpp:413:19: warning: 'volatile' type qualifier > on return type has no

RFR: 8310948: Fix ignored-qualifiers warning in Hotspot

2023-06-27 Thread Daniel Jeliński
Please review this attempt to fix ignored-qualifiers warning. Example warnings: src/hotspot/share/oops/method.hpp:413:19: warning: 'volatile' type qualifier on return type has no effect [-Wignored-qualifiers] CompiledMethod* volatile code() const; ^ src/hotspot/sh

Re: RFR: 8308286 Fix clang warnings in linux code [v8]

2023-06-23 Thread Daniel Jeliński
On Fri, 23 Jun 2023 08:03:45 GMT, Artem Semenov wrote: >> When using the clang compiler to build OpenJDk on Linux, we encounter >> various "warnings as errors". >> They can be fixed with small changes. > > Artem Semenov has updated the pull request incrementally with one additional > commit sin

Re: RFR: 8308286 Fix clang warnings in linux code [v6]

2023-06-22 Thread Daniel Jeliński
On Thu, 22 Jun 2023 09:58:19 GMT, Daniel Jeliński wrote: >> Artem Semenov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update > > make/modules/java.desktop/lib/Awt2dLib

Re: RFR: 8305341: Alignment should be enforced by alignas instead of compiler specific attributes [v5]

2023-06-22 Thread Daniel Jeliński
On Fri, 23 Jun 2023 02:25:47 GMT, Julian Waters wrote: >> Julian Waters has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Whitespace >> - Revert >> - _MSC_VER > > @djelinski Sorry for the tag, it's just that this PR has been collecti

Re: RFR: 8308286 Fix clang warnings in linux code [v6]

2023-06-22 Thread Daniel Jeliński
On Thu, 22 Jun 2023 09:13:21 GMT, Artem Semenov wrote: >> When using the clang compiler to build OpenJDk on Linux, we encounter >> various "warnings as errors". >> They can be fixed with small changes. > > Artem Semenov has updated the pull request incrementally with one additional > commit sin

Re: RFR: 8308286 Fix clang warnings in linux code [v5]

2023-06-21 Thread Daniel Jeliński
On Sun, 11 Jun 2023 16:38:31 GMT, Artem Semenov wrote: >> When using the clang compiler to build OpenJDk on Linux, we encounter >> various "warnings as errors". >> They can be fixed with small changes. > > Artem Semenov has updated the pull request with a new target base due to a > merge or a r

Re: RFR: 8308286 Fix clang warnings in linux code

2023-05-26 Thread Daniel Jeliński
On Wed, 17 May 2023 12:28:47 GMT, Artem Semenov wrote: > When using the clang compiler to build OpenJDk on Linux, we encounter various > "warnings as errors". > They can be fixed with small changes. According to our docs, [clang is a supported compiler for Linux](https://github.com/openjdk/jdk

Re: RFR: 8303814: getLastErrorString should avoid charset conversions [v3]

2023-03-14 Thread Daniel Jeliński
On Mon, 13 Mar 2023 15:55:27 GMT, Daniel Jeliński wrote: >> This patch modifies the `getLastErrorString` method to return a `jstring`. >> Thanks to that we can avoid unnecessary back and forth conversions between >> Unicode and other charsets on Windows. >> >> O

Integrated: 8303814: getLastErrorString should avoid charset conversions

2023-03-14 Thread Daniel Jeliński
On Wed, 8 Mar 2023 11:30:27 GMT, Daniel Jeliński wrote: > This patch modifies the `getLastErrorString` method to return a `jstring`. > Thanks to that we can avoid unnecessary back and forth conversions between > Unicode and other charsets on Windows. > > Other changes include:

Re: RFR: 8303814: getLastErrorString should avoid charset conversions [v2]

2023-03-13 Thread Daniel Jeliński
On Mon, 13 Mar 2023 15:05:04 GMT, Roger Riggs wrote: >> Daniel Jeliński has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Address review comments >> - Mention that the returned text is static and thread

Re: RFR: 8303814: getLastErrorString should avoid charset conversions [v3]

2023-03-13 Thread Daniel Jeliński
t;nonexistent.local");` starts with > `"不知道这样的主机。"` (or > `"\u4e0d\u77e5\u9053\u8fd9\u6837\u7684\u4e3b\u673a\u3002"`). Without the > change, the exception message started with a row of question marks. Daniel Jeliński has updated the pull request incrementally wi

Re: RFR: 8303814: getLastErrorString should avoid charset conversions [v2]

2023-03-13 Thread Daniel Jeliński
On Thu, 9 Mar 2023 18:08:32 GMT, Naoto Sato wrote: >> Daniel Jeliński has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Address review comments >> - Mention that the returned text is static and thread

Re: RFR: 8303814: getLastErrorString should avoid charset conversions [v2]

2023-03-13 Thread Daniel Jeliński
t;nonexistent.local");` starts with > `"不知道这样的主机。"` (or > `"\u4e0d\u77e5\u9053\u8fd9\u6837\u7684\u4e3b\u673a\u3002"`). Without the > change, the exception message started with a row of question marks. Daniel Jeliński has updated the pull request incrementally with th

Re: RFR: 8303814: getLastErrorString should avoid charset conversions [v2]

2023-03-13 Thread Daniel Jeliński
On Fri, 10 Mar 2023 21:47:45 GMT, Roger Riggs wrote: >> Daniel Jeliński has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Address review comments >> - Mention that the returned text is static and thread

Re: RFR: 8303814: getLastErrorString should avoid charset conversions

2023-03-10 Thread Daniel Jeliński
On Thu, 9 Mar 2023 00:17:42 GMT, Naoto Sato wrote: >> This patch modifies the `getLastErrorString` method to return a `jstring`. >> Thanks to that we can avoid unnecessary back and forth conversions between >> Unicode and other charsets on Windows. >> >> Other changes include: >> - the Windows

Re: RFR: 8303814: getLastErrorString should avoid charset conversions

2023-03-09 Thread Daniel Jeliński
On Wed, 8 Mar 2023 23:23:33 GMT, Chris Plummer wrote: >> This patch modifies the `getLastErrorString` method to return a `jstring`. >> Thanks to that we can avoid unnecessary back and forth conversions between >> Unicode and other charsets on Windows. >> >> Other changes include: >> - the Wind

Re: RFR: 8303814: getLastErrorString should avoid charset conversions

2023-03-08 Thread Daniel Jeliński
The message from this sender included one or more files which could not be scanned for virus detection; do not open these files unless you are certain of the sender's intent. -- On Wed, 8 Mar 2023 11:30:27 GMT, Daniel Jel

RFR: 8303814: getLastErrorString should avoid charset conversions

2023-03-08 Thread Daniel Jeliński
The message from this sender included one or more files which could not be scanned for virus detection; do not open these files unless you are certain of the sender's intent. -- This patch modifies the `getLastErrorString` method

Integrated: 8300024: Replace use of JNI_COMMIT mode with mode 0

2023-01-15 Thread Daniel Jeliński
On Thu, 12 Jan 2023 09:23:49 GMT, Daniel Jeliński wrote: > Please review this patch that fixes a few memory leaks in JNI code. > > [The latest > documentation](https://docs.oracle.com/en/java/javase/17/docs/specs/jni/functions.html#releaseprimitivetypearrayelements-routine

Integrated: 8300032: DwarfParser resource leak

2023-01-15 Thread Daniel Jeliński
On Thu, 12 Jan 2023 12:08:51 GMT, Daniel Jeliński wrote: > Please review this fix for DwarfParser cleaner. > > The original code registered the cleaner using a lambda that captured a > reference to the parser object; as a result, the object was never GCed, and > the cleaner nev

Re: RFR: 8300032: DwarfParser resource leak

2023-01-12 Thread Daniel Jeliński
On Thu, 12 Jan 2023 21:26:09 GMT, Chris Plummer wrote: > This seems like a pretty serious flaw with using Lambdas and Cleaners that > probably should be brought up with the libs and language teams. They are aware of this issue; it's even mentioned in [this article](https://inside.java/2022/05/

Re: RFR: 8300024: Replace use of JNI_COMMIT mode with mode 0

2023-01-12 Thread Daniel Jeliński
On Thu, 12 Jan 2023 21:02:23 GMT, Chris Plummer wrote: > There are occurrences of JNI_COMMIT on macos in libawt and libsaproc. Is > there a reason you did not fix these also? My search for JNI_COMMIT filtered out all *.m files. Thanks for pointing that out. libsaproc is corrected now. I will f

Re: RFR: 8300024: Replace use of JNI_COMMIT mode with mode 0 [v2]

2023-01-12 Thread Daniel Jeliński
> > No new regression test. I manually verified the Linux fix using ClhdsbPstack > test in root mode. Also, tier1-2 tests on mach5 continue to pass. Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision: MacOS fix --

RFR: 8300032: DwarfParser resource leak

2023-01-12 Thread Daniel Jeliński
Please review this fix for DwarfParser cleaner. The original code registered the cleaner using a lambda that captured a reference to the parser object; as a result, the object was never GCed, and the cleaner never ran. In this version I moved the lambda creation to a static method, so that it

RFR: 8300024: Replace use of JNI_COMMIT mode with mode 0

2023-01-12 Thread Daniel Jeliński
Please review this patch that fixes a few memory leaks in JNI code. [The latest documentation](https://docs.oracle.com/en/java/javase/17/docs/specs/jni/functions.html#releaseprimitivetypearrayelements-routines) of JNI functions makes an explicit note about the use of JNI_COMMIT: > If `JNI_COMMI

Integrated: 8299593: getprotobyname should not be used

2023-01-08 Thread Daniel Jeliński
On Wed, 4 Jan 2023 12:56:18 GMT, Daniel Jeliński wrote: > Please review this patch that removes the remaining uses of non-reentrant > `getprotobyname` function. > > While the protocol number for TCP could theoretically be modified to > something other than the default `IPP

RFR: 8299593: getprotobyname should not be used

2023-01-04 Thread Daniel Jeliński
Please review this patch that removes the remaining uses of non-reentrant `getprotobyname` function. While the protocol number for TCP could theoretically be modified to something other than the default `IPPROTO_TCP`, that scenario would likely not work, and is not something that we are willing

Integrated: 8292233: Increase symtab hash table size

2022-08-11 Thread Daniel Jeliński
On Thu, 11 Aug 2022 07:12:17 GMT, Daniel Jeliński wrote: > Resize the hash table to minimize collisions. The correct size was already > calculated, but was not used. This pull request has now been integrated. Changeset: 083e014d Author:Daniel Jeliński URL: https://git.openj

RFR: 8292233: Increase symtab hash table size

2022-08-11 Thread Daniel Jeliński
Resize the hash table to minimize collisions. The correct size was already calculated, but was not used. - Commit messages: - Increase hash table size Changes: https://git.openjdk.org/jdk/pull/9834/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9834&range=00 Issue: https

Integrated: 8289768: Clean up unused code

2022-07-12 Thread Daniel Jeliński
On Tue, 5 Jul 2022 20:19:10 GMT, Daniel Jeliński wrote: > This patch removes many unused variables and one unused label reported by the > compilers when relevant warnings are enabled. > > The unused code was found by compiling after removing `unused` from the list > of disabl

Re: RFR: 8289768: Clean up unused code [v3]

2022-07-08 Thread Daniel Jeliński
On Fri, 8 Jul 2022 07:08:46 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list

Re: RFR: 8289768: Clean up unused code [v3]

2022-07-08 Thread Daniel Jeliński
) > MSVC warning. > > I only removed variables that were uninitialized or initialized without side > effects. I verified that the removed variables were not used in any > `#ifdef`'d code. I checked that the changed code still compiles on Windows, > Linux and Mac, bot

Re: RFR: 8289768: Clean up unused code [v2]

2022-07-08 Thread Daniel Jeliński
On Thu, 7 Jul 2022 19:06:52 GMT, Chris Plummer wrote: >> Daniel Jeliński has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contai

Re: RFR: 8289768: Clean up unused code [v2]

2022-07-06 Thread Daniel Jeliński
On Wed, 6 Jul 2022 05:32:29 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list

Re: RFR: 8289768: Clean up unused code [v2]

2022-07-06 Thread Daniel Jeliński
) > MSVC warning. > > I only removed variables that were uninitialized or initialized without side > effects. I verified that the removed variables were not used in any > `#ifdef`'d code. I checked that the changed code still compiles on Windows, > Linux and Mac, bot

RFR: 8289768: Clean up unused code

2022-07-06 Thread Daniel Jeliński
This patch removes many unused variables and one unused label reported by the compilers when relevant warnings are enabled. The unused code was found by compiling after removing `unused` from the list of disabled warnings for [gcc](https://github.com/openjdk/jdk/blob/master/make/autoconf/flags