Skip to content

Commit 66830f6

Browse files
committed
threads::shared: fix type of recursive_lock_release
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 recursive_lock_release through pointer to incorrect function type 'void (*)(struct interpreter *, void *)'
1 parent 3bec23f commit 66830f6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

dist/threads-shared/lib/threads/shared.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use Config;
88

99
use Scalar::Util qw(reftype refaddr blessed);
1010

11-
our $VERSION = '1.70'; # Please update the pod, too.
11+
our $VERSION = '1.71'; # Please update the pod, too.
1212
my $XS_VERSION = $VERSION;
1313
$VERSION = eval $VERSION;
1414

@@ -196,7 +196,7 @@ threads::shared - Perl extension for sharing data structures between threads
196196
197197
=head1 VERSION
198198
199-
This document describes threads::shared version 1.70
199+
This document describes threads::shared version 1.71
200200
201201
=head1 SYNOPSIS
202202

dist/threads-shared/shared.xs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,9 @@ recursive_lock_destroy(pTHX_ recursive_lock_t *lock)
212212
}
213213

214214
static void
215-
recursive_lock_release(pTHX_ recursive_lock_t *lock)
215+
recursive_lock_release(pTHX_ void *ptr)
216216
{
217+
recursive_lock_t *lock = (recursive_lock_t *)ptr;
217218
MUTEX_LOCK(&lock->mutex);
218219
if (lock->owner == aTHX) {
219220
if (--lock->locks == 0) {

0 commit comments

Comments
 (0)