You are correct. This changeset was wrong.

Mandy was asking me about this a while back and I was also noticing the problem 
with a recent
problem Maurizio was having doing boot cycle builds on Linux, where javac 
failed, make did not stop,
and merrily crashed later in javah. :^(

-kto

On Dec 16, 2011, at 6:13 AM, Chris Hegarty wrote:

> I filed CR 7122235 for this issue.
> 
> Forcing a compile time error of a JDK class by inserting some bad code is 
> just ignored and the build continues, and appears to complete successfully.
> 
> I believe the changes for CR 7116322 "enhance javac make rule with a little 
> bit of instrumentation", caused this problem.
> 
>  Changeset for 7116322:
>    http://hg.openjdk.java.net/jdk8/tl/jdk/rev/43a630f11af6
> 
> After the javac cmd is run there is a simple echo to indicate 'javac 
> finished'. I am not a makefile expert, but I think the makefiles are checking 
> the return code for this directive/rule and now will always see the 
> successful return code of the echo, so it will never fail.
> 
> Example:
> 
> # Running javac:       18 files; in 
> /export2/Users/chris/repos/jdk8/tl/buildFail/make/com/sun/net/ssl
> /java/re/jdk/1.8.0/promoted/latest/binaries/solaris-i586/bin/javac 
> -J-XX:ThreadStackSize=768 -J-XX:-PrintVMOptions 
> -J-XX:+UnlockDiagnosticVMOptions -J-XX:-LogVMOutput -J-client -J-Xmx512m 
> -J-Xms512m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -g -Werror 
> -Xlint:all,-deprecation -Xlint:all -Xlint:-path -source 7 -target 7 -encoding 
> ascii -Xbootclasspath:../../../../../build/solaris-i586/classes -sourcepath 
> ../../../../../src/closed/solaris/classes:../../../../../src/closed/share/classes:../../../../../build/solaris-i586/gensrc:../../../../../src/solaris/classes:../../../../../src/share/classes
>  -d ../../../../../build/solaris-i586/classes 
> @../../../../../build/solaris-i586/tmp/sun/com.sun.net.ssl/.classes.list.filtered
> ../../../../../src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java:438:
>  error: missing return statement
>    }
>    ^
> Note: Some input files use or override a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> 1 error
> # javac finished
> make381[3]: Leaving directory 
> `/export2/Users/chris/repos/jdk8/tl/buildFail/make/com/sun/net/ssl'
> make381[3]: Entering directory 
> `/export2/Users/chris/repos/jdk8/tl/buildFail/make/com/sun/jarsigner'
> make381[3]: Leaving directory 
> `/export2/Users/chris/repos/jdk8/tl/buildFail/make/com/sun/jarsigner'
> make381[3]: Entering directory 
> `/export2/Users/chris/repos/jdk8/tl/buildFail/make/com/sun/image'
> 
> -Chris.

Reply via email to