Skip to content

Commit 30dd71b

Browse files
jpnurmiclaude
andcommitted
fix(native): use breakpad's 0x40000000 MD_CONTEXT_ARM flag
The ARM32 write_thread_context branch was emitting context_flags = 0x00200003 (Microsoft Windows CONTEXT_ARM | CONTROL | INTEGER). That matched the pattern the other arches use in this file, but ARM32 is the one arch where breakpad explicitly diverges from Microsoft's numbering, with a comment in minidump_cpu_arm.h: // This value was chosen to avoid likely conflicts with MD_CONTEXT_* // for other CPUs. #define MD_CONTEXT_ARM 0x40000000 rust-minidump (Sentry's ingest reader) keys off the breakpad value: https://github.com/rust-minidump/rust-minidump/blob/d4fefc765aad35b3bef569d53c1680eadab5a268/minidump-common/src/format.rs#L801-L804 With 0x00200000, the parser wouldn't identify the stream as an ARM context and registers would be dropped from the crash report. Switch to 0x40000003 to match breakpad / rust-minidump / crashpad (all of which use 0x40000000 for ARM specifically). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a3ecf71 commit 30dd71b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/backends/native/minidump/sentry_minidump_linux.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,8 +781,9 @@ write_thread_context(
781781
(void)tid; // Unused on ARM32 - no VFP capture implemented yet
782782

783783
minidump_context_arm_t context = { 0 };
784-
// CONTEXT_ARM | CONTEXT_CONTROL | CONTEXT_INTEGER
785-
context.context_flags = 0x00200003;
784+
// MD_CONTEXT_ARM | CONTROL | INTEGER — breakpad-style 0x40000000 base
785+
// (not Microsoft's 0x00200000; rust-minidump keys off the breakpad value)
786+
context.context_flags = 0x40000003;
786787

787788
// Copy general purpose registers R0-R10 from Linux ucontext
788789
context.r[0] = uctx->uc_mcontext.arm_r0;

0 commit comments

Comments
 (0)