RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

Magnus Ihse Bursie ihse at openjdk.org
Fri Dec 16 16:04:51 UTC 2022


On Fri, 9 Dec 2022 20:38:26 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> make/autoconf/jdk-options.m4 line 450:
>> 
>>> 448: ###############################################################################
>>> 449: #
>>> 450: # UndefinedBehaviorSanitizer
>> 
>> I think this logic fits better in `flags.m4`, otherwise this looks ok to me.
>
> Ah now I understand that this compiles runtime checks into the product. In that case it does actually fit well into jdk-options.m4, so you can leave it there.

Well, this function actually does two things -- first it checks if ubsan support should be enabled, and that code really belong here. But then if it i enabled, it adds additional compiler options, including globally silencing some warnings, and that should really reside in flags-cflags.m4. 

But, I see we have this pattern for other optional tooling support like ASan and GCov, so I guess this is fine for now.

I'm really looking forward to a better way of handling flags so we wouldn't have to do it like this.

-------------

PR: https://git.openjdk.org/jdk/pull/11604


More information about the core-libs-dev mailing list