Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
33897e2e
Commit
33897e2e
authored
Sep 26, 2017
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use ASAN_OPTIONS=detect_leaks=1 if leak sanitizer can be enabled separately
parent
19008885
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
configure.ac
configure.ac
+9
-0
tests/tests-skeletons/Makefile.am
tests/tests-skeletons/Makefile.am
+2
-3
No files found.
configure.ac
View file @
33897e2e
...
@@ -161,6 +161,7 @@ https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#how-to-build])])
...
@@ -161,6 +161,7 @@ https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#how-to-build])])
dnl Enable Address Sanitizer, if supported by gcc (4.8+) or clang.
dnl Enable Address Sanitizer, if supported by gcc (4.8+) or clang.
dnl http://clang.llvm.org/docs/AddressSanitizer.html
dnl http://clang.llvm.org/docs/AddressSanitizer.html
ASAN_ENV_FLAGS=""
AC_ARG_ENABLE([test-asan],
AC_ARG_ENABLE([test-asan],
[AS_HELP_STRING([--disable-test-asan],
[AS_HELP_STRING([--disable-test-asan],
[Disable Address Sanitizer for tests])],
[Disable Address Sanitizer for tests])],
...
@@ -174,6 +175,13 @@ AS_IF([test "x$disable_test_asan" != xno], [
...
@@ -174,6 +175,13 @@ AS_IF([test "x$disable_test_asan" != xno], [
[--disable-test-asan=$disable_test_asan is not supported on a target system.
[--disable-test-asan=$disable_test_asan is not supported on a target system.
Check out https://clang.llvm.org/docs/AddressSanitizer.html#how-to-build])])
Check out https://clang.llvm.org/docs/AddressSanitizer.html#how-to-build])])
])
])
dnl Address sanitizer sometimes is equipped with the leak sanitizer,
dnl so we use -fsanitize=leak to permit ASAN_OPTIONS environment.
dnl If address sanitizer is not equipped with a leak sanitizer,
dnl invoking programs with ASAN_OPTIONS=detect_leaks=1 will break them.
AX_CHECK_COMPILE_FLAG([-fsanitize=leak], [
ASAN_ENV_FLAGS="${ASAN_ENV_FLAGS} ASAN_OPTIONS=detect_leaks=1"
])
dnl Keep error messages nice. Also consider:
dnl Keep error messages nice. Also consider:
dnl export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer
dnl export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer
dnl export ASAN_OPTIONS=symbolize=1
dnl export ASAN_OPTIONS=symbolize=1
...
@@ -206,6 +214,7 @@ AC_SUBST(LIBFUZZER_CFLAGS)
...
@@ -206,6 +214,7 @@ AC_SUBST(LIBFUZZER_CFLAGS)
AC_SUBST(SANITIZER_CFLAGS)
AC_SUBST(SANITIZER_CFLAGS)
AC_SUBST(TESTSUITE_CFLAGS)
AC_SUBST(TESTSUITE_CFLAGS)
AC_SUBST(SKELETONS_CFLAGS)
AC_SUBST(SKELETONS_CFLAGS)
AC_SUBST(ASAN_ENV_FLAGS)
dnl Checks for header files.
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_STDC
...
...
tests/tests-skeletons/Makefile.am
View file @
33897e2e
...
@@ -20,10 +20,9 @@ check_PROGRAMS = \
...
@@ -20,10 +20,9 @@ check_PROGRAMS = \
#Filter out the coverage options from CFLAGS as we don't need
#Filter out the coverage options from CFLAGS as we don't need
#code coverage data for the tests executables
#code coverage data for the tests executables
CFLAGS
=
$(
filter-out
$(CODE_COVERAGE_CFLAGS)
, @CFLAGS@
)
CFLAGS
=
$(
filter-out
$(CODE_COVERAGE_CFLAGS)
, @CFLAGS@
)
AM_CPPFLAGS
=
-I
$(top_srcdir)
/skeletons
$(TESTSUITE_CFLAGS)
AM_CFLAGS
=
-I
$(top_srcdir)
/skeletons
$(TESTSUITE_CFLAGS)
AM_CFLAGS
=
$(TESTSUITE_CFLAGS)
AM_LDFLAGS
=
$(top_builddir)
/skeletons/libasn1cskeletons.la
AM_LDFLAGS
=
$(top_builddir)
/skeletons/libasn1cskeletons.la
LDADD
=
-lm
LDADD
=
-lm
TESTS
=
$(check_PROGRAMS)
TESTS
=
$(check_PROGRAMS)
TESTS_ENVIRONMENT
=
ASAN_OPTIONS
=
detect_leaks
=
1
UBSAN_OPTIONS
=
print_stacktrace
=
1
TESTS_ENVIRONMENT
=
@ASAN_ENV_FLAGS@
UBSAN_OPTIONS
=
print_stacktrace
=
1
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment