Skip to content

Commit 5599d91

Browse files
committed
fix type of S_free_codeblocks
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 S_free_codeblocks through pointer to incorrect function type 'void (*)(struct interpreter *, void *)'
1 parent 121999c commit 5599d91

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

regcomp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,9 @@ Perl_re_compile(pTHX_ SV * const pattern, U32 rx_flags)
485485
}
486486

487487
static void
488-
S_free_codeblocks(pTHX_ struct reg_code_blocks *cbs)
488+
S_free_codeblocks(pTHX_ void *ptr)
489489
{
490+
struct reg_code_blocks *cbs = (struct reg_code_blocks *)ptr;
490491
int n;
491492

492493
if (--cbs->refcnt > 0)

0 commit comments

Comments
 (0)