[12] RFR(XS) 8208463: jdk.internal.vm.compiler's module-info.java.extra contains duplicated provides of the same service interface

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue Aug 14 00:06:43 UTC 2018


https://bugs.openjdk.java.net/browse/JDK-8208463

Before we did not care how module-info.java.extra is generated. The code in 
Gensrc-jdk.internal.vm.compiler.gmk  make file simple ordered 'providers' files (which are packages 
names) by name and then use their contents to generate 'provides' instructions. If following file in 
sorted list reference the same package it will be added to the same 'provides' as for previous file. 
But it did not guarantee that all referenced packages are listed in the same 'provides' command.

The fix is to sort files not by their name but by their content. It guarantee that files with the 
same content will be listed together.

Run tier1-3 testing. It included Graal JIT testing and AOT (which uses Graal) testing.

Thanks,
Vladimir

diff -r ae001a1deb74 make/gensrc/Gensrc-jdk.internal.vm.compiler.gmk
--- a/make/gensrc/Gensrc-jdk.internal.vm.compiler.gmk
+++ b/make/gensrc/Gensrc-jdk.internal.vm.compiler.gmk
@@ -124,7 +124,7 @@
  	($(CD) $(GENSRC_DIR)/META-INF/providers && \
  	    p=""; \
  	    impl=""; \
-	    for i in $$($(LS) | $(SORT)); do \
+	    for i in $$($(GREP) '^' * | $(SORT) -t ':' -k 2 | $(SED) 's/:.*//'); do \
  	      c=$$($(CAT) $$i | $(TR) -d '\n\r'); \
  	      if test x$$p != x$$c; then \
                  if test x$$p != x; then \



More information about the build-dev mailing list