On Mon, 12 Dec 2022 07:26:21 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> Justin King has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add comment explaining __ubsan_default_options and UBSAN_OPTIONS >> >> Signed-off-by: Justin King <jck...@google.com> > > src/java.base/share/native/launcher/main.c line 41: > >> 39: // extremely early during library loading, before main is called. We >> need to override the default >> 40: // options because by default UBSan only prints a warning for each >> occurrence. We want jtreg tests >> 41: // to fail when undefined behavior is encountered. We also want a full >> stack trace for the offending > > If this is primarily for tests then can't we set the env-var in the test > Makefile? Primarily, but its not a requirement. We should also be able to invoke `java` as is. The environment variables should be used to force specific behavior for a single invocation. Otherwise, if one forgets to pass the environment variables, things may not go as expected. ------------- PR: https://git.openjdk.org/jdk/pull/11604