Skip to content

Fix flag-register read in fiber-savecontext on arm64#84

Open
vadimskipin wants to merge 1 commit into
mainfrom
vskipin/fix-flag-register-savecontext-arm64
Open

Fix flag-register read in fiber-savecontext on arm64#84
vadimskipin wants to merge 1 commit into
mainfrom
vskipin/fix-flag-register-savecontext-arm64

Conversation

@vadimskipin

Copy link
Copy Markdown
Collaborator

int() rejects TYPE_CODE_FLAGS registers (eflags/pstate), and the (unsigned long) C-cast fallback coerces eflags on x86 but raises "Invalid cast" for arm64 pstate. That throw escapes fiber-savecontext and aborts the entire crash-dump before any fiber backtrace prints. Read the raw register bytes instead - no cast for gdb to reject, works on both arches.

int() rejects TYPE_CODE_FLAGS registers (eflags/pstate), and the
(unsigned long) C-cast fallback coerces eflags on x86 but raises
"Invalid cast" for arm64 pstate. That throw escapes fiber-savecontext
and aborts the entire crash-dump before any fiber backtrace prints.
Read the raw register bytes instead - no cast for gdb to reject, works
on both arches.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant