Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2023-01-04 Thread Robbin Ehn
On Fri, 16 Dec 2022 16:10:10 GMT, Magnus Ihse Bursie wrote: >> Justin King has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify logic for including __ubsan_default_options >> >> Signed-off-by: Justin King > > I much also

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-16 Thread Justin King
On Fri, 16 Dec 2022 15:56:44 GMT, Magnus Ihse Bursie wrote: > However, I do think the included source files should be treated like the > autoheaders, and reside in data rather than in `src`. The latter is intended > for buildtools, even though they are a bit scattered at the moment (there is

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-16 Thread Magnus Ihse Bursie
On Mon, 12 Dec 2022 10:42:22 GMT, Justin King wrote: >> Allow building OpenJDK with UBSan. Currently the build fails when optimizing >> the image due to lots of undefined behavior (it invokes the built JVM). >> Follow up PRs will either replace the undefined behavior with well defined >>

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-16 Thread Magnus Ihse Bursie
On Fri, 9 Dec 2022 20:38:26 GMT, Erik Joelsson wrote: >> make/autoconf/jdk-options.m4 line 450: >> >>> 448: >>> ### >>> 449: # >>> 450: # UndefinedBehaviorSanitizer >> >> I think this logic fits better in `flags.m4`,

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-16 Thread Magnus Ihse Bursie
On Mon, 12 Dec 2022 10:42:22 GMT, Justin King wrote: >> Allow building OpenJDK with UBSan. Currently the build fails when optimizing >> the image due to lots of undefined behavior (it invokes the built JVM). >> Follow up PRs will either replace the undefined behavior with well defined >>

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-13 Thread Justin King
On Tue, 13 Dec 2022 16:55:09 GMT, Robbin Ehn wrote: > > I guess the advantage to putting this in the build machinery (as opposed to > > using `--with-extra-cflags=-fsanitize=undefined > > --with-extra-ldflags=-fsanitize=undefined`) is that we can turn some of > > these onn by default once

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-13 Thread Erik Joelsson
On Tue, 13 Dec 2022 13:45:04 GMT, Justin King wrote: > Nope. Some targets end up passing C++ flags to the C compiler, causing a > failure. Ah right, we (mis)use CFLAGS (instead of CXXFLAGS) in some SetupNativeCompilation calls when all source files are C++. In that case, your suggested patch

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-13 Thread Robbin Ehn
On Tue, 13 Dec 2022 16:29:59 GMT, Justin King wrote: > I guess the advantage to putting this in the build machinery (as opposed to > using `--with-extra-cflags=-fsanitize=undefined > --with-extra-ldflags=-fsanitize=undefined`) is that we can turn some of these > onn by default once we've

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-13 Thread Justin King
On Mon, 12 Dec 2022 10:42:22 GMT, Justin King wrote: >> Allow building OpenJDK with UBSan. Currently the build fails when optimizing >> the image due to lots of undefined behavior (it invokes the built JVM). >> Follow up PRs will either replace the undefined behavior with well defined >>

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-13 Thread Andrew Haley
On Mon, 12 Dec 2022 10:42:22 GMT, Justin King wrote: >> Allow building OpenJDK with UBSan. Currently the build fails when optimizing >> the image due to lots of undefined behavior (it invokes the built JVM). >> Follow up PRs will either replace the undefined behavior with well defined >>

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-13 Thread Justin King
On Mon, 12 Dec 2022 10:42:22 GMT, Justin King wrote: >> Allow building OpenJDK with UBSan. Currently the build fails when optimizing >> the image due to lots of undefined behavior (it invokes the built JVM). >> Follow up PRs will either replace the undefined behavior with well defined >>

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-13 Thread Erik Joelsson
On Tue, 13 Dec 2022 08:17:09 GMT, Justin King wrote: > I tried to use a single file, but the build logic attempts to compile as > either C or C++ based on file extensions, and has logic based on it. So if I > use `.cpp` and the target is all `.c` odd things happen. The same for the > inverse.

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-13 Thread Justin King
On Mon, 12 Dec 2022 10:42:22 GMT, Justin King wrote: >> Allow building OpenJDK with UBSan. Currently the build fails when optimizing >> the image due to lots of undefined behavior (it invokes the built JVM). >> Follow up PRs will either replace the undefined behavior with well defined >>

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-12 Thread David Holmes
On Mon, 12 Dec 2022 10:42:22 GMT, Justin King wrote: >> Allow building OpenJDK with UBSan. Currently the build fails when optimizing >> the image due to lots of undefined behavior (it invokes the built JVM). >> Follow up PRs will either replace the undefined behavior with well defined >>

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-12 Thread Justin King
> Allow building OpenJDK with UBSan. Currently the build fails when optimizing > the image due to lots of undefined behavior (it invokes the built JVM). > Follow up PRs will either replace the undefined behavior with well defined > behavior or suppress errors which are intentional. The goal is