@@ -46,9 +46,7 @@ void ExpectNotRealtime(const char *InterceptedFunctionName) {
46
46
}
47
47
} // namespace __radsan
48
48
49
- /*
50
- Filesystem
51
- */
49
+ // Filesystem
52
50
53
51
INTERCEPTOR (int , open, const char *path, int oflag, ...) {
54
52
// TODO Establish whether we should intercept here if the flag contains
@@ -121,19 +119,13 @@ INTERCEPTOR(int, fputs, const char *s, FILE *stream) {
121
119
return REAL (fputs)(s, stream);
122
120
}
123
121
124
- /*
125
- Streams
126
- */
127
-
122
+ // Streams
128
123
INTERCEPTOR (int , puts, const char *s) {
129
124
__radsan::ExpectNotRealtime (" puts" );
130
125
return REAL (puts)(s);
131
126
}
132
127
133
- /*
134
- Concurrency
135
- */
136
-
128
+ // Concurrency
137
129
#if SANITIZER_APPLE
138
130
#pragma clang diagnostic push
139
131
// OSSpinLockLock is deprecated, but still in use in libc++
@@ -213,9 +205,7 @@ INTERCEPTOR(int, pthread_rwlock_wrlock, pthread_rwlock_t *lock) {
213
205
return REAL (pthread_rwlock_wrlock)(lock);
214
206
}
215
207
216
- /*
217
- Sleeping
218
- */
208
+ // Sleeping
219
209
220
210
INTERCEPTOR (unsigned int , sleep, unsigned int s) {
221
211
__radsan::ExpectNotRealtime (" sleep" );
@@ -233,9 +223,7 @@ INTERCEPTOR(int, nanosleep, const struct timespec *rqtp,
233
223
return REAL (nanosleep)(rqtp, rmtp);
234
224
}
235
225
236
- /*
237
- Memory
238
- */
226
+ // Memory
239
227
240
228
INTERCEPTOR (void *, calloc, SIZE_T num, SIZE_T size) {
241
229
__radsan::ExpectNotRealtime (" calloc" );
@@ -298,10 +286,7 @@ INTERCEPTOR(void *, pvalloc, size_t size) {
298
286
}
299
287
#endif
300
288
301
- /*
302
- Sockets
303
- */
304
-
289
+ // Sockets
305
290
INTERCEPTOR (int , socket, int domain, int type, int protocol) {
306
291
__radsan::ExpectNotRealtime (" socket" );
307
292
return REAL (socket)(domain, type, protocol);
@@ -345,10 +330,7 @@ INTERCEPTOR(int, shutdown, int socket, int how) {
345
330
return REAL (shutdown)(socket, how);
346
331
}
347
332
348
- /*
349
- Preinit
350
- */
351
-
333
+ // Preinit
352
334
namespace __radsan {
353
335
void InitializeInterceptors () {
354
336
INTERCEPT_FUNCTION (calloc);
0 commit comments