-
Notifications
You must be signed in to change notification settings - Fork 603
Description
For quite some time, t/re/uniprops02.t has been failing some tests whenever I build perl such that the type of NV is the "doubledouble" long double.
The first test that fails is:
not ok 30410 - couldn't compile /\p{Numeric_Value:3.12e-03}/; line 69958: Can't find Unicode property definition "Numeric_Value:3.12e-03" in regex; marked by <-- HERE in m/\p{Numeric_Value:3.12e-03} <-- HERE / at (eval 26922) line 2.
This is in response to the following line of code in lib/unicore/TestProp.pl:
Expect(1, 73684, '\p{Numeric_Value:3.12e-03}', "");
On other systems, that line of the generated TestProp.pl specifies 3.13e-03 instead of 3.12e-03.
(The test passes if the value of 3.13e-03 is used.)
On this "doubledouble" sysyem of mine, the value of 3.12e-03 (or equivalent) is repeated in various other tests throughout TestProp.pl, causing those tests to fail in every instance.
Perhaps this is indicative of a problem with the way that the test values are generated by lib/unicore/mktables ?
But there's another problem, too.
For values of 3.125e-03 (or equivalent), which are also repeated in various tests throughout TestProp.pl, these tests are failing (in the same way) on the "doubledouble" build, but passing on other systems.
Sometimes "doubledoubles" are not assigned correctly (ie can be off by one or two ULPs), but this doesn't seem to be relevant here.
In fact, one value that is off by three ULPs (3.13e-03) is handled correctly, while the one that is assigned correctly (3.125e-03) fails.
I guess it's not critical that all perl bugs related to this very rare type of NV be fixed.
OTOH, perl would be no worse off if it could be fixed.
Please let me know if there's something further I can do to help with this.
Steps to Reproduce
$ perl -le 'use re; my $re = qr[\p{Numeric_Value: 3.12e-03}];'
Can't find Unicode property definition "Numeric_Value: 3.12e-03" in regex; marked by <-- HERE in m/\p{Numeric_Value: 3.12e-03} <-- HERE / at -e line 1.
$ perl -le 'use re; my $re = qr[\p{Numeric_Value: 3.125e-03}];'
Can't find Unicode property definition "Numeric_Value: 3.125e-03" in regex; marked by <-- HERE in m/\p{Numeric_Value: 3.125e-03} <-- HERE / at -e line 1.
$ perl -le 'use re; my $re = qr[\p{Numeric_Value: 0.003125}];'
Can't find Unicode property definition "Numeric_Value: 0.003125" in regex; marked by <-- HERE in m/\p{Numeric_Value: 0.003125} <-- HERE / at -e line 1.
Expected behavior
I'm not very well informed on Unicode matters, but I believe the output of the first one-liner is as expected - the problem there being that it leads to a FAIL when it's run in t/re/uniprops02.t.
IIUC, the second and third one-liners would be expected to produce no output at all.
Perl configuration
$ perl -V
Summary of my perl5 (revision 5 version 35 subversion 11) configuration:
Commit id: 2caf82775aff58fd4599ee9fb0841a887715c56b
Platform:
osname=linux
osvers=3.2.0-4-powerpc64
archname=ppc64-linux-ld
uname='linux debian-sis 3.2.0-4-powerpc64 #1 smp debian 3.2.78-1 ppc64 gnulinux '
config_args='-des -Duse64bitall -Dcc=gcc -m64 -Dprefix=/home/sisyphus-sis/perl53511-m64-ld -Duselongdouble -Dusedevel -Uversiononly'
hint=recommended
useposix=true
d_sigaction=define
useithreads=undef
usemultiplicity=undef
use64bitint=define
use64bitall=define
uselongdouble=define
usemymalloc=n
default_inc_excludes_dot=define
Compiler:
cc='gcc -m64'
ccflags ='-std=gnu99 -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
optimize='-O1'
cppflags='-std=gnu99 -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion=''
gccversion='4.6.3'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=87654321
doublekind=4
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=6
ivtype='long'
ivsize=8
nvtype='long double'
nvsize=16
Off_t='off_t'
lseeksize=8
alignbytes=16
prototype=define
Linker and Libraries:
ld='gcc -m64'
ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib /lib/powerpc-linux-gnu /lib/../lib /usr/lib/powerpc-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64
libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.13.so
so=so
useshrplib=false
libperl=libperl.a
gnulibc_version='2.13'
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-E'
cccdlflags='-fPIC'
lddlflags='-shared -O1 -L/usr/local/lib -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options:
HAS_TIMES
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
PERL_USE_DEVEL
USE_64_BIT_ALL
USE_64_BIT_INT
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_COLLATE
USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC
USE_LOCALE_TIME
USE_LONG_DOUBLE
USE_PERLIO
USE_PERL_ATOF
Built under linux
Compiled at Apr 5 2022 18:11:14
@INC:
/home/sisyphus-sis/perl53511-m64-ld/lib/site_perl/5.35.11/ppc64-linux-ld
/home/sisyphus-sis/perl53511-m64-ld/lib/site_perl/5.35.11
/home/sisyphus-sis/perl53511-m64-ld/lib/5.35.11/ppc64-linux-ld
/home/sisyphus-sis/perl53511-m64-ld/lib/5.35.11