On Mon, 25 Nov 2024 06:17:23 GMT, SendaoYan <s...@openjdk.org> wrote:
> Hi all, > File `src/java.base/share/native/libjli/java.c` compile `error: control > reaches end of non-void function [-Werror=return-type]` with gcc options > `-fsanitize=address -O0`. The function `int JavaMain(void* _args)` in this > file will execute `return ret` in `LEAVE()` macro, but gcc with -O0 is not > smart enough to recognized that the function already has `return` statement > before at the end of function. > This PR add final return statement make gcc with options `-fsanitize=address > -O0` happy, to make jdk compile success with configure option `--enable-asan` > by slowdebug mode. The added `return ret` make no sence because the `LEAVE()` > macro make sure that function will execute `returun ret` statement at > java.c:348. So I think this change is no risk. > > Additional testing: > > - [x] jtreg tests(include tier1/2/3 etc.) with linux-x64 release build > - [x] jtreg tests(include tier1/2/3 etc.) with linux-x64 fastdebug build > - [x] jtreg tests(include tier1/2/3 etc.) with linux-aarch64 release build > - [x] jtreg tests(include tier1/2/3 etc.) with linux-aarch64 fastdebug build This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/22355