Skip to content

Commit 1ef3d42

Browse files
committed
Enable Valgrind tests on OSX
1 parent ea34507 commit 1ef3d42

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

.travis.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,18 @@ matrix:
101101
compiler: gcc
102102

103103
# OSX clang
104+
- os: osx
105+
osx_image: xcode9.2
106+
env: BUILD_TYPE=Debug USE_VALGRIND=true CMAKE_GENERATOR="Xcode"
107+
addons:
108+
homebrew:
109+
update: true
110+
packages:
111+
- ccache
112+
- cmake
113+
- valgrind
114+
compiler: clang
115+
104116
- os: osx
105117
osx_image: xcode8.3
106118
env: BUILD_TYPE=Release CMAKE_GENERATOR="Xcode"

tests/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ set(GFX_TIMSORT_SANITIZE "" CACHE STRING "Comma-separated list of options to pas
1717
if (${GFX_TIMSORT_USE_VALGRIND})
1818
find_program(MEMORYCHECK_COMMAND valgrind)
1919
set(MEMORYCHECK_COMMAND_OPTIONS "--leak-check=full --track-origins=yes --error-exitcode=1 --show-reachable=no")
20+
if (APPLE)
21+
set(MEMORYCHECK_SUPPRESSIONS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/valgrind-osx.supp)
22+
endif()
2023
endif()
2124

2225
macro(configure_tests target)

tests/valgrind-osx.supp

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
Mac-OS-X-System-Leaks
3+
Memcheck:Leak
4+
match-leak-kinds: possible
5+
fun:calloc
6+
fun:map_images_nolock
7+
fun:map_images
8+
fun:_ZN4dyldL18notifyBatchPartialE17dyld_image_statesbPFPKcS0_jPK15dyld_image_infoEbb
9+
fun:_ZN4dyld21registerObjCNotifiersEPFvjPKPKcPKPK11mach_headerEPFvS1_S6_ESC_
10+
fun:_dyld_objc_notify_register
11+
fun:_objc_init
12+
fun:_os_object_init
13+
fun:libdispatch_init
14+
fun:libSystem_initializer
15+
fun:_ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
16+
fun:_ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
17+
fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjPKcRNS_21InitializerTimingListERNS_15UninitedUpwardsE
18+
fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjPKcRNS_21InitializerTimingListERNS_15UninitedUpwardsE
19+
fun:_ZN11ImageLoader19processInitializersERKNS_11LinkContextEjRNS_21InitializerTimingListERNS_15UninitedUpwardsE
20+
fun:_ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE
21+
fun:_ZN4dyld24initializeMainExecutableEv
22+
fun:_ZN4dyld5_mainEPK12macho_headermiPPKcS5_S5_Pm
23+
fun:_ZN13dyldbootstrap5startEPK12macho_headeriPPKclS2_Pm
24+
fun:_dyld_start
25+
obj:*
26+
obj:*
27+
obj:*
28+
obj:*
29+
}

0 commit comments

Comments
 (0)