Re: RFR: 8276550: Use SHA256 hash in build.tools.depend.Depend

2021-11-03 Thread Andrew John Hughes
On Wed, 3 Nov 2021 11:54:39 GMT, Aleksey Shipilev  wrote:

> [JDK-8182285](https://bugs.openjdk.java.net/browse/JDK-8182285) added the 
> incremental build capabilities for modules, by hashing the APIs of each 
> module.
> 
> The original change uses MD5, which is quite weak, and 
> [JDK-8214483](https://bugs.openjdk.java.net/browse/JDK-8214483) allows 
> `MessageDigest` to have no MD5 implementation. This is the cause of some 
> build failures when using a FIPS-compliant boot JDK that has no MD5 
> implementation. I suggest we switch to the latest available hash instead.
> 
> Additional testing:
>  - [x] Linux x86_64 fastdebug build completes
>  - [x] Linux x86_64 fastdebug build times do not regress

SHA-256 is the right choice here from the small list of required algorithms in 
the boot JDK. MD5 has already been removed from the list of required algorithms 
and SHA-1 deprecation for JARs is planned: 
https://java.com/en/jre-jdk-cryptoroadmap.html

-

Marked as reviewed by andrew (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/6231


Re: RFR: 8275063: Implementation of Foreign Function & Memory API (Second incubator) [v17]

2021-11-03 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-419 [1]. A more 
> detailed description of such changes, to avoid repetitions during the review 
> process, is included as a separate comment.
> 
> [1] - https://openjdk.java.net/jeps/419

Maurizio Cimadamore has updated the pull request incrementally with one 
additional commit since the last revision:

  Fix TestUpcall
  * reverse() has a bug, as it doesn't tweak parameter types
  * reverse() is applied to the wrong MH

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5907/files
  - new: https://git.openjdk.java.net/jdk/pull/5907/files/9fafb2a6..b9432473

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=5907=16
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=5907=15-16

  Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5907.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5907/head:pull/5907

PR: https://git.openjdk.java.net/jdk/pull/5907


Re: Running jdk's tests to produce coverage report

2021-11-03 Thread Chaliasos, Stefanos
Do you know where I can download this version?

In GitHub there are releases until jcov3.0-b07

Stefanos

From: Alan Bateman 
Sent: 03 November 2021 16:39
To: Chaliasos, Stefanos ; 
build-dev@openjdk.java.net 
Subject: Re: Running jdk's tests to produce coverage report


This email from alan.bate...@oracle.com originates from outside Imperial. Do 
not click on links and attachments unless you recognise the sender. If you 
trust the sender, add them to your safe senders 
list to disable email stamping 
for this address.




On 03/11/2021 16:34, Chaliasos, Stefanos wrote:
Thanks Alan,

I used the one that jtreg uses. The complete configuration of JCOV for jtreg is:

```
DEFAULT_JCOV_SRC_TAG=jcov3.0-b07
DEFAULT_JCOV_SRC_ARCHIVE_CHECKSUM=c5c26085750628d58de275b3f50a7409300c0497

DEFAULT_ANT_VERSION=1.10.8
DEFAULT_ANT_ARCHIVE_CHECKSUM=dbe187ce2963f9df8a67de8aaff3b0a437d06978

DEFAULT_ASM_VERSION=8.0
DEFAULT_ASM_JAR_CHECKSUM=d1a17d07c60e9e82c8b31b1d8f9ca98726418db4
DEFAULT_ASM_TREE_JAR_CHECKSUM=7b31ca94da9f57334a5aed79b40f2b88c5ee9f4f
DEFAULT_ASM_UTIL_JAR_CHECKSUM=b21996293fd49851ed9017cfde3191e49f77fbd0

DEFAULT_JTHARNESS_SRC_TAG=jt6.0-b13
DEFAULT_JTHARNESS_SRC_ARCHIVE_CHECKSUM=43936b2616476fcac8ee4bd0132e73c015119337
```

Could you please share from where I can download the JCOV version that you are 
referring to?

Here's the JBS issue that upgraded jcov to support v62 class files. So I think 
you need jcov 3.0.9

https://bugs.openjdk.java.net/browse/CODETOOLS-7902988

-Alan


Re: Running jdk's tests to produce coverage report

2021-11-03 Thread Alan Bateman




On 03/11/2021 16:34, Chaliasos, Stefanos wrote:

Thanks Alan,

I used the one that jtreg uses. The complete configuration of JCOV for 
jtreg is:


```
DEFAULT_JCOV_SRC_TAG=jcov3.0-b07
DEFAULT_JCOV_SRC_ARCHIVE_CHECKSUM=c5c26085750628d58de275b3f50a7409300c0497 


DEFAULT_ANT_VERSION=1.10.8
DEFAULT_ANT_ARCHIVE_CHECKSUM=dbe187ce2963f9df8a67de8aaff3b0a437d06978
DEFAULT_ASM_VERSION=8.0
DEFAULT_ASM_JAR_CHECKSUM=d1a17d07c60e9e82c8b31b1d8f9ca98726418db4
DEFAULT_ASM_TREE_JAR_CHECKSUM=7b31ca94da9f57334a5aed79b40f2b88c5ee9f4f
DEFAULT_ASM_UTIL_JAR_CHECKSUM=b21996293fd49851ed9017cfde3191e49f77fbd0
DEFAULT_JTHARNESS_SRC_TAG=jt6.0-b13
DEFAULT_JTHARNESS_SRC_ARCHIVE_CHECKSUM=43936b2616476fcac8ee4bd0132e73c015119337 


```

Could you please share from where I can download the JCOV version that 
you are referring to?


Here's the JBS issue that upgraded jcov to support v62 class files. So I 
think you need jcov 3.0.9


https://bugs.openjdk.java.net/browse/CODETOOLS-7902988

-Alan


Re: Running jdk's tests to produce coverage report

2021-11-03 Thread Chaliasos, Stefanos
Thanks Alan,

I used the one that jtreg uses. The complete configuration of JCOV for jtreg is:

```
DEFAULT_JCOV_SRC_TAG=jcov3.0-b07
DEFAULT_JCOV_SRC_ARCHIVE_CHECKSUM=c5c26085750628d58de275b3f50a7409300c0497

DEFAULT_ANT_VERSION=1.10.8
DEFAULT_ANT_ARCHIVE_CHECKSUM=dbe187ce2963f9df8a67de8aaff3b0a437d06978

DEFAULT_ASM_VERSION=8.0
DEFAULT_ASM_JAR_CHECKSUM=d1a17d07c60e9e82c8b31b1d8f9ca98726418db4
DEFAULT_ASM_TREE_JAR_CHECKSUM=7b31ca94da9f57334a5aed79b40f2b88c5ee9f4f
DEFAULT_ASM_UTIL_JAR_CHECKSUM=b21996293fd49851ed9017cfde3191e49f77fbd0

DEFAULT_JTHARNESS_SRC_TAG=jt6.0-b13
DEFAULT_JTHARNESS_SRC_ARCHIVE_CHECKSUM=43936b2616476fcac8ee4bd0132e73c015119337
```

Could you please share from where I can download the JCOV version that you are 
referring to?

Cheers,
Stefanos

From: Alan Bateman 
Sent: 03 November 2021 16:25
To: Chaliasos, Stefanos ; 
build-dev@openjdk.java.net 
Subject: Re: Running jdk's tests to produce coverage report


***
This email originates from outside Imperial. Do not click on links and 
attachments unless you recognise the sender.
If you trust the sender, add them to your safe senders list 
https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for 
this address.
***


On 03/11/2021 15:12, Chaliasos, Stefanos wrote:
> Hello,
>
> I'm trying to compute code coverage for langtools in the JDK repo on a Ubuntu 
> 18.04 machine using JDK 18 for the compilation. I have run the following 
> commands:
>
> ```
> cd /home/user
> git clone https://github.com/openjdk/jdk.git
> cd jdk && bash configure && make jdk && cd ../
> git clone https://github.com/openjdk/jtreg.git
> cd jtreg
> bash make/build.sh --jdk /home/user/jdk/build/linux-x86_64-server-release/jdk/
> cd ../jdk
> bash configure --with-jtreg=/home/user/jtreg/build/images/jtreg 
> --with-jcov=/home/user/jtreg/build/deps/jcov/
> make jcov-image
> ```
>
> In the last command, I get errors with the following message:
>
> ```
> Exception details: Unsupported class file major version 62
> ...
>
Which version of jcov is this? I did a jcov test on my local build today
using what claims to be "3.0-9-jdk-asm+1.0" and it worked okay.

-Alan


Re: Running jdk's tests to produce coverage report

2021-11-03 Thread Alan Bateman




On 03/11/2021 15:12, Chaliasos, Stefanos wrote:

Hello,

I'm trying to compute code coverage for langtools in the JDK repo on a Ubuntu 
18.04 machine using JDK 18 for the compilation. I have run the following 
commands:

```
cd /home/user
git clone https://github.com/openjdk/jdk.git
cd jdk && bash configure && make jdk && cd ../
git clone https://github.com/openjdk/jtreg.git
cd jtreg
bash make/build.sh --jdk /home/user/jdk/build/linux-x86_64-server-release/jdk/
cd ../jdk
bash configure --with-jtreg=/home/user/jtreg/build/images/jtreg 
--with-jcov=/home/user/jtreg/build/deps/jcov/
make jcov-image
```

In the last command, I get errors with the following message:

```
Exception details: Unsupported class file major version 62
...

Which version of jcov is this? I did a jcov test on my local build today 
using what claims to be "3.0-9-jdk-asm+1.0" and it worked okay.


-Alan


Re: Running jdk's tests to produce coverage report

2021-11-03 Thread tim . bell

Hello Stefanos

On 11/3/21 08:12, Chaliasos, Stefanos wrote:

Hello,

I'm trying to compute code coverage for langtools in the JDK repo on a Ubuntu 
18.04 machine using JDK 18 for the compilation. I have run the following 
commands:

```
cd /home/user
git clonehttps://github.com/openjdk/jdk.git
cd jdk && bash configure && make jdk && cd ../


Does your JDK 18 build work in general? (EG: running 'java -version' or 
compiling and running a simple HelloWorld.java program)  If not, fix 
that first.



git clonehttps://github.com/openjdk/jtreg.git
cd jtreg
bash make/build.sh --jdk /home/user/jdk/build/linux-x86_64-server-release/jdk/
cd ../jdk
bash configure --with-jtreg=/home/user/jtreg/build/images/jtreg 
--with-jcov=/home/user/jtreg/build/deps/jcov/
make jcov-image
```

In the last command, I get errors with the following message:

```
Exception details: Unsupported class file major version 62


JDK 18 was advanced to classfile version 62 in this changeset:
https://github.com/openjdk/jdk/commit/b018c450e5e4737ccd08ed505fd06cee16c42648

This is a good question for the jcov-dev list at: 
https://mail.openjdk.java.net/mailman/listinfo/jcov-dev

Please subscribe to jcov-dev before sending to the list.

See also this jcov bug report:
https://bugs.openjdk.java.net/browse/CODETOOLS-7902988

I hope this helps-

Tim


...
```

and then the message:

```
SEVERE  : wrong command for jlink mods:

```

I tried to compile JCOV with JDK 18 but without success. Does anyone know if it 
is possible to compute code coverage on the master branch?

Kind regards,

Stefanos Chaliasos


Running jdk's tests to produce coverage report

2021-11-03 Thread Chaliasos, Stefanos
Hello,

I'm trying to compute code coverage for langtools in the JDK repo on a Ubuntu 
18.04 machine using JDK 18 for the compilation. I have run the following 
commands:

```
cd /home/user
git clone https://github.com/openjdk/jdk.git
cd jdk && bash configure && make jdk && cd ../
git clone https://github.com/openjdk/jtreg.git
cd jtreg
bash make/build.sh --jdk /home/user/jdk/build/linux-x86_64-server-release/jdk/
cd ../jdk
bash configure --with-jtreg=/home/user/jtreg/build/images/jtreg 
--with-jcov=/home/user/jtreg/build/deps/jcov/
make jcov-image
```

In the last command, I get errors with the following message:

```
Exception details: Unsupported class file major version 62
...
```

and then the message:

```
SEVERE  : wrong command for jlink mods:

```

I tried to compile JCOV with JDK 18 but without success. Does anyone know if it 
is possible to compute code coverage on the master branch?

Kind regards,

Stefanos Chaliasos


Re: RFR: 8276550: Use SHA256 hash in build.tools.depend.Depend

2021-11-03 Thread Andrew Haley
On Wed, 3 Nov 2021 11:54:39 GMT, Aleksey Shipilev  wrote:

> [JDK-8182285](https://bugs.openjdk.java.net/browse/JDK-8182285) added the 
> incremental build capabilities for modules, by hashing the APIs of each 
> module.
> 
> The original change uses MD5, which is quite weak, and 
> [JDK-8214483](https://bugs.openjdk.java.net/browse/JDK-8214483) allows 
> `MessageDigest` to have no MD5 implementation. This is the cause of some 
> build failures when using a FIPS-compliant boot JDK that has no MD5 
> implementation. I suggest we switch to the latest available hash instead.
> 
> Additional testing:
>  - [x] Linux x86_64 fastdebug build completes
>  - [x] Linux x86_64 fastdebug build times do not regress

Marked as reviewed by aph (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/6231


Re: RFR: 8276550: Use SHA256 hash in build.tools.depend.Depend

2021-11-03 Thread Andrew Dinn
On Wed, 3 Nov 2021 11:54:39 GMT, Aleksey Shipilev  wrote:

> JDK-8182285 added the incremental build capabilities for modules, by hashing 
> the APIs of each module.
> 
> The original change uses MD5, which is quite weak, and JDK-8214483 allows 
> `MessageDigest` to have no MD5 implementation. This is the cause of some 
> build failures when using a FIPS-compliant boot JDK that has no MD5 
> implementation. I suggest we switch to the latest available hash instead.
> 
> Additional testing:
>  - [x] Linux x86_64 fastdebug build completes
>  - [x] Linux x86_64 fastdebug build times do not regress

Looks good.

-

Marked as reviewed by adinn (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/6231


Re: RFR: 8275063: Implementation of Foreign Function & Memory API (Second incubator) [v16]

2021-11-03 Thread Jorn Vernee
On Wed, 3 Nov 2021 13:08:55 GMT, Maurizio Cimadamore  
wrote:

>> This PR contains the API and implementation changes for JEP-419 [1]. A more 
>> detailed description of such changes, to avoid repetitions during the review 
>> process, is included as a separate comment.
>> 
>> [1] - https://openjdk.java.net/jeps/419
>
> Maurizio Cimadamore has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Make ArenaAllocator impl more flexible in the face of OOME
>   An ArenaAllocator should remain open for business, even if OOME is thrown 
> in case other allocations can fit the arena size.

Marked as reviewed by jvernee (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/5907


Re: RFR: 8275063: Implementation of Foreign Function & Memory API (Second incubator) [v16]

2021-11-03 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-419 [1]. A more 
> detailed description of such changes, to avoid repetitions during the review 
> process, is included as a separate comment.
> 
> [1] - https://openjdk.java.net/jeps/419

Maurizio Cimadamore has updated the pull request incrementally with one 
additional commit since the last revision:

  Make ArenaAllocator impl more flexible in the face of OOME
  An ArenaAllocator should remain open for business, even if OOME is thrown in 
case other allocations can fit the arena size.

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5907/files
  - new: https://git.openjdk.java.net/jdk/pull/5907/files/7f847271..9fafb2a6

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=5907=15
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=5907=14-15

  Stats: 13 lines in 2 files changed: 3 ins; 6 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5907.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5907/head:pull/5907

PR: https://git.openjdk.java.net/jdk/pull/5907


RFR: 8276550: Use SHA256 hash in build.tools.depend.Depend

2021-11-03 Thread Aleksey Shipilev
JDK-8182285 added the incremental build capabilities for modules, by hashing 
the APIs of each module.

The original change uses MD5, which is quite weak, and JDK-8214483 allows 
`MessageDigest` to have no MD5 implementation. This is the cause of some build 
failures when using a FIPS-compliant boot JDK that has no MD5 implementation. I 
suggest we switch to the latest available hash instead.

Additional testing:
 - [x] Linux x86_64 fastdebug build completes
 - [x] Linux x86_64 fastdebug build times do not regress

-

Commit messages:
 - Fix

Changes: https://git.openjdk.java.net/jdk/pull/6231/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=6231=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8276550
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6231.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6231/head:pull/6231

PR: https://git.openjdk.java.net/jdk/pull/6231


Re: RFR: 8275063: Implementation of Foreign Function & Memory API (Second incubator) [v15]

2021-11-03 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-419 [1]. A more 
> detailed description of such changes, to avoid repetitions during the review 
> process, is included as a separate comment.
> 
> [1] - https://openjdk.java.net/jeps/419

Maurizio Cimadamore has updated the pull request incrementally with one 
additional commit since the last revision:

  Simplify ArenaAllocator impl.
  The arena should respect its boundaries and never allocate more memory than 
its size specifies.

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5907/files
  - new: https://git.openjdk.java.net/jdk/pull/5907/files/c219ae12..7f847271

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=5907=14
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=5907=13-14

  Stats: 40 lines in 1 file changed: 8 ins; 15 del; 17 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5907.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5907/head:pull/5907

PR: https://git.openjdk.java.net/jdk/pull/5907