On Mon, 12 Dec 2022 09:58:54 GMT, Justin King <jck...@openjdk.org> wrote:
>> src/java.base/share/native/launcher/main.c line 49: >> >>> 47: #endif // UNDEFINED_BEHAVIOR_SANITIZER >>> 48: >>> 49: /* >> >> As I said we have more launcher than 'java', if you put this method here you >> must put it in all launchers. >> I.e. all binaries that call JNI_CreateJavaVM, such our tests, e.g. >> jni/daemonDestroy/TestDaemonDestroy.java > > Attempting an approach that automatically includes `__ubsan_default_options` > in binaries by "automagically" including a source file for anything using > `SetupNativeCompilation` with `TYPE` being `EXECUTABLE`. Okay, I was able to get the autoconf magic working. Instead of having to copy-paste `__ubsan_default_options` to every launcher, it is instead auto-inserted in `SetupNativeCompilation` by including a source file which exports it for anything that is `EXECUTABLE`. ------------- PR: https://git.openjdk.org/jdk/pull/11604