Skip to content

Commit 41b3ac3

Browse files
authored
chore: Update our code to match Apple's thread name length limit (#6501)
1 parent 5fc3364 commit 41b3ac3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/Sentry/SentryThreadMetadataCache.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ isSentryOwnedThreadName(const std::string &name)
1717
return name.rfind("io.sentry", 0) == 0;
1818
}
1919

20-
constexpr std::size_t kMaxThreadNameLength = 100;
20+
// Apple's `libpthread` has a hard limit of 64 characters for thread names.
21+
// See
22+
// https://github.com/apple-oss-distributions/libpthread/blob/42d026df5b07825070f60134b980a1ec2552dfee/src/pthread.c#L1178
23+
constexpr std::size_t kMaxThreadNameLength = 64;
2124

2225
} // namespace
2326

0 commit comments

Comments
 (0)