RFR: 8282191: Implementation of Foreign Function & Memory API (Preview) [v5]

Jorn Vernee jvernee at openjdk.java.net
Thu Mar 24 19:27:23 UTC 2022


On Thu, 24 Mar 2022 18:35:12 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> Sure, this is problematic - but at the same time I don't think there's a better way to deal with this? I'd prefer to defer this to a separate issue (and I think the build team is in a much better position to suggest a better fix). IIRC we had this problem in the past as well.
>
> I'd suggest at least adding `--enable-preview` as an argument when running benchmarks through the build system in that case. I think this should do the trick:
> 
> 
> diff --git a/make/RunTests.gmk b/make/RunTests.gmk
> index 81540266ec0..9ed45fb02a8 100644
> --- a/make/RunTests.gmk
> +++ b/make/RunTests.gmk
> @@ -583,7 +583,7 @@ define SetupRunMicroTestBody
>    $$(eval $$(call SetMicroValue,$1,MICRO_JAVA_OPTIONS))
> 
>    # Current tests needs to open java.io
> -  $1_MICRO_JAVA_OPTIONS += --add-opens=java.base/java.io=ALL-UNNAMED
> +  $1_MICRO_JAVA_OPTIONS += --add-opens=java.base/java.io=ALL-UNNAMED --enable-preview
> 
>    # Save output as JSON or CSV file
>    ifneq ($$(MICRO_RESULTS_FORMAT), )
> 
> 
> People manually running the benchmarks.jar will have to pass `--enable-preview` still though.

After discussing this offline, it seems that javac no longer poisons the minor class file version of every class file, but only of those that use preview features. So, my concern is not warranted.

-------------

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



More information about the security-dev mailing list