Skip to content

Commit 856632b

Browse files
authored
[NFC][ubsan_minimal] Clang-format a file (#139000)
1 parent c336bd7 commit 856632b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
#include "sanitizer_common/sanitizer_atomic.h"
22

3-
#include <stdlib.h>
43
#include <stdint.h>
4+
#include <stdlib.h>
55
#include <string.h>
66
#include <unistd.h>
77

88
#ifdef KERNEL_USE
99
extern "C" void ubsan_message(const char *msg);
1010
static void message(const char *msg) { ubsan_message(msg); }
1111
#else
12-
static void message(const char *msg) {
13-
(void)write(2, msg, strlen(msg));
14-
}
12+
static void message(const char *msg) { (void)write(2, msg, strlen(msg)); }
1513
#endif
1614

1715
static const int kMaxCallerPcs = 20;
@@ -62,16 +60,18 @@ SANITIZER_INTERFACE_WEAK_DEF(void, __ubsan_report_error, const char *kind,
6260
uintptr_t p;
6361
for (unsigned i = 0; i < sz; ++i) {
6462
p = __sanitizer::atomic_load_relaxed(&caller_pcs[i]);
65-
if (p == 0) break; // Concurrent update.
63+
if (p == 0)
64+
break; // Concurrent update.
6665
if (p == caller)
6766
return;
6867
}
69-
if (p == 0) continue; // FIXME: yield?
68+
if (p == 0)
69+
continue; // FIXME: yield?
7070
}
7171

7272
if (!__sanitizer::atomic_compare_exchange_strong(
7373
&caller_pcs_sz, &sz, sz + 1, __sanitizer::memory_order_seq_cst))
74-
continue; // Concurrent update! Try again from the start.
74+
continue; // Concurrent update! Try again from the start.
7575

7676
if (sz == kMaxCallerPcs) {
7777
message("ubsan: too many errors\n");

0 commit comments

Comments
 (0)