Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: 1e5751ae732b0c2b7c8ddac3f534f7d3d620da7b
https://github.com/Perl/perl5/commit/1e5751ae732b0c2b7c8ddac3f534f7d3d620da7b
Author: Lukas Mai <[email protected]>
Date: 2026-09-18 (Fri, 18 Sep 2026)
Changed paths:
M embed.fnc
M proto.h
M regexec.c
Log Message:
-----------
regexec.c: avoid UB in S_clear_offs_spare
Calling a function at the wrong type is undefined behavior.
S_clear_offs_spare is registered with SAVEDESTRUCTOR_X, which calls
functions at type `void (void *)`. To be compatible with
SAVEDESTRUCTOR_X, S_clear_offs_spare must take an argument of type
`void *` and can only convert to `regexp *` within the function.
Fixes this UBSan error:
scope.c:1653:13: runtime error: call to function S_clear_offs_spare through
pointer to incorrect function type 'void (*)(struct interpreter *, void *)'
To unsubscribe from these emails, change your notification settings at
https://github.com/Perl/perl5/settings/notifications