Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mk: actually run valgrind on x86_64-apple-darwin #30365

Merged
merged 2 commits into from
Dec 31, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions mk/platform.mk
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,18 @@ define DEF_GOOD_VALGRIND
ifeq ($(OSTYPE_$(1)),unknown-linux-gnu)
GOOD_VALGRIND_$(1) = 1
endif
ifneq (,$(filter $(OSTYPE_$(1)),darwin freebsd))
ifeq (HOST_$(1),x86_64)
ifneq (,$(filter $(OSTYPE_$(1)),apple-darwin freebsd))
ifeq ($(HOST_$(1)),x86_64)
GOOD_VALGRIND_$(1) = 1
endif
endif
ifdef GOOD_VALGRIND_$(t)
$$(info cfg: have good valgrind for $(t))
else
$$(info cfg: no good valgrind for $(t))
endif
endef
$(foreach t,$(CFG_TARGET),$(eval $(call DEF_GOOD_VALGRIND,$(t))))
$(foreach t,$(CFG_TARGET),$(info cfg: good valgrind for $(t) is $(GOOD_VALGRIND_$(t))))

ifneq ($(findstring linux,$(CFG_OSTYPE)),)
ifdef CFG_PERF
Expand Down
72 changes: 21 additions & 51 deletions src/etc/apple-darwin.supp
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
{
osx-frameworks.rs-fails-otherwise-1
Memcheck:Leak
match-leak-kinds: possible
match-leak-kinds: definite,possible
fun:malloc
...
fun:__CFInitialize
fun:_ZN16ImageLoaderMachO11doImageInitERKN11ImageLoader11LinkContextE
fun:_ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListERNS_15UninitedUpwardsE
fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListERNS_15UninitedUpwardsE
fun:_ZN11ImageLoader19processInitializersERKNS_11LinkContextEjRNS_21InitializerTimingListERNS_15UninitedUpwardsE
fun:_ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE
fun:_ZN4dyld24initializeMainExecutableEv
...
}

{
Expand All @@ -22,23 +16,17 @@
...
fun:__CFInitialize
fun:_ZN16ImageLoaderMachO11doImageInitERKN11ImageLoader11LinkContextE
fun:_ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListERNS_15UninitedUpwardsE
fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListERNS_15UninitedUpwardsE
fun:_ZN11ImageLoader19processInitializersERKNS_11LinkContextEjRNS_21InitializerTimingListERNS_15UninitedUpwardsE
}

{
osx-frameworks.rs-fails-otherwise-3
Memcheck:Leak
match-leak-kinds: possible
fun:realloc
fun:_ZL12realizeClassP10objc_class
fun:_ZL12realizeClassP10objc_class
fun:_ZN13list_array_ttIm15protocol_list_tE11attachListsEPKPS0_j
...
fun:_read_images
fun:map_images_nolock
fun:map_2_images
...
fun:_ZN4dyldL18notifyBatchPartialE17dyld_image_statesbPFPKcS0_jPK15dyld_image_infoE
fun:_ZN4dyld36registerImageStateBatchChangeHandlerE17dyld_image_statesPFPKcS0_jPK15dyld_image_infoE
fun:dyld_register_image_state_change_handler
Expand All @@ -49,7 +37,7 @@
{
osx-frameworks.rs-fails-otherwise-4
Memcheck:Leak
match-leak-kinds: possible
match-leak-kinds: definite,possible
fun:calloc
...
fun:__CFInitialize
Expand All @@ -61,45 +49,27 @@
{
osx-frameworks.rs-fails-otherwise-5
Memcheck:Leak
match-leak-kinds: definite
fun:calloc
match-leak-kinds: definite,possible
fun:malloc_zone_malloc
...
fun:__CFInitialize
fun:_ZN16ImageLoaderMachO11doImageInitERKN11ImageLoader11LinkContextE
fun:_ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListERNS_15UninitedUpwardsE
}

{
osx-frameworks.rs-fails-otherwise-6
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:strdup
fun:_CFProcessPath
fun:__CFInitialize
fun:_ZN16ImageLoaderMachO11doImageInitERKN11ImageLoader11LinkContextE
fun:_ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListERNS_15UninitedUpwardsE
fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListERNS_15UninitedUpwardsE
fun:_ZN11ImageLoader19processInitializersERKNS_11LinkContextEjRNS_21InitializerTimingListERNS_15UninitedUpwardsE
fun:_ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE
fun:_ZN4dyld24initializeMainExecutableEv
fun:_ZN4dyld5_mainEPK12macho_headermiPPKcS5_S5_Pm
...
}

{
osx-frameworks.rs-fails-otherwise-7
fails-since-xcode-7.2
Memcheck:Leak
match-leak-kinds: definite
match-leak-kinds: possible
fun:malloc_zone_malloc
...
fun:__CFInitialize
fun:_ZN16ImageLoaderMachO11doImageInitERKN11ImageLoader11LinkContextE
fun:_ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListERNS_15UninitedUpwardsE
fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListERNS_15UninitedUpwardsE
fun:_ZN11ImageLoader19processInitializersERKNS_11LinkContextEjRNS_21InitializerTimingListERNS_15UninitedUpwardsE
fun:_ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE
fun:_ZN4dyld24initializeMainExecutableEv
fun:_objc_copyClassNamesForImage
fun:_ZL9protocolsv
fun:_Z9readClassP10objc_classbb
fun:gc_init
fun:_ZL33objc_initializeClassPair_internalP10objc_classPKcS0_S0_
fun:layout_string_create
fun:_ZL12realizeClassP10objc_class
fun:_ZL22copySwiftV1MangledNamePKcb
fun:_ZL22copySwiftV1MangledNamePKcb
fun:_ZL22copySwiftV1MangledNamePKcb
fun:_ZL22copySwiftV1MangledNamePKcb
}
8 changes: 4 additions & 4 deletions src/etc/x86.supp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
fun:tlv_finalize
fun:_pthread_tsd_cleanup
fun:_pthread_exit
fun:_pthread_body
...
fun:_pthread_start
fun:thread_start
}
Expand All @@ -24,7 +24,7 @@
fun:tlv_finalize
fun:_pthread_tsd_cleanup
fun:_pthread_exit
fun:_pthread_body
...
fun:_pthread_start
fun:thread_start
}
Expand All @@ -36,7 +36,7 @@
fun:tlv_finalize
fun:_pthread_tsd_cleanup
fun:_pthread_exit
fun:_pthread_body
...
fun:_pthread_start
fun:thread_start
}
Expand All @@ -48,7 +48,7 @@
fun:tlv_finalize
fun:_pthread_tsd_cleanup
fun:_pthread_exit
fun:_pthread_body
...
fun:_pthread_start
fun:thread_start
}
Expand Down
3 changes: 3 additions & 0 deletions src/test/run-pass-valgrind/exit-flushes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-macos this needs valgrind 3.11 or higher; see
// https://github.com/rust-lang/rust/pull/30365#issuecomment-165763679

use std::env;
use std::process::{exit, Command};

Expand Down