File tree 2 files changed +18
-5
lines changed
2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -358,11 +358,7 @@ aco_t* aco_create(
358
358
assert (0 );
359
359
}
360
360
361
- #if defined(__has_feature )
362
- #if __has_feature (address_sanitizer )
363
- __attribute__((no_sanitize_address ))
364
- #endif
365
- #endif
361
+ aco_attr_no_asan
366
362
void aco_resume (aco_t * resume_co ){
367
363
assert (resume_co != NULL && resume_co -> main_co != NULL
368
364
&& resume_co -> is_end == 0
Original file line number Diff line number Diff line change @@ -136,6 +136,22 @@ struct aco_s{
136
136
} \
137
137
} while(0)
138
138
139
+ #if defined(ACO_USE_ASAN )
140
+ #if defined(__has_feature )
141
+ #if __has_feature (address_sanitizer )
142
+ #define aco_attr_no_asan \
143
+ __attribute__((__no_sanitize_address__))
144
+ #endif
145
+ #endif
146
+ #if defined(__SANITIZE_ADDRESS__ ) && !defined(aco_attr_no_asan )
147
+ #define aco_attr_no_asan \
148
+ __attribute__((__no_sanitize_address__))
149
+ #endif
150
+ #endif
151
+ #ifndef aco_attr_no_asan
152
+ #define aco_attr_no_asan
153
+ #endif
154
+
139
155
extern void aco_runtime_test (void );
140
156
141
157
extern void aco_thread_init (aco_cofuncp_t last_word_co_fp );
@@ -164,6 +180,7 @@ extern aco_t* aco_create(
164
180
// aco's Global Thread Local Storage variable `co`
165
181
extern __thread aco_t * aco_gtls_co ;
166
182
183
+ aco_attr_no_asan
167
184
extern void aco_resume (aco_t * resume_co );
168
185
169
186
//extern void aco_yield1(aco_t* yield_co);
You can’t perform that action at this time.
0 commit comments