Skip to content

Commit 380db4e

Browse files
fix(ci): CrashHandler portability for Linux/macOS
- Wrap DWORD64 kSymDispMax in #ifdef _WIN32 (Windows-only type) - Add #include <cstdio> for ::rename on macOS Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent cbdb1f4 commit 380db4e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/CrashHandler.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <atomic>
3434
#include <csignal>
3535
#include <cstdint>
36+
#include <cstdio>
3637
#include <cstdlib>
3738
#include <cstring>
3839
#include <ctime>
@@ -72,10 +73,9 @@ constexpr std::size_t kRotateBytes = 10 * 1024 * 1024;
7273
// space is below this — otherwise appendStr silently truncates and frames are
7374
// dropped.
7475
constexpr std::size_t kFrameReserve = 1024;
75-
// If SymFromAddr's reported offset from the matched symbol exceeds this, the
76-
// "symbol" is almost certainly the nearest export of a PDB-less module, not
77-
// the real function. Suppress the misleading name in that case.
76+
#ifdef _WIN32
7877
constexpr DWORD64 kSymDispMax = 256 * 1024;
78+
#endif
7979

8080
#ifndef _WIN32
8181
constexpr std::size_t kAltStackSize = 1 << 16; // 64KB

0 commit comments

Comments
 (0)