Skip to content

Commit 0b23ab5

Browse files
committed
fix type of restore_sigmask
SAVEDESTRUCTOR_X needs a function of type 'void (pTHX_ void *)' exactly. Should fix this ASan error: scope.c:1543:13: runtime error: call to function restore_sigmask through pointer to incorrect function type 'void (*)(struct interpreter *, void *)'
1 parent 66830f6 commit 0b23ab5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mg.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1472,8 +1472,9 @@ Perl_magic_clear_all_env(pTHX_ SV *sv, MAGIC *mg)
14721472

14731473
#ifdef HAS_SIGPROCMASK
14741474
static void
1475-
restore_sigmask(pTHX_ SV *save_sv)
1475+
restore_sigmask(pTHX_ void *ptr)
14761476
{
1477+
SV *save_sv = (SV *)ptr;
14771478
const sigset_t * const ossetp = (const sigset_t *) SvPV_nolen_const( save_sv );
14781479
(void)sigprocmask(SIG_SETMASK, ossetp, NULL);
14791480
}

0 commit comments

Comments
 (0)