JDK-8222111 : exeCallerAccessTest.c fails to build: control reaches end of non-void function
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2019-04-08
  • Updated: 2019-07-31
  • Resolved: 2019-04-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 12 JDK 13
12.0.2Fixed 13 b16Fixed
Related Reports
Relates :  
Relates :  
Description
Building with older GCC:

* Toolchain:      gcc (GNU Compiler Collection)
* C Compiler:     Version 4.8.5 (at /bin/gcc)
* C++ Compiler:   Version 4.8.5 (at /bin/g++)

...fails after JDK-8221530 when "run-test" compiles the native test code:

* For target support_test_jdk_jtreg_native_support_exeCallerAccessTest_exeCallerAccessTest.o:
/home/jenkins/workspace/nightly/jdk-jdk/test/jdk/java/lang/reflect/exeCallerAccessTest/exeCallerAccessTest.c: In function 'main':
/home/jenkins/workspace/nightly/jdk-jdk/test/jdk/java/lang/reflect/exeCallerAccessTest/exeCallerAccessTest.c:96:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1: all warnings being treated as errors
Comments
Fix Request for 12 See the request for JDK-8221530
15-04-2019

RFR: https://mail.openjdk.java.net/pipermail/core-libs-dev/2019-April/059602.html
08-04-2019

Candidate fix: diff -r 0d7fb7f07134 test/jdk/java/lang/reflect/exeCallerAccessTest/exeCallerAccessTest.c --- a/test/jdk/java/lang/reflect/exeCallerAccessTest/exeCallerAccessTest.c Mon Apr 08 06:56:37 2019 +0100 +++ b/test/jdk/java/lang/reflect/exeCallerAccessTest/exeCallerAccessTest.c Mon Apr 08 07:10:04 2019 -0400 @@ -93,6 +93,7 @@ } (*jvm)->DestroyJavaVM(jvm); + return 0; } int checkAndClearIllegalAccessExceptionThrown(JNIEnv *env) {
08-04-2019