File tree 3 files changed +22
-30
lines changed
3 files changed +22
-30
lines changed Original file line number Diff line number Diff line change 65
65
# define JL_THREAD_LOCAL
66
66
#endif
67
67
68
- #if defined(__has_feature )
69
- #if __has_feature (address_sanitizer )
70
- #define JL_ASAN_ENABLED // Clang flavor
71
- #endif
72
- #elif defined(__SANITIZE_ADDRESS__ )
73
- #define JL_ASAN_ENABLED // GCC flavor
74
- #endif
75
-
76
- #ifdef JL_ASAN_ENABLED
77
-
78
- #ifdef __cplusplus
79
- extern "C" {
80
- #endif
81
- void __sanitizer_start_switch_fiber (void * * , const void * , size_t );
82
- void __sanitizer_finish_switch_fiber (void * , const void * * , size_t * );
83
- #ifdef __cplusplus
84
- }
85
- #endif
86
-
87
- static inline void sanitizer_start_switch_fiber (const void * bottom , size_t size ) {
88
- __sanitizer_start_switch_fiber (NULL , bottom , size );
89
- }
90
- static inline void sanitizer_finish_switch_fiber () {
91
- __sanitizer_finish_switch_fiber (NULL , NULL , NULL );
92
- }
93
- #else
94
- static inline void sanitizer_start_switch_fiber (const void * bottom , size_t size ) {}
95
- static inline void sanitizer_finish_switch_fiber () {}
96
- #endif
97
-
98
68
#define container_of (ptr , type , member ) \
99
69
((type *) ((char *)(ptr) - offsetof(type, member)))
100
70
Original file line number Diff line number Diff line change 21
21
#define JL_ASAN_ENABLED // GCC flavor
22
22
#endif
23
23
24
+ #ifdef JL_ASAN_ENABLED
25
+ #ifdef __cplusplus
26
+ extern "C" {
27
+ #endif
28
+ void __sanitizer_start_switch_fiber (void * * , const void * , size_t );
29
+ void __sanitizer_finish_switch_fiber (void * , const void * * , size_t * );
30
+ #ifdef __cplusplus
31
+ }
32
+ #endif
33
+ #endif
24
34
25
35
#if defined(__has_feature )
26
36
#if __has_feature (memory_sanitizer )
Original file line number Diff line number Diff line change 40
40
extern "C" {
41
41
#endif
42
42
43
+ #ifdef JL_ASAN_ENABLED
44
+ static inline void sanitizer_start_switch_fiber (const void * bottom , size_t size ) {
45
+ __sanitizer_start_switch_fiber (NULL , bottom , size );
46
+ }
47
+ static inline void sanitizer_finish_switch_fiber (void ) {
48
+ __sanitizer_finish_switch_fiber (NULL , NULL , NULL );
49
+ }
50
+ #else
51
+ static inline void sanitizer_start_switch_fiber (const void * bottom , size_t size ) {}
52
+ static inline void sanitizer_finish_switch_fiber (void ) {}
53
+ #endif
54
+
43
55
#if defined(_OS_WINDOWS_ )
44
56
volatile int jl_in_stackwalk = 0 ;
45
57
#else
You can’t perform that action at this time.
0 commit comments