This is a bug report for perl from ntyni@debian.org,
generated with the help of perlbug 1.43 running under perl 5.41.3.
Description
We're seeing a regression in the Tickit-Console test suite with Perl
5.40.0, tracked as https://bugs.debian.org/1078152 . I got it down to
an issue in POSIX::strftime(), which crashes with a blessed format on
5.40.0 and current blead.
Bisection shows it regressed with v5.39.7-73-g1957c60d05:
commit 1957c60d0591397316cff390fd9a8419e8bd09fb
Author: Karl Williamson <khw@cpan.org>
Date: Tue Jan 23 08:58:09 2024 -0700
locale.c: Change API for static strftime-related functions
Steps to Reproduce
$ perl -MPOSIX -e 'strftime((bless {}, 'Foo'), localtime());'
Out of memory in perl:util:safesysmalloc
On blead with DEBUGGING:
$ ./perl -Ilib -MPOSIX -e 'strftime((bless {}, 'Foo'), localtime());'
perl: locale.c:8231: S_sv_strftime_common: Assertion `PL_valid_types_PVX[SvTYPE(_svcur) & SVt_MASK]' failed.
Expected behavior
No crash.
Flags
Perl configuration
Site configuration information for perl 5.41.3:
Configured by ntyni at Sun Aug 11 06:06:56 BST 2024.
Summary of my perl5 (revision 5 version 41 subversion 3) configuration:
Commit id: edf2fff56f98dc54047777f039e24c6d91b56d35
Platform:
osname=linux
osvers=6.9.7-amd64
archname=x86_64-linux
uname='linux carme 6.9.7-amd64 #1 smp preempt_dynamic debian 6.9.7-1 (2024-06-27) x86_64 gnulinux '
config_args='-des -Dusedevel -DDEBUGGING'
hint=recommended
useposix=true
d_sigaction=define
useithreads=undef
usemultiplicity=undef
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
Compiler:
cc='cc'
ccflags ='-fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
optimize='-O2 -g'
cppflags='-fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
ccversion=''
gccversion='13.3.0'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
ivtype='long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='off_t'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld='cc'
ldflags =' -fstack-protector-strong -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib/x86_64-linux-gnu /usr/lib /usr/lib64
libs=-lpthread -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -ldl -lm -lcrypt -lutil -lc
libc=/lib/x86_64-linux-gnu/libc.so.6
so=so
useshrplib=false
libperl=libperl.a
gnulibc_version='2.38'
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-E'
cccdlflags='-fPIC'
lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector-strong'
---
@INC for perl 5.41.3:
lib
/usr/local/lib/perl5/site_perl/5.41.3/x86_64-linux
/usr/local/lib/perl5/site_perl/5.41.3
/usr/local/lib/perl5/5.41.3/x86_64-linux
/usr/local/lib/perl5/5.41.3
---
Environment for perl 5.41.3:
HOME=/home/ntyni
LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
LC_CTYPE=fi_FI.UTF-8
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
PERL_BADLANG (unset)
SHELL=/bin/zsh
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4