Fix for 8030115 breaks windows build

David Holmes david.holmes at oracle.com
Tue Mar 10 03:40:55 UTC 2015


The fix for 8030115 breaks the build on windows:

c:/jprt/T/P1/021115.drlong/s/jdk/src/share/native/sun/tracing/dtrace/JVM.c(200) 
: error C2143: syntax error : missing ';' before 'type'
c:/jprt/T/P1/021115.drlong/s/jdk/src/share/native/sun/tracing/dtrace/JVM.c(201) 
: error C2065: 'count' : undeclared identifier
c:/jprt/T/P1/021115.drlong/s/jdk/src/share/native/sun/tracing/dtrace/JVM.c(201) 
: error C2065: 'count' : undeclared identifier
c:/jprt/T/P1/021115.drlong/s/jdk/src/share/native/sun/tracing/dtrace/JVM.c(202) 
: error C2065: 'count' : undeclared identifier
c:/jprt/T/P1/021115.drlong/s/jdk/src/share/native/sun/tracing/dtrace/JVM.c(204) 
: error C2065: 'count' : undeclared identifier
c:/jprt/T/P1/021115.drlong/s/jdk/src/share/native/sun/tracing/dtrace/JVM.c(212) 
: error C2065: 'count' : undeclared identifier
make[2]: *** 
[/cygdrive/c/jprt/T/P1/021115.drlong/s/build/windows-x86_64-normal-server-fastdebug/jdk/objs/libjsdt/JVM.obj] 
Error 2

The older MSC compiler doesn't support declarations in the middle of 
blocks IIRC so barfs on this:

@@ -195,16 +197,24 @@
      jvm_providers = (JVM_DTraceProvider*)calloc(
          num_providers, sizeof(*jvm_providers));

-    for (i = 0; i < num_providers; ++i) {
-        JVM_DTraceProvider* p = &(jvm_providers[i]);
+    int count = 0;
+    for (; count < num_providers; ++count) {


Filed:

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

Not sure how this has escaped notice till now but the nightly build has 
been failing on Windows since this was pushed! :(

I'm testing the simple fix and will send out the RFR/A as soon as it is 
confirmed.

David



More information about the jdk8u-dev mailing list