Skip to content

Commit

Permalink
merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisBrunner committed Oct 28, 2024
1 parent e4f513f commit 9dae353
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Note that every version from macOS 10.12 onwards currently has the following iss
- using threads and signals together is undefined (crashes, hanging, etc), note: a few tests were disabled because of that
- drd crashes on 10.15 (probably onwards)
- dhat crashes (seen macOS 14 arm64)
- loads of `-UNHANDLED` messages

## Usage

Expand Down
28 changes: 0 additions & 28 deletions coregrind/m_machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -1913,36 +1913,8 @@ Bool VG_(machine_get_hwcaps)( void )

ULong ctr_el0 = 0;
#else
r = VG_(sigprocmask)(VKI_SIG_UNBLOCK, &tmp_set, &saved_set);
vg_assert(r == 0);

r = VG_(sigaction)(VKI_SIGILL, NULL, &saved_sigill_act);
vg_assert(r == 0);

VG_(convert_sigaction_fromK_to_toK)(&saved_sigill_act, &tmp_sigill_act);

/* NODEFER: signal handler does not return (from the kernel's point of
view), hence if it is to successfully catch a signal more than once,
we need the NODEFER flag. */
tmp_sigill_act.sa_flags &= ~VKI_SA_RESETHAND;
tmp_sigill_act.sa_flags &= ~VKI_SA_SIGINFO;
tmp_sigill_act.sa_flags |= VKI_SA_NODEFER;
tmp_sigill_act.ksa_handler = handler_unsup_insn;
r = VG_(sigaction)(VKI_SIGILL, &tmp_sigill_act, NULL);
vg_assert(r == 0);

ULong ctr_el0;
/* Does reading ctr_el0 register throw SIGILL? */
if (VG_MINIMAL_SETJMP(env_unsup_insn))
ctr_el0 = 0;
else
__asm__ __volatile__("mrs %0, ctr_el0" : "=r"(ctr_el0));

VG_(convert_sigaction_fromK_to_toK)(&saved_sigill_act, &tmp_sigill_act);
r = VG_(sigaction)(VKI_SIGILL, &tmp_sigill_act, NULL);
vg_assert(r == 0);
r = VG_(sigprocmask)(VKI_SIG_SETMASK, &saved_set, NULL);
vg_assert(r == 0);
#endif

vai.arm64_dMinLine_lg2_szB = ((ctr_el0 >> 16) & 0xF) + 2;
Expand Down

0 comments on commit 9dae353

Please sign in to comment.