Skip to content

Commit

Permalink
JDK-8334618
Browse files Browse the repository at this point in the history
  • Loading branch information
MBaesken committed Jun 20, 2024
1 parent 6420846 commit 7c8cba8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion make/autoconf/jdk-options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,16 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_LEAK_SANITIZER],
#
AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER],
[
AC_ARG_WITH(additional-ubsan-checks, [AS_HELP_STRING([--with-additional-ubsan-checks],
[customizes the ubsan checks])])
ADDITIONAL_UBSAN_CHECKS=
if test "x$with_additional_ubsan_checks" != "x" ; then
ADDITIONAL_UBSAN_CHECKS="$with_additional_ubsan_checks"
fi
# GCC reports lots of likely false positives for stringop-truncation and format-overflow.
# Silence them for now.
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment"
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment $ADDITIONAL_UBSAN_CHECKS"
UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-stringop-truncation -Wno-format-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER"
UBSAN_LDFLAGS="$UBSAN_CHECKS"
UTIL_ARG_ENABLE(NAME: ubsan, DEFAULT: false, RESULT: UBSAN_ENABLED,
Expand Down

0 comments on commit 7c8cba8

Please sign in to comment.