-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Requires minimum of gcc version 4.8. Only available to ztest right now, but easily added to other user applications. For kernel support use the Linux KASAN feature instead. Signed-off-by: DHE <git@dehacked.net>
- Loading branch information
Showing
15 changed files
with
76 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
dnl # | ||
dnl # Check if gcc supports -fsanitize=address. Applies to all libraries, | ||
dnl # ztest and zdb | ||
dnl # | ||
dnl # LDFLAGS needs -fsanitize=address at all times so libraries compiled with | ||
dnl # it will be linked successfully. CFLAGS will vary by binary being built. | ||
dnl # | ||
AC_DEFUN([ZFS_AC_CONFIG_USER_GCC_FSANITIZE], [ | ||
if test "$enable_debug" = "yes" | ||
then | ||
AC_MSG_CHECKING([for -fsanitize=address support]) | ||
saved_cflags="$CFLAGS" | ||
saved_ldflags="$LDFLAGS" | ||
CFLAGS="$CFLAGS -fsanitize=address" | ||
LDFLAGS="$LDFLAGS -fsanitize=address" | ||
AC_TRY_LINK( | ||
[ | ||
#include <time.h> | ||
],[ | ||
time_t now; | ||
now = time(&now); | ||
],[ | ||
FSANITIZE_ADDRESS=-fsanitize=address | ||
saved_ldflags="$saved_ldflags -fsanitize=address" | ||
AC_MSG_RESULT(yes) | ||
],[ | ||
FSANITIZE_ADDRESS="" | ||
AC_MSG_RESULT(no) | ||
]) | ||
CFLAGS="$saved_flags" | ||
LDFLAGS="$saved_ldflags" | ||
fi | ||
AC_SUBST([FSANITIZE_ADDRESS]) | ||
]) | ||
|
||
|
||
dnl # | ||
dnl # Check if gcc supports -Wframe-larger-than=<size> option. | ||
dnl # | ||
AC_DEFUN([ZFS_AC_CONFIG_USER_FRAME_LARGER_THAN], [ | ||
AC_MSG_CHECKING([for -Wframe-larger-than=<size> support]) | ||
saved_flags="$CFLAGS" | ||
CFLAGS="$CFLAGS -Wframe-larger-than=4096" | ||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], | ||
[ | ||
FRAME_LARGER_THAN=-Wframe-larger-than=4096 | ||
AC_MSG_RESULT([yes]) | ||
], | ||
[ | ||
FRAME_LARGER_THAN= | ||
AC_MSG_RESULT([no]) | ||
]) | ||
CFLAGS="$saved_flags" | ||
AC_SUBST([FRAME_LARGER_THAN]) | ||
]) | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters