Skip to content

Commit 65ced8f

Browse files
committed
XS::APItest: fix type of destruct_test
MORTALSVFUNC_X needs a function of type 'void (pTHX_ SV *)' exactly. Should fix this ASan error: scope.c:1979:8: runtime error: call to function destruct_test through pointer to incorrect function type 'void (*)(struct interpreter *, struct STRUCT_SV *)'
1 parent 5e6221d commit 65ced8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/XS-APItest/APItest.xs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,8 +1597,8 @@ XSPP_wrapped(my_pp_anonlist, 0, 1)
15971597
#include "const-c.inc"
15981598

15991599
void
1600-
destruct_test(pTHX_ void *p) {
1601-
warn("In destruct_test: %" SVf "\n", (SV*)p);
1600+
destruct_test(pTHX_ SV *p) {
1601+
warn("In destruct_test: %" SVf "\n", p);
16021602
}
16031603

16041604
#if defined(USE_ITHREADS) && !defined(WIN32)

0 commit comments

Comments
 (0)