Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/locale.t: Test failures and segfaulting on FreeBSD-11 and -12 #15681

Closed
p5pRT opened this issue Oct 24, 2016 · 25 comments
Closed

lib/locale.t: Test failures and segfaulting on FreeBSD-11 and -12 #15681

p5pRT opened this issue Oct 24, 2016 · 25 comments

Comments

@p5pRT
Copy link

p5pRT commented Oct 24, 2016

Migrated from rt.perl.org#129953 (status was 'resolved')

Searchable as RT129953$

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2016

From @jkeenan

This is a bug report for perl from jkeenan@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.24.0.

lib/locale.t​: Test failures and segfaulting on FreeBSD-11 and -12

Up to August of this year we had not been receiving any smoke-test
reports for Perl 5 blead on any version of FreeBSD for some time. In
August I began submitting smoke-test reports for FreeBSD-10.3-RELEASE; a
bug was found in FreeBSD itself, reported to FreeBSD (since addressed),
and worked-around by Karl Williamson.

In October FreeBSD designated version 11.0 as RELEASE and I set up a VM
on which to smoke-test it. Subsequently Dan Collins similarly set up a
VM for smoke-testing FreeBSD-12-CURRENT. Both versions have been
reporting test failures and/or segfaults in lib/locale.t. See, e.g.​:

FreeBSD-11​: http​://perl5.test-smoke.org/report/50816
FreeBSD-12​: http​://perl5.test-smoke.org/report/50812

The source code which leads to these failures was committed to blead in
May of this year and has tested well on Linux. On FreeBSD-10.3
lib/locale.t's performance gets sluggish but does not fail outright or
segfault.

The segfault typically happens after test 380 in lib/locale.t. On
FreeBSD-11 I found that test failures first appeared at or around commit
4ebeff1. Outright segfaulting began at a4a439f.

Karl, Dan and I have been discussing these failures off-list. Now that
we have replicable smoke tests, this is a good time to bring the
discussion into RT and therefore on-list. Karl has created this branch​:

origin/smoke-me/khw-locale

... that we are currently testing. Results are promising.

Note​: The 'perl -V' output included is that of a build of blead on
FreeBSD-11.0 in which lib/locale.t is typically segfaulting.

Thank you very much.
Jim Keenan


Flags​:
  category=core
  severity=medium


Summary of my perl5 (revision 5 version 25 subversion 7) configuration​:
  Commit id​: 92c843f
  Platform​:
  osname=freebsd
  osvers=11.0-release-p1
  archname=amd64-freebsd-thread-multi
  uname='freebsd kid51.freebsd11 11.0-release-p1 freebsd
11.0-release-p1 #0 r306420​: thu sep 29 01​:43​:23 utc 2016
root@​releng2.nyi.freebsd.org​:usrobjusrsrcsysgeneric amd64 '
  config_args='-des -Dusedevel -Duseithreads'
  hint=recommended
  useposix=true
  d_sigaction=define
  useithreads=define
  usemultiplicity=define
  use64bitint=define
  use64bitall=define
  uselongdouble=undef
  usemymalloc=n
  bincompat5005=undef
  Compiler​:
  cc='cc'
  ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H
-fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include
-D_FORTIFY_SOURCE=2'
  optimize='-O'
  cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H
-fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
  ccversion=''
  gccversion='4.2.1 Compatible FreeBSD Clang 3.8.0
(tags/RELEASE_380/final 262564)'
  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 ='-pthread -Wl,-E -fstack-protector-strong -L/usr/local/lib'
  libpth=/usr/lib /usr/local/lib /usr/bin/../lib/clang/3.8.0/lib /usr/lib
  libs=-lpthread -lgdbm -lm -lcrypt -lutil
  perllibs=-lpthread -lm -lcrypt -lutil
  libc=
  so=so
  useshrplib=false
  libperl=libperl.a
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs
  dlext=so
  d_dlsymun=undef
  ccdlflags=' '
  cccdlflags='-DPIC -fPIC'
  lddlflags='-shared -L/usr/local/lib -fstack-protector-strong'

Characteristics of this binary (from libperl)​:
  Compile-time options​:
  HAS_TIMES
  MULTIPLICITY
  PERLIO_LAYERS
  PERL_COPY_ON_WRITE
  PERL_DONT_CREATE_GVSV
  PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
  PERL_IMPLICIT_CONTEXT
  PERL_MALLOC_WRAP
  PERL_OP_PARENT
  PERL_PRESERVE_IVUV
  PERL_USE_DEVEL
  USE_64_BIT_ALL
  USE_64_BIT_INT
  USE_ITHREADS
  USE_LARGE_FILES
  USE_LOCALE
  USE_LOCALE_COLLATE
  USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC
  USE_LOCALE_TIME
  USE_PERLIO
  USE_PERL_ATOF
  USE_REENTRANT_API
  Built under freebsd
  Compiled at Oct 24 2016 08​:06​:55
  %ENV​:
  PERL_WORKDIR="/home/jkeenan/gitwork/perl"
  @​INC​:
  lib
  /usr/local/lib/perl5/site_perl/5.25.7/amd64-freebsd-thread-multi
  /usr/local/lib/perl5/site_perl/5.25.7
  /usr/local/lib/perl5/5.25.7/amd64-freebsd-thread-multi
  /usr/local/lib/perl5/5.25.7
  .

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2016

From @dcollinsn

Attached are the results of running this test against smoke-me/khw-locale under ASAN, first using a "normal" config, and then disabling HAS_STRXFRM in config.h and building again.

Also attached is a diff of some instrumentation that I added to see when strxfrm() is being called, and the results of that. It is the first call with locale zh_CN.GB18030, but otherwise is unremarkable.

--
Respectfully,
Dan Collins

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2016

From @dcollinsn

[dcollins@​nightshade-freebsd12 /usr/home/dcollins/perl]$ ./perl -Ilib -V
Summary of my perl5 (revision 5 version 25 subversion 7) configuration​:
  Commit id​: 875a57f
  Platform​:
  osname=freebsd
  osvers=12.0-current
  archname=amd64-freebsd
  uname='freebsd nightshade-freebsd12 12.0-current freebsd 12.0-current #0 r305028​: mon aug 29 22​:45​:29 utc 2016 root@​releng3.nyi.freebsd.org​:usrobjusrsrcsysgeneric amd64 '
  config_args='-Dusedevel -des -DDEBUGGING -Dcc=clang39 -Doptimize=-O0 -g3 -Accflags=-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -Aldflags=-fsanitize=address'
  hint=recommended
  useposix=true
  d_sigaction=define
  useithreads=undef
  usemultiplicity=undef
  use64bitint=define
  use64bitall=define
  uselongdouble=undef
  usemymalloc=n
  bincompat5005=undef
  Compiler​:
  cc='clang39'
  ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_FORTIFY_SOURCE=2'
  optimize='-O0 -g3'
  cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
  ccversion=''
  gccversion='4.2.1 Compatible Clang 3.9.0 (tags/RELEASE_390/final)'
  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='clang39'
  ldflags ='-Wl,-E -fsanitize=address -fstack-protector-strong -L/usr/local/lib'
  libpth=/usr/lib /usr/local/lib /usr/local/llvm39/bin/../lib/clang/3.9.0/lib /usr/lib
  libs=-lpthread -lgdbm -lm -lcrypt -lutil -lc
  perllibs=-lpthread -lm -lcrypt -lutil -lc
  libc=
  so=so
  useshrplib=false
  libperl=libperl.a
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs
  dlext=so
  d_dlsymun=undef
  ccdlflags=' '
  cccdlflags='-DPIC -fPIC'
  lddlflags='-shared -L/usr/local/lib -fstack-protector-strong'

Characteristics of this binary (from libperl)​:
  Compile-time options​:
  DEBUGGING
  HAS_TIMES
  PERLIO_LAYERS
  PERL_COPY_ON_WRITE
  PERL_DONT_CREATE_GVSV
  PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
  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_CTYPE
  USE_LOCALE_NUMERIC
  USE_LOCALE_TIME
  USE_PERLIO
  USE_PERL_ATOF
  Built under freebsd
  Compiled at Oct 24 2016 13​:08​:29
  @​INC​:
  lib
  /usr/local/lib/perl5/site_perl/5.25.7/amd64-freebsd
  /usr/local/lib/perl5/site_perl/5.25.7
  /usr/local/lib/perl5/5.25.7/amd64-freebsd
  /usr/local/lib/perl5/5.25.7
  .
[dcollins@​nightshade-freebsd12 /usr/home/dcollins/perl]$ ./perl -Ilib -T lib/locale.t
ok 1 Verify locales_enabled('ALL') returns 0 or 1
ok 2 and locales_enabled('LC_ALL') returns the same value
ok 3 Verify locales_enabled('COLLATE') returns 0 or 1
ok 4 and locales_enabled('LC_COLLATE') returns the same value
ok 5 Verify locales_enabled('CTYPE') returns 0 or 1
ok 6 and locales_enabled('LC_CTYPE') returns the same value
ok 7 Verify locales_enabled('MESSAGES') returns 0 or 1
ok 8 and locales_enabled('LC_MESSAGES') returns the same value
ok 9 Verify locales_enabled('MONETARY') returns 0 or 1
ok 10 and locales_enabled('LC_MONETARY') returns the same value
ok 11 Verify locales_enabled('NUMERIC') returns 0 or 1
ok 12 and locales_enabled('LC_NUMERIC') returns the same value
ok 13 Verify locales_enabled('TIME') returns 0 or 1
ok 14 and locales_enabled('LC_TIME') returns the same value
ok 15 verify that isn't tainted​: not tainted outside 'use locale'
ok 16 verify that isn't tainted​: $a
ok 17 verify that is tainted​: uc($a)
ok 18 verify that is tainted​: "\U$a"
ok 19 verify that is tainted​: ucfirst($a)
ok 20 verify that is tainted​: "\u$a"
ok 21 verify that is tainted​: lc($a)
ok 22 verify that is tainted​: fc($a)
ok 23 verify that is tainted​: "\L$a"
ok 24 verify that is tainted​: "\F$a"
ok 25 verify that is tainted​: lcfirst($a)
ok 26 verify that is tainted​: "\l$a"
ok 27 verify that isn't tainted​: sprintf('%e', 123.456)
ok 28 verify that isn't tainted​: sprintf('%f', 123.456)
ok 29 verify that isn't tainted​: sprintf('%g', 123.456)
ok 30 verify that isn't tainted​: sprintf('%d', 123.456)
ok 31 verify that isn't tainted​: sprintf('%x', 123.456)
ok 32 verify that is tainted​: $_ = uc($a)
ok 33 verify that is tainted​: $& from /(\w)/
ok 34 verify that is tainted​: $`
ok 35 verify that is tainted​: $'
ok 36 verify that is tainted​: $+
ok 37 verify that is tainted​: $1
ok 38 verify that isn't tainted​: $2
ok 39 verify that isn't tainted​: $& from /(.)/
ok 40 verify that isn't tainted​: $`
ok 41 verify that isn't tainted​: $'
ok 42 verify that isn't tainted​: $+
ok 43 verify that isn't tainted​: $1
ok 44 verify that isn't tainted​: $2
ok 45 verify that is tainted​: $& from /(\W)/
ok 46 verify that is tainted​: $`
ok 47 verify that is tainted​: $'
ok 48 verify that is tainted​: $+
ok 49 verify that is tainted​: $1
ok 50 verify that isn't tainted​: $2
ok 51 verify that isn't tainted​: $& from /(.)/
ok 52 verify that isn't tainted​: $`
ok 53 verify that isn't tainted​: $'
ok 54 verify that isn't tainted​: $+
ok 55 verify that isn't tainted​: $1
ok 56 verify that isn't tainted​: $2
ok 57 verify that is tainted​: $& from /(\s)/
ok 58 verify that is tainted​: $`
ok 59 verify that is tainted​: $'
ok 60 verify that is tainted​: $+
ok 61 verify that is tainted​: $1
ok 62 verify that isn't tainted​: $2
ok 63 verify that isn't tainted​: $& from /(.)/
ok 64 verify that is tainted​: $& from /(\S)/
ok 65 verify that is tainted​: $`
ok 66 verify that is tainted​: $'
ok 67 verify that is tainted​: $+
ok 68 verify that is tainted​: $1
ok 69 verify that isn't tainted​: $2
ok 70 verify that isn't tainted​: $& from /(.)/
ok 71 verify that is tainted​: $& from /(\d)/
ok 72 verify that is tainted​: $`
ok 73 verify that is tainted​: $'
ok 74 verify that is tainted​: $+
ok 75 verify that is tainted​: $1
ok 76 verify that isn't tainted​: $2
ok 77 verify that isn't tainted​: $& from /(.)/
ok 78 verify that is tainted​: $& from /(\D)/
ok 79 verify that is tainted​: $`
ok 80 verify that is tainted​: $'
ok 81 verify that is tainted​: $+
ok 82 verify that is tainted​: $1
ok 83 verify that isn't tainted​: $2
ok 84 verify that isn't tainted​: $& from /(.)/
ok 85 verify that is tainted​: $& from /([[​:alnum​:]])/
ok 86 verify that is tainted​: $`
ok 87 verify that is tainted​: $'
ok 88 verify that is tainted​: $+
ok 89 verify that is tainted​: $1
ok 90 verify that isn't tainted​: $2
ok 91 verify that isn't tainted​: $& from /(.)/
ok 92 verify that is tainted​: $& from /([[​:^alnum​:]])/
ok 93 verify that is tainted​: $`
ok 94 verify that is tainted​: $'
ok 95 verify that is tainted​: $+
ok 96 verify that is tainted​: $1
ok 97 verify that isn't tainted​: $2
ok 98 verify that is tainted​: $& from /(a)|(\w)/
ok 99 verify that is tainted​: $`
ok 100 verify that is tainted​: $'
ok 101 verify that is tainted​: $+
ok 102 verify that is tainted​: $1
ok 103 $1 is 'a'
ok 104 $2 is undefined
ok 105 verify that isn't tainted​: $2
ok 106 verify that isn't tainted​: $3
ok 107 verify that isn't tainted​: $& from /(.)/
ok 108 verify that isn't tainted​: $& from /(\N{CYRILLIC CAPITAL LETTER A})/i
ok 109 verify that isn't tainted​: $`
ok 110 verify that isn't tainted​: $'
ok 111 verify that isn't tainted​: $+
ok 112 verify that isn't tainted​: $1
ok 113 $1 is 'small cyrillic a'
ok 114 verify that isn't tainted​: $2
ok 115 verify that isn't tainted​: $& from /./
ok 116 verify that is tainted​: $& from /(\N{KELVIN SIGN})/i
ok 117 verify that is tainted​: $`
ok 118 verify that is tainted​: $'
ok 119 verify that is tainted​: $+
ok 120 verify that is tainted​: $1
ok 121 verify that isn't tainted​: $2
ok 122 verify that isn't tainted​: $& from /(.)/
ok 123 verify that is tainted​: $& from /(.)\b(.)/
ok 124 verify that is tainted​: $`
ok 125 verify that is tainted​: $'
ok 126 verify that is tainted​: $+
ok 127 verify that is tainted​: $1
ok 128 verify that is tainted​: $2
ok 129 verify that isn't tainted​: $3
ok 130 verify that isn't tainted​: $& from /./
ok 131 verify that is tainted​: $& from /(.)\B(.)/
ok 132 verify that is tainted​: $`
ok 133 verify that is tainted​: $'
ok 134 verify that is tainted​: $+
ok 135 verify that is tainted​: $1
ok 136 verify that is tainted​: $2
ok 137 verify that isn't tainted​: $3
ok 138 verify that isn't tainted​: $& from /./
ok 139 verify that isn't tainted​: $ & from /(.).(\1)/
ok 140 verify that isn't tainted​: $`
ok 141 verify that isn't tainted​: $'
ok 142 verify that isn't tainted​: $+
ok 143 verify that isn't tainted​: $1
ok 144 verify that isn't tainted​: $2
ok 145 verify that isn't tainted​: $3
ok 146 verify that isn't tainted​: $ & from /./
ok 147 verify that isn't tainted​: untainting $_ works
ok 148 verify that isn't tainted​: $ & from /(b)/
ok 149 verify that isn't tainted​: $`
ok 150 verify that isn't tainted​: $'
ok 151 verify that isn't tainted​: $+
ok 152 verify that isn't tainted​: $1
ok 153 verify that isn't tainted​: $2
ok 154 verify that isn't tainted​: untainting $_ works
ok 155 verify that is tainted​: $_ (wasn't tainted) from s/(.+)/$b/ where $b is tainted
ok 156 verify that isn't tainted​: $&
ok 157 verify that isn't tainted​: $`
ok 158 verify that isn't tainted​: $'
ok 159 verify that isn't tainted​: $+
ok 160 verify that isn't tainted​: $1
ok 161 verify that isn't tainted​: $2
ok 162 verify that isn't tainted​: $_ (wasn't tainted) from s/(.+)/b/
ok 163 verify that isn't tainted​: $&
ok 164 verify that isn't tainted​: $`
ok 165 verify that isn't tainted​: $'
ok 166 verify that isn't tainted​: $+
ok 167 verify that isn't tainted​: $1
ok 168 verify that isn't tainted​: $2
ok 169 verify that is tainted​: $b from ($b = $a) =~ s/\w/$&/
ok 170 verify that isn't tainted​: $a from ($b = $a) =~ s/\w/$&/
ok 171 verify that is tainted​: $_ (wasn't tainted) from s/(\w)/\l$1/,
ok 172 verify that is tainted​: $&
ok 173 verify that is tainted​: $`
ok 174 verify that is tainted​: $'
ok 175 verify that is tainted​: $+
ok 176 verify that is tainted​: $1
ok 177 verify that isn't tainted​: $2
ok 178 verify that is tainted​: $_ (wasn't tainted) from s/(\w)/\L$1/,
ok 179 verify that is tainted​: $&
ok 180 verify that is tainted​: $`
ok 181 verify that is tainted​: $'
ok 182 verify that is tainted​: $+
ok 183 verify that is tainted​: $1
ok 184 verify that isn't tainted​: $2
ok 185 verify that is tainted​: $_ (wasn't tainted) from s/(\w)/\u$1/
ok 186 verify that is tainted​: $&
ok 187 verify that is tainted​: $`
ok 188 verify that is tainted​: $'
ok 189 verify that is tainted​: $+
ok 190 verify that is tainted​: $1
ok 191 verify that isn't tainted​: $2
ok 192 verify that is tainted​: $_ (wasn't tainted) from s/(\w)/\U$1/
ok 193 verify that is tainted​: $&
ok 194 verify that is tainted​: $`
ok 195 verify that is tainted​: $'
ok 196 verify that is tainted​: $+
ok 197 verify that is tainted​: $1
ok 198 verify that isn't tainted​: $2
ok 199 verify that isn't tainted​: $a still not tainted
ok 200 verify that isn't tainted​: "a" =~ /([a-z])/
ok 201 verify that isn't tainted​: "foo.bar_baz" =~ /^(.*)[._](.*?)$/
ok 202 verify that isn't tainted​: $a
ok 203 verify that isn't tainted​: uc($a)
ok 204 verify that isn't tainted​: "\U$a"
ok 205 verify that isn't tainted​: ucfirst($a)
ok 206 verify that isn't tainted​: "\u$a"
ok 207 verify that isn't tainted​: lc($a)
ok 208 verify that isn't tainted​: fc($a)
ok 209 verify that isn't tainted​: "\L$a"
ok 210 verify that isn't tainted​: "\F$a"
ok 211 verify that isn't tainted​: lcfirst($a)
ok 212 verify that isn't tainted​: "\l$a"
ok 213 verify that isn't tainted​: sprintf('%e', 123.456)
ok 214 verify that isn't tainted​: sprintf('%f', 123.456)
ok 215 verify that isn't tainted​: sprintf('%g', 123.456)
ok 216 verify that isn't tainted​: sprintf('%d', 123.456)
ok 217 verify that isn't tainted​: sprintf('%x', 123.456)
ok 218 verify that isn't tainted​: $_ = uc($a)
ok 219 verify that isn't tainted​: $& from /(\w)/
ok 220 verify that isn't tainted​: $`
ok 221 verify that isn't tainted​: $'
ok 222 verify that isn't tainted​: $+
ok 223 verify that isn't tainted​: $1
ok 224 verify that isn't tainted​: $2
ok 225 verify that isn't tainted​: $& from /(.)/
ok 226 verify that isn't tainted​: $`
ok 227 verify that isn't tainted​: $'
ok 228 verify that isn't tainted​: $+
ok 229 verify that isn't tainted​: $1
ok 230 verify that isn't tainted​: $2
ok 231 verify that isn't tainted​: $& from /(\W)/
ok 232 verify that isn't tainted​: $`
ok 233 verify that isn't tainted​: $'
ok 234 verify that isn't tainted​: $+
ok 235 verify that isn't tainted​: $1
ok 236 verify that isn't tainted​: $2
ok 237 verify that isn't tainted​: $& from /(.)/
ok 238 verify that isn't tainted​: $`
ok 239 verify that isn't tainted​: $'
ok 240 verify that isn't tainted​: $+
ok 241 verify that isn't tainted​: $1
ok 242 verify that isn't tainted​: $2
ok 243 verify that isn't tainted​: $& from /(\s)/
ok 244 verify that isn't tainted​: $`
ok 245 verify that isn't tainted​: $'
ok 246 verify that isn't tainted​: $+
ok 247 verify that isn't tainted​: $1
ok 248 verify that isn't tainted​: $2
ok 249 verify that isn't tainted​: $& from /(.)/
ok 250 verify that isn't tainted​: $& from /(\S)/
ok 251 verify that isn't tainted​: $`
ok 252 verify that isn't tainted​: $'
ok 253 verify that isn't tainted​: $+
ok 254 verify that isn't tainted​: $1
ok 255 verify that isn't tainted​: $2
ok 256 verify that isn't tainted​: $& from /(.)/
ok 257 verify that isn't tainted​: $& from /(\d)/
ok 258 verify that isn't tainted​: $`
ok 259 verify that isn't tainted​: $'
ok 260 verify that isn't tainted​: $+
ok 261 verify that isn't tainted​: $1
ok 262 verify that isn't tainted​: $2
ok 263 verify that isn't tainted​: $& from /(.)/
ok 264 verify that isn't tainted​: $& from /(\D)/
ok 265 verify that isn't tainted​: $`
ok 266 verify that isn't tainted​: $'
ok 267 verify that isn't tainted​: $+
ok 268 verify that isn't tainted​: $1
ok 269 verify that isn't tainted​: $2
ok 270 verify that isn't tainted​: $& from /(.)/
ok 271 verify that isn't tainted​: $& from /([[​:alnum​:]])/
ok 272 verify that isn't tainted​: $`
ok 273 verify that isn't tainted​: $'
ok 274 verify that isn't tainted​: $+
ok 275 verify that isn't tainted​: $1
ok 276 verify that isn't tainted​: $2
ok 277 verify that isn't tainted​: $& from /(.)/
ok 278 verify that isn't tainted​: $& from /([[​:^alnum​:]])/
ok 279 verify that isn't tainted​: $`
ok 280 verify that isn't tainted​: $'
ok 281 verify that isn't tainted​: $+
ok 282 verify that isn't tainted​: $1
ok 283 verify that isn't tainted​: $2
ok 284 verify that isn't tainted​: $& from /(a)|(\w)/
ok 285 verify that isn't tainted​: $`
ok 286 verify that isn't tainted​: $'
ok 287 verify that isn't tainted​: $+
ok 288 verify that isn't tainted​: $1
ok 289 $1 is 'a'
ok 290 $2 is undefined
ok 291 verify that isn't tainted​: $2
ok 292 verify that isn't tainted​: $3
ok 293 verify that isn't tainted​: $& from /(.)/
ok 294 verify that isn't tainted​: $& from /(\N{CYRILLIC CAPITAL LETTER A})/i
ok 295 verify that isn't tainted​: $`
ok 296 verify that isn't tainted​: $'
ok 297 verify that isn't tainted​: $+
ok 298 verify that isn't tainted​: $1
ok 299 $1 is 'small cyrillic a'
ok 300 verify that isn't tainted​: $2
ok 301 verify that isn't tainted​: $& from /./
ok 302 verify that isn't tainted​: $& from /(\N{KELVIN SIGN})/i
ok 303 verify that isn't tainted​: $`
ok 304 verify that isn't tainted​: $'
ok 305 verify that isn't tainted​: $+
ok 306 verify that isn't tainted​: $1
ok 307 verify that isn't tainted​: $2
ok 308 verify that isn't tainted​: $& from /(.)/
ok 309 verify that isn't tainted​: $& from /(.)\b(.)/
ok 310 verify that isn't tainted​: $`
ok 311 verify that isn't tainted​: $'
ok 312 verify that isn't tainted​: $+
ok 313 verify that isn't tainted​: $1
ok 314 verify that isn't tainted​: $2
ok 315 verify that isn't tainted​: $3
ok 316 verify that isn't tainted​: $& from /./
ok 317 verify that isn't tainted​: $& from /(.)\B(.)/
ok 318 verify that isn't tainted​: $`
ok 319 verify that isn't tainted​: $'
ok 320 verify that isn't tainted​: $+
ok 321 verify that isn't tainted​: $1
ok 322 verify that isn't tainted​: $2
ok 323 verify that isn't tainted​: $3
ok 324 verify that isn't tainted​: $& from /./
ok 325 verify that isn't tainted​: $ & from /(.).(\1)/
ok 326 verify that isn't tainted​: $`
ok 327 verify that isn't tainted​: $'
ok 328 verify that isn't tainted​: $+
ok 329 verify that isn't tainted​: $1
ok 330 verify that isn't tainted​: $2
ok 331 verify that isn't tainted​: $3
ok 332 verify that isn't tainted​: $ & from /./
ok 333 verify that isn't tainted​: untainting $_ works
ok 334 verify that isn't tainted​: $ & from /(b)/
ok 335 verify that isn't tainted​: $`
ok 336 verify that isn't tainted​: $'
ok 337 verify that isn't tainted​: $+
ok 338 verify that isn't tainted​: $1
ok 339 verify that isn't tainted​: $2
ok 340 verify that isn't tainted​: untainting $_ works
ok 341 verify that isn't tainted​: $_ (wasn't tainted) from s/(.+)/b/
ok 342 verify that isn't tainted​: $&
ok 343 verify that isn't tainted​: $`
ok 344 verify that isn't tainted​: $'
ok 345 verify that isn't tainted​: $+
ok 346 verify that isn't tainted​: $1
ok 347 verify that isn't tainted​: $2
ok 348 verify that isn't tainted​: $b from ($b = $a) =~ s/\w/$&/
ok 349 verify that isn't tainted​: $a from ($b = $a) =~ s/\w/$&/
ok 350 verify that isn't tainted​: $_ (wasn't tainted) from s/(\w)/\l$1/,
ok 351 verify that isn't tainted​: $&
ok 352 verify that isn't tainted​: $`
ok 353 verify that isn't tainted​: $'
ok 354 verify that isn't tainted​: $+
ok 355 verify that isn't tainted​: $1
ok 356 verify that isn't tainted​: $2
ok 357 verify that isn't tainted​: $_ (wasn't tainted) from s/(\w)/\L$1/,
ok 358 verify that isn't tainted​: $&
ok 359 verify that isn't tainted​: $`
ok 360 verify that isn't tainted​: $'
ok 361 verify that isn't tainted​: $+
ok 362 verify that isn't tainted​: $1
ok 363 verify that isn't tainted​: $2
ok 364 verify that isn't tainted​: $_ (wasn't tainted) from s/(\w)/\u$1/
ok 365 verify that isn't tainted​: $&
ok 366 verify that isn't tainted​: $`
ok 367 verify that isn't tainted​: $'
ok 368 verify that isn't tainted​: $+
ok 369 verify that isn't tainted​: $1
ok 370 verify that isn't tainted​: $2
ok 371 verify that isn't tainted​: $_ (wasn't tainted) from s/(\w)/\U$1/
ok 372 verify that isn't tainted​: $&
ok 373 verify that isn't tainted​: $`
ok 374 verify that isn't tainted​: $'
ok 375 verify that isn't tainted​: $+
ok 376 verify that isn't tainted​: $1
ok 377 verify that isn't tainted​: $2
ok 378 verify that isn't tainted​: $a still not tainted
ok 379 verify that isn't tainted​: "a" =~ /([a-z])/
ok 380 verify that isn't tainted​: "foo.bar_baz" =~ /^(.*)[._](.*?)$/
ok 381 skipped​: testing of locale 'ja_JP.SJIS' is skipped​: Locale 'ja_JP.SJIS' may not work well. Some characters in it are not recognized by Perl.
The following characters (and maybe others) may not have the same meaning as the Perl program expects​:
'\' '~'

ok 382 skipped​: testing of locale 'ja_JP.eucJP' is skipped​: Locale 'ja_JP.eucJP' may not work well. Some characters in it are not recognized by Perl.

ok 383 skipped​: testing of locale 'ko_KR.CP949' is skipped​: Locale 'ko_KR.CP949' may not work well. Some characters in it are not recognized by Perl.

ok 384 skipped​: testing of locale 'ko_KR.eucKR' is skipped​: Locale 'ko_KR.eucKR' may not work well. Some characters in it are not recognized by Perl.

ok 385 skipped​: testing of locale 'zh_CN.GB18030' is skipped​: Locale 'zh_CN.GB18030' may not work well. Some characters in it are not recognized by Perl.

ok 386 skipped​: testing of locale 'zh_CN.GB2312' is skipped​: Locale 'zh_CN.GB2312' may not work well. Some characters in it are not recognized by Perl.

ok 387 skipped​: testing of locale 'zh_CN.GBK' is skipped​: Locale 'zh_CN.GBK' may not work well. Some characters in it are not recognized by Perl.

ok 388 skipped​: testing of locale 'zh_CN.eucCN' is skipped​: Locale 'zh_CN.eucCN' may not work well. Some characters in it are not recognized by Perl.

ok 389 skipped​: testing of locale 'zh_TW.Big5' is skipped​: Locale 'zh_TW.Big5' may not work well. Some characters in it are not recognized by Perl.
The following characters (and maybe others) may not have the same meaning as the Perl program expects​:
'!' '"' '#' '$' '%' '&' ''' '(' ')' '*' '+' ',' '-' '.' '/' '​:' ';' '<' '=' '>' '?' '@​' '[' '\' ']' '^' '_' '`' '{' '|' '}' '~'

ok 390 Verify that /[[​:upper​:]]/ matches all alpha X for which uc(X) == X and lc(X) != X
ok 391 Verify that /[[​:lower​:]]/i matches all alpha X for which uc(X) == X and lc(X) != X
ok 392 Verify that /[[​:lower​:]]/ matches all alpha X for which lc(X) == X and uc(X) != X
ok 393 Verify that /[[​:upper​:]]/i matches all alpha X for which lc(X) == X and uc(X) != X
ok 394 Verify that \w and [​:word​:] are identical
ok 395 Verify that \d and [​:digit​:] are identical
ok 396 Verify that \s and [​:space​:] are identical
ok 397 Verify that [​:posix​:] and [​:^posix​:] are mutually exclusive
ok 398 Verify that [​:lower​:] contains at least a-z
ok 399 Verify that [​:lower​:] is a subset of [​:alpha​:]
ok 400 Verify that [​:upper​:] contains at least A-Z
ok 401 Verify that [​:upper​:] is a subset of [​:alpha​:]
ok 402 Verify that /[[​:lower​:]]/i is a subset of [​:alpha​:]
ok 403 Verify that [​:alpha​:] is a subset of [​:alnum​:]
ok 404 Verify that [​:digit​:] contains at least 0-9
ok 405 Verify that [​:digit​:] is a subset of [​:alnum​:]
ok 406 Verify that [​:digit​:] matches either 10 or 20 code points
ok 407 Verify that if there is a second set of digits in [​:digit​:], they are consecutive
ok 408 Verify that [​:xdigit​:] contains one or two blocks of 10 consecutive [​:digit​:] chars
ok 409 Verify that [​:xdigit​:] contains at least A-F, a-f
ok 410 Verify that any additional members of [​:xdigit​:], are in groups of 6 consecutive code points
ok 411 Verify that [​:xdigit​:] is a subset of [​:graph​:]
ok 412 Verify that [​:punct​:] is a subset of [​:graph​:]
ok 413 Verify that the space character is not in [​:graph​:]
ok 414 Verify that [​:space​:] contains at least [\f\n\r\t\cK ]
ok 415 Verify that [​:blank​:] contains at least [\t ]
ok 416 Verify that [​:blank​:] is a subset of [​:space​:]
ok 417 Verify that [​:graph​:] is a subset of [​:print​:]
ok 418 Verify that the space character is in [​:print​:]
ok 419 Verify that isn't both [​:cntrl​:] and [​:print​:]
ok 420 Verify that isn't both [​:alpha​:] and [​:digit​:]
ok 421 Verify that isn't both [​:alnum​:] and [​:punct​:]
ok 422 Verify that isn't both [​:xdigit​:] and [​:punct​:]
ok 423 Verify that isn't both [​:graph​:] and [​:space​:]
ok 424 Verify that cmp works with a read-only scalar; no- vs locale
ok 425 Verify that "le", "ne", etc work
#
# For more details, rerun, with environment variable PERL_DEBUG_FULL_TEST=1.
# Then look at that output for lines that match 'failed 426'
not ok 426 Verify that \0 sorts before any other control
ok 427 Skip in locales where all controls have primary sorting weight; otherwise verify that \0 doesn't have primary sorting weight
ok 428 Verify that strings with embedded NUL collate
ok 429 Verify that strings with embedded NUL and extra trailing NUL collate
ok 430 Verify that empty strings collate
ok 431 Skip in non-UTF-8 locales; otherwise verify that UTF8ness doesn't matter with collation
ok 432 Skip in UTF-8 locales; otherwise verify that single byte collates before 0x100 and above
ok 433 Skip in UTF-8 locales; otherwise verify that 0x100 and above collate in code point order
ok 434 Verify that an intervening printf doesn't change assignment results
ok 435 Verify that an intervening sprintf doesn't change assignment results
ok 436 Verify that a different locale radix works when doing "==" with a constant
ok 437 Verify that a different locale radix works when doing "==" with a scalar
ok 438 Verify that a different locale radix works when doing "==" with a scalar and an intervening sprintf
ok 439 Verify that can assign stringified under inner no-locale block
ok 440 Verify that "==" with a scalar still works in inner no locale
ok 441 Verify that "==" with a scalar and an intervening sprintf still works in inner no locale
ok 442 Verify that after a no-locale block, a different locale radix still works when doing "==" with a constant
ok 443 Verify that after a no-locale block, a different locale radix still works when doing "==" with a scalar
ok 444 Verify that after a no-locale block, a different locale radix still works when doing "==" with a scalar and an intervening sprintf
ok 445 Verify that after a no-locale block, a different locale radix can participate in an addition and function call as numeric
ok 446 Verify that don't get warning under "==" even if radix is not a dot
ok 447 Verify that non-ASCII UTF-8 error messages are in UTF-8
ok 448 ... and are ASCII outside "use locale"
ok 449 Verify that a number with a UTF-8 radix has a UTF-8 stringification
ok 450 Verify that a sprintf of a number with a UTF-8 radix yields UTF-8
ok 451 Verify that a sprintf of a number outside locale scope uses a dot radix
ok 452 Verify that a sprintf of a number back within locale scope uses locale radix
ok 453 Verify that strftime doesn't return "%p" in locales where %p is empty
ok 454 Verify that strftime returns date with UTF-8 flag appropriately set
ok 455 "$!" is ASCII only outside of locale scope
ok 456 Verify "lc(foo) cmp lc(bar)" is the same as using intermediaries for the cmp
ok 457 Verify case insensitive matching works
ok 458 Verify atof with locale radix and negative exponent
ok 459 variable set to setlocale(BAD LOCALE) is considered uninitialized
ok 460 uc("") in C locale (use locale; not encoded in utf8) should be "", got ""
ok 461 verify that is tainted
ok 462 uc("") in C locale (use locale; encoded in utf8) should be "", got ""
ok 463 verify that is tainted
ok 464 uc("a") in C locale (use locale; not encoded in utf8) should be "A", got "A"
ok 465 verify that is tainted
ok 466 uc("a") in C locale (use locale; encoded in utf8) should be "A", got "A"
ok 467 verify that is tainted
ok 468 uc("à") in C locale (use locale; not encoded in utf8) should be "à", got "à"
ok 469 verify that is tainted
ok 470 uc("à") in C locale (use locale; encoded in utf8) should be "à", got "à"
ok 471 verify that is tainted
ok 472 uc("ÿ") in C locale (use locale; not encoded in utf8) should be "ÿ", got "ÿ"
ok 473 verify that is tainted
ok 474 uc("ÿ") in C locale (use locale; encoded in utf8) should be "ÿ", got "ÿ"
ok 475 verify that is tainted
ok 476 uc("ff") in C locale (use locale; not encoded in utf8) should be "ff", got "ff"
ok 477 verify that is tainted
ok 478 uc("ff") in C locale (use locale; encoded in utf8) should be "ff", got "ff"
ok 479 verify that is tainted
ok 480 uc("ʼn") in C locale (use locale; not encoded in utf8) should be "ʼn", got "ʼn"
ok 481 verify that is tainted
ok 482 uc("ʼn") in C locale (use locale; encoded in utf8) should be "ʼn", got "ʼn"
ok 483 verify that is tainted
ok 484 uc("ā") in C locale (use locale; not encoded in utf8) should be "Ā", got "Ā"
ok 485 verify that is tainted
ok 486 uc("ā") in C locale (use locale; encoded in utf8) should be "Ā", got "Ā"
ok 487 verify that is tainted
ok 488 uc("") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "", got ""
ok 489 verify that isn't tainted
ok 490 uc("") in C locale (use locale '​:not_characters'; encoded in utf8) should be "", got ""
ok 491 verify that isn't tainted
ok 492 uc("a") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "A", got "A"
ok 493 verify that isn't tainted
ok 494 uc("a") in C locale (use locale '​:not_characters'; encoded in utf8) should be "A", got "A"
ok 495 verify that isn't tainted
ok 496 uc("à") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "À", got "À"
ok 497 verify that isn't tainted
ok 498 uc("à") in C locale (use locale '​:not_characters'; encoded in utf8) should be "À", got "À"
ok 499 verify that isn't tainted
ok 500 uc("ÿ") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "Ÿ", got "Ÿ"
ok 501 verify that isn't tainted
ok 502 uc("ÿ") in C locale (use locale '​:not_characters'; encoded in utf8) should be "Ÿ", got "Ÿ"
ok 503 verify that isn't tainted
ok 504 uc("ff") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "FF", got "FF"
ok 505 verify that isn't tainted
ok 506 uc("ff") in C locale (use locale '​:not_characters'; encoded in utf8) should be "FF", got "FF"
ok 507 verify that isn't tainted
ok 508 uc("ʼn") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "ʼN", got "ʼN"
ok 509 verify that isn't tainted
ok 510 uc("ʼn") in C locale (use locale '​:not_characters'; encoded in utf8) should be "ʼN", got "ʼN"
ok 511 verify that isn't tainted
ok 512 uc("ā") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "Ā", got "Ā"
ok 513 verify that isn't tainted
ok 514 uc("ā") in C locale (use locale '​:not_characters'; encoded in utf8) should be "Ā", got "Ā"
ok 515 verify that isn't tainted
ok 516 ucfirst("") in C locale (use locale; not encoded in utf8) should be "", got ""
ok 517 verify that is tainted
ok 518 ucfirst("") in C locale (use locale; encoded in utf8) should be "", got ""
ok 519 verify that is tainted
ok 520 ucfirst("a") in C locale (use locale; not encoded in utf8) should be "A", got "A"
ok 521 verify that is tainted
ok 522 ucfirst("a") in C locale (use locale; encoded in utf8) should be "A", got "A"
ok 523 verify that is tainted
ok 524 ucfirst("à") in C locale (use locale; not encoded in utf8) should be "à", got "à"
ok 525 verify that is tainted
ok 526 ucfirst("à") in C locale (use locale; encoded in utf8) should be "à", got "à"
ok 527 verify that is tainted
ok 528 ucfirst("ÿ") in C locale (use locale; not encoded in utf8) should be "ÿ", got "ÿ"
ok 529 verify that is tainted
ok 530 ucfirst("ÿ") in C locale (use locale; encoded in utf8) should be "ÿ", got "ÿ"
ok 531 verify that is tainted
ok 532 ucfirst("ff") in C locale (use locale; not encoded in utf8) should be "ff", got "ff"
ok 533 verify that is tainted
ok 534 ucfirst("ff") in C locale (use locale; encoded in utf8) should be "ff", got "ff"
ok 535 verify that is tainted
ok 536 ucfirst("ʼn") in C locale (use locale; not encoded in utf8) should be "ʼn", got "ʼn"
ok 537 verify that is tainted
ok 538 ucfirst("ʼn") in C locale (use locale; encoded in utf8) should be "ʼn", got "ʼn"
ok 539 verify that is tainted
ok 540 ucfirst("ā") in C locale (use locale; not encoded in utf8) should be "Ā", got "Ā"
ok 541 verify that is tainted
ok 542 ucfirst("ā") in C locale (use locale; encoded in utf8) should be "Ā", got "Ā"
ok 543 verify that is tainted
ok 544 ucfirst("") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "", got ""
ok 545 verify that isn't tainted
ok 546 ucfirst("") in C locale (use locale '​:not_characters'; encoded in utf8) should be "", got ""
ok 547 verify that isn't tainted
ok 548 ucfirst("a") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "A", got "A"
ok 549 verify that isn't tainted
ok 550 ucfirst("a") in C locale (use locale '​:not_characters'; encoded in utf8) should be "A", got "A"
ok 551 verify that isn't tainted
ok 552 ucfirst("à") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "À", got "À"
ok 553 verify that isn't tainted
ok 554 ucfirst("à") in C locale (use locale '​:not_characters'; encoded in utf8) should be "À", got "À"
ok 555 verify that isn't tainted
ok 556 ucfirst("ÿ") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "Ÿ", got "Ÿ"
ok 557 verify that isn't tainted
ok 558 ucfirst("ÿ") in C locale (use locale '​:not_characters'; encoded in utf8) should be "Ÿ", got "Ÿ"
ok 559 verify that isn't tainted
ok 560 ucfirst("ff") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "Ff", got "Ff"
ok 561 verify that isn't tainted
ok 562 ucfirst("ff") in C locale (use locale '​:not_characters'; encoded in utf8) should be "Ff", got "Ff"
ok 563 verify that isn't tainted
ok 564 ucfirst("ʼn") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "ʼN", got "ʼN"
ok 565 verify that isn't tainted
ok 566 ucfirst("ʼn") in C locale (use locale '​:not_characters'; encoded in utf8) should be "ʼN", got "ʼN"
ok 567 verify that isn't tainted
ok 568 ucfirst("ā") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "Ā", got "Ā"
ok 569 verify that isn't tainted
ok 570 ucfirst("ā") in C locale (use locale '​:not_characters'; encoded in utf8) should be "Ā", got "Ā"
ok 571 verify that isn't tainted
ok 572 lc("") in C locale (use locale; not encoded in utf8) should be "", got ""
ok 573 verify that is tainted
ok 574 lc("") in C locale (use locale; encoded in utf8) should be "", got ""
ok 575 verify that is tainted
ok 576 lc("A") in C locale (use locale; not encoded in utf8) should be "a", got "a"
ok 577 verify that is tainted
ok 578 lc("A") in C locale (use locale; encoded in utf8) should be "a", got "a"
ok 579 verify that is tainted
ok 580 lc("À") in C locale (use locale; not encoded in utf8) should be "À", got "À"
ok 581 verify that is tainted
ok 582 lc("À") in C locale (use locale; encoded in utf8) should be "À", got "À"
ok 583 verify that is tainted
ok 584 lc("ſ") in C locale (use locale; not encoded in utf8) should be "ſ", got "ſ"
ok 585 verify that is tainted
ok 586 lc("ſ") in C locale (use locale; encoded in utf8) should be "ſ", got "ſ"
ok 587 verify that is tainted
ok 588 lc("Ā") in C locale (use locale; not encoded in utf8) should be "ā", got "ā"
ok 589 verify that is tainted
ok 590 lc("Ā") in C locale (use locale; encoded in utf8) should be "ā", got "ā"
ok 591 verify that is tainted
ok 592 lc("") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "", got ""
ok 593 verify that isn't tainted
ok 594 lc("") in C locale (use locale '​:not_characters'; encoded in utf8) should be "", got ""
ok 595 verify that isn't tainted
ok 596 lc("A") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "a", got "a"
ok 597 verify that isn't tainted
ok 598 lc("A") in C locale (use locale '​:not_characters'; encoded in utf8) should be "a", got "a"
ok 599 verify that isn't tainted
ok 600 lc("À") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "à", got "à"
ok 601 verify that isn't tainted
ok 602 lc("À") in C locale (use locale '​:not_characters'; encoded in utf8) should be "à", got "à"
ok 603 verify that isn't tainted
ok 604 lc("ſ") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "ſ", got "ſ"
ok 605 verify that isn't tainted
ok 606 lc("ſ") in C locale (use locale '​:not_characters'; encoded in utf8) should be "ſ", got "ſ"
ok 607 verify that isn't tainted
ok 608 lc("Ā") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "ā", got "ā"
ok 609 verify that isn't tainted
ok 610 lc("Ā") in C locale (use locale '​:not_characters'; encoded in utf8) should be "ā", got "ā"
ok 611 verify that isn't tainted
ok 612 lcfirst("") in C locale (use locale; not encoded in utf8) should be "", got ""
ok 613 verify that is tainted
ok 614 lcfirst("") in C locale (use locale; encoded in utf8) should be "", got ""
ok 615 verify that is tainted
ok 616 lcfirst("A") in C locale (use locale; not encoded in utf8) should be "a", got "a"
ok 617 verify that is tainted
ok 618 lcfirst("A") in C locale (use locale; encoded in utf8) should be "a", got "a"
ok 619 verify that is tainted
ok 620 lcfirst("À") in C locale (use locale; not encoded in utf8) should be "À", got "À"
ok 621 verify that is tainted
ok 622 lcfirst("À") in C locale (use locale; encoded in utf8) should be "À", got "À"
ok 623 verify that is tainted
ok 624 lcfirst("ſ") in C locale (use locale; not encoded in utf8) should be "ſ", got "ſ"
ok 625 verify that is tainted
ok 626 lcfirst("ſ") in C locale (use locale; encoded in utf8) should be "ſ", got "ſ"
ok 627 verify that is tainted
ok 628 lcfirst("Ā") in C locale (use locale; not encoded in utf8) should be "ā", got "ā"
ok 629 verify that is tainted
ok 630 lcfirst("Ā") in C locale (use locale; encoded in utf8) should be "ā", got "ā"
ok 631 verify that is tainted
ok 632 lcfirst("") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "", got ""
ok 633 verify that isn't tainted
ok 634 lcfirst("") in C locale (use locale '​:not_characters'; encoded in utf8) should be "", got ""
ok 635 verify that isn't tainted
ok 636 lcfirst("A") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "a", got "a"
ok 637 verify that isn't tainted
ok 638 lcfirst("A") in C locale (use locale '​:not_characters'; encoded in utf8) should be "a", got "a"
ok 639 verify that isn't tainted
ok 640 lcfirst("À") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "à", got "à"
ok 641 verify that isn't tainted
ok 642 lcfirst("À") in C locale (use locale '​:not_characters'; encoded in utf8) should be "à", got "à"
ok 643 verify that isn't tainted
ok 644 lcfirst("ſ") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "ſ", got "ſ"
ok 645 verify that isn't tainted
ok 646 lcfirst("ſ") in C locale (use locale '​:not_characters'; encoded in utf8) should be "ſ", got "ſ"
ok 647 verify that isn't tainted
ok 648 lcfirst("Ā") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "ā", got "ā"
ok 649 verify that isn't tainted
ok 650 lcfirst("Ā") in C locale (use locale '​:not_characters'; encoded in utf8) should be "ā", got "ā"
ok 651 verify that isn't tainted
ok 652 fc("") in C locale (use locale; not encoded in utf8) should be "", got ""
ok 653 verify that is tainted
ok 654 fc("") in C locale (use locale; encoded in utf8) should be "", got ""
ok 655 verify that is tainted
ok 656 fc("A") in C locale (use locale; not encoded in utf8) should be "a", got "a"
ok 657 verify that is tainted
ok 658 fc("A") in C locale (use locale; encoded in utf8) should be "a", got "a"
ok 659 verify that is tainted
ok 660 fc("À") in C locale (use locale; not encoded in utf8) should be "À", got "À"
ok 661 verify that is tainted
ok 662 fc("À") in C locale (use locale; encoded in utf8) should be "À", got "À"
ok 663 verify that is tainted
ok 664 fc("ſ") in C locale (use locale; not encoded in utf8) should be "ſ", got "ſ"
ok 665 verify that is tainted
ok 666 fc("ſ") in C locale (use locale; encoded in utf8) should be "ſ", got "ſ"
ok 667 verify that is tainted
ok 668 fc("Ā") in C locale (use locale; not encoded in utf8) should be "ā", got "ā"
ok 669 verify that is tainted
ok 670 fc("Ā") in C locale (use locale; encoded in utf8) should be "ā", got "ā"
ok 671 verify that is tainted
ok 672 fc("") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "", got ""
ok 673 verify that isn't tainted
ok 674 fc("") in C locale (use locale '​:not_characters'; encoded in utf8) should be "", got ""
ok 675 verify that isn't tainted
ok 676 fc("A") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "a", got "a"
ok 677 verify that isn't tainted
ok 678 fc("A") in C locale (use locale '​:not_characters'; encoded in utf8) should be "a", got "a"
ok 679 verify that isn't tainted
ok 680 fc("À") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "à", got "à"
ok 681 verify that isn't tainted
ok 682 fc("À") in C locale (use locale '​:not_characters'; encoded in utf8) should be "à", got "à"
ok 683 verify that isn't tainted
ok 684 fc("ſ") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "s", got "s"
ok 685 verify that isn't tainted
ok 686 fc("ſ") in C locale (use locale '​:not_characters'; encoded in utf8) should be "s", got "s"
ok 687 verify that isn't tainted
ok 688 fc("Ā") in C locale (use locale '​:not_characters'; not encoded in utf8) should be "ā", got "ā"
ok 689 verify that isn't tainted
ok 690 fc("Ā") in C locale (use locale '​:not_characters'; encoded in utf8) should be "ā", got "ā"
ok 691 verify that isn't tainted
#
# The locale definition
#
# hi_IN.ISCII-DEV
#
# on your system may have errors because the locale test 426
# "Verify that \0 sorts before any other control"
# failed in that locale.
#
# If your users are not using these locales you are safe for the moment,
# but please report this failure first to perlbug@​perl.org using the
# perlbug script (as described in the INSTALL file) so that the exact
# details of the failures can be sorted out first and then your operating
# system supplier can be alerted about these anomalies.
#
# The following locales
#
# C POSIX af_ZA.ISO8859-1 af_ZA.ISO8859-15 af_ZA.UTF-8
# am_ET.UTF-8 ar_AE.UTF-8 ar_EG.UTF-8 ar_JO.UTF-8 ar_MA.UTF-8
# ar_QA.UTF-8 ar_SA.UTF-8 be_BY.CP1131 be_BY.CP1251 be_BY.ISO8859-5
# be_BY.UTF-8 bg_BG.CP1251 bg_BG.UTF-8 ca_AD.ISO8859-1
# ca_AD.ISO8859-15 ca_AD.UTF-8 ca_ES.ISO8859-1 ca_ES.ISO8859-15
# ca_ES.UTF-8 ca_FR.ISO8859-1 ca_FR.ISO8859-15 ca_FR.UTF-8
# ca_IT.ISO8859-1 ca_IT.ISO8859-15 ca_IT.UTF-8 cs_CZ.ISO8859-2
# cs_CZ.UTF-8 da_DK.ISO8859-1 da_DK.ISO8859-15 da_DK.UTF-8
# de_AT.ISO8859-1 de_AT.ISO8859-15 de_AT.UTF-8 de_CH.ISO8859-1
# de_CH.ISO8859-15 de_CH.UTF-8 de_DE.ISO8859-1 de_DE.ISO8859-15
# de_DE.UTF-8 el_GR.ISO8859-7 el_GR.UTF-8 en_AU.ISO8859-1
# en_AU.ISO8859-15 en_AU.US-ASCII en_AU.UTF-8 en_CA.ISO8859-1
# en_CA.ISO8859-15 en_CA.US-ASCII en_CA.UTF-8 en_GB.ISO8859-1
# en_GB.ISO8859-15 en_GB.US-ASCII en_GB.UTF-8 en_HK.ISO8859-1
# en_HK.UTF-8 en_IE.ISO8859-1 en_IE.ISO8859-15 en_IE.UTF-8
# en_NZ.ISO8859-1 en_NZ.ISO8859-15 en_NZ.US-ASCII en_NZ.UTF-8
# en_PH.UTF-8 en_SG.ISO8859-1 en_SG.UTF-8 en_US.ISO8859-1
# en_US.ISO8859-15 en_US.US-ASCII en_US.UTF-8 en_ZA.ISO8859-1
# en_ZA.ISO8859-15 en_ZA.US-ASCII en_ZA.UTF-8 es_AR.ISO8859-1
# es_AR.UTF-8 es_CR.UTF-8 es_ES.ISO8859-1 es_ES.ISO8859-15
# es_ES.UTF-8 es_MX.ISO8859-1 es_MX.UTF-8 et_EE.ISO8859-1
# et_EE.ISO8859-15 et_EE.UTF-8 eu_ES.ISO8859-1 eu_ES.ISO8859-15
# eu_ES.UTF-8 fi_FI.ISO8859-1 fi_FI.ISO8859-15 fi_FI.UTF-8
# fr_BE.ISO8859-1 fr_BE.ISO8859-15 fr_BE.UTF-8 fr_CA.ISO8859-1
# fr_CA.ISO8859-15 fr_CA.UTF-8 fr_CH.ISO8859-1 fr_CH.ISO8859-15
# fr_CH.UTF-8 fr_FR.ISO8859-1 fr_FR.ISO8859-15 fr_FR.UTF-8
# he_IL.UTF-8 hi_IN.UTF-8 hr_HR.ISO8859-2 hr_HR.UTF-8
# hu_HU.ISO8859-2 hu_HU.UTF-8 hy_AM.ARMSCII-8 hy_AM.UTF-8
# is_IS.ISO8859-1 is_IS.ISO8859-15 is_IS.UTF-8 it_CH.ISO8859-1
# it_CH.ISO8859-15 it_CH.UTF-8 it_IT.ISO8859-1 it_IT.ISO8859-15
# it_IT.UTF-8 ja_JP.UTF-8 kk_KZ.UTF-8 ko_KR.UTF-8 lt_LT.ISO8859-13
# lt_LT.UTF-8 lv_LV.ISO8859-13 lv_LV.UTF-8 mn_MN.UTF-8
# nb_NO.ISO8859-1 nb_NO.ISO8859-15 nb_NO.UTF-8 nl_BE.ISO8859-1
# nl_BE.ISO8859-15 nl_BE.UTF-8 nl_NL.ISO8859-1 nl_NL.ISO8859-15
# nl_NL.UTF-8 nn_NO.ISO8859-1 nn_NO.ISO8859-15 nn_NO.UTF-8
# pl_PL.ISO8859-2 pl_PL.UTF-8 pt_BR.ISO8859-1 pt_BR.UTF-8
# pt_PT.ISO8859-1 pt_PT.ISO8859-15 pt_PT.UTF-8 ro_RO.ISO8859-2
# ro_RO.UTF-8 ru_RU.CP1251 ru_RU.CP866 ru_RU.ISO8859-5
# ru_RU.KOI8-R ru_RU.UTF-8 se_FI.UTF-8 se_NO.UTF-8 sk_SK.ISO8859-2
# sk_SK.UTF-8 sl_SI.ISO8859-2 sl_SI.UTF-8 sr_RS.ISO8859-2
# sr_RS.ISO8859-5 sr_RS.UTF-8 sr_RS.UTF-8@​latin sv_FI.ISO8859-1
# sv_FI.ISO8859-15 sv_FI.UTF-8 sv_SE.ISO8859-1 sv_SE.ISO8859-15
# sv_SE.UTF-8 tr_TR.ISO8859-9 tr_TR.UTF-8 uk_UA.CP1251
# uk_UA.ISO8859-5 uk_UA.KOI8-U uk_UA.UTF-8 zh_CN.UTF-8
# zh_HK.UTF-8 zh_TW.UTF-8
#
# tested okay.
#
# The following locales
#
# hi_IN.ISCII-DEV
#
# had problems.
#
# For more details, rerun, with environment variable PERL_DEBUG_FULL_TEST=1.
1..691

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2016

From @dcollinsn

[dcollins@​nightshade-freebsd12 /usr/home/dcollins/perl]$ ./perl -Ilib -V
Summary of my perl5 (revision 5 version 25 subversion 7) configuration​:
  Commit id​: 875a57f
  Platform​:
  osname=freebsd
  osvers=12.0-current
  archname=amd64-freebsd
  uname='freebsd nightshade-freebsd12 12.0-current freebsd 12.0-current #0 r305028​: mon aug 29 22​:45​:29 utc 2016 root@​releng3.nyi.freebsd.org​:usrobjusrsrcsysgeneric amd64 '
  config_args='-Dusedevel -des -DDEBUGGING -Dcc=clang39 -Doptimize=-O0 -g3 -Accflags=-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -Aldflags=-fsanitize=address'
  hint=recommended
  useposix=true
  d_sigaction=define
  useithreads=undef
  usemultiplicity=undef
  use64bitint=define
  use64bitall=define
  uselongdouble=undef
  usemymalloc=n
  bincompat5005=undef
  Compiler​:
  cc='clang39'
  ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_FORTIFY_SOURCE=2'
  optimize='-O0 -g3'
  cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
  ccversion=''
  gccversion='4.2.1 Compatible Clang 3.9.0 (tags/RELEASE_390/final)'
  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='clang39'
  ldflags ='-Wl,-E -fsanitize=address -fstack-protector-strong -L/usr/local/lib'
  libpth=/usr/lib /usr/local/lib /usr/local/llvm39/bin/../lib/clang/3.9.0/lib /usr/lib
  libs=-lpthread -lgdbm -lm -lcrypt -lutil -lc
  perllibs=-lpthread -lm -lcrypt -lutil -lc
  libc=
  so=so
  useshrplib=false
  libperl=libperl.a
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs
  dlext=so
  d_dlsymun=undef
  ccdlflags=' '
  cccdlflags='-DPIC -fPIC'
  lddlflags='-shared -L/usr/local/lib -fstack-protector-strong'

Characteristics of this binary (from libperl)​:
  Compile-time options​:
  DEBUGGING
  HAS_TIMES
  PERLIO_LAYERS
  PERL_COPY_ON_WRITE
  PERL_DONT_CREATE_GVSV
  PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
  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_PERLIO
  USE_PERL_ATOF
  Built under freebsd
  Compiled at Oct 24 2016 12​:14​:46
  @​INC​:
  lib
  /usr/local/lib/perl5/site_perl/5.25.7/amd64-freebsd
  /usr/local/lib/perl5/site_perl/5.25.7
  /usr/local/lib/perl5/5.25.7/amd64-freebsd
  /usr/local/lib/perl5/5.25.7
  .
[dcollins@​nightshade-freebsd12 /usr/home/dcollins/perl]$ ./perl -Ilib -T lib/locale.t
ok 1 Verify locales_enabled('ALL') returns 0 or 1
ok 2 and locales_enabled('LC_ALL') returns the same value
ok 3 Verify locales_enabled('COLLATE') returns 0 or 1
ok 4 and locales_enabled('LC_COLLATE') returns the same value
ok 5 Verify locales_enabled('CTYPE') returns 0 or 1
ok 6 and locales_enabled('LC_CTYPE') returns the same value
ok 7 Verify locales_enabled('MESSAGES') returns 0 or 1
ok 8 and locales_enabled('LC_MESSAGES') returns the same value
ok 9 Verify locales_enabled('MONETARY') returns 0 or 1
ok 10 and locales_enabled('LC_MONETARY') returns the same value
ok 11 Verify locales_enabled('NUMERIC') returns 0 or 1
ok 12 and locales_enabled('LC_NUMERIC') returns the same value
ok 13 Verify locales_enabled('TIME') returns 0 or 1
ok 14 and locales_enabled('LC_TIME') returns the same value
ok 15 verify that isn't tainted​: not tainted outside 'use locale'
ok 16 verify that isn't tainted​: $a
ok 17 verify that is tainted​: uc($a)
ok 18 verify that is tainted​: "\U$a"
ok 19 verify that is tainted​: ucfirst($a)
ok 20 verify that is tainted​: "\u$a"
ok 21 verify that is tainted​: lc($a)
ok 22 verify that is tainted​: fc($a)
ok 23 verify that is tainted​: "\L$a"
ok 24 verify that is tainted​: "\F$a"
ok 25 verify that is tainted​: lcfirst($a)
ok 26 verify that is tainted​: "\l$a"
ok 27 verify that isn't tainted​: sprintf('%e', 123.456)
ok 28 verify that isn't tainted​: sprintf('%f', 123.456)
ok 29 verify that isn't tainted​: sprintf('%g', 123.456)
ok 30 verify that isn't tainted​: sprintf('%d', 123.456)
ok 31 verify that isn't tainted​: sprintf('%x', 123.456)
ok 32 verify that is tainted​: $_ = uc($a)
ok 33 verify that is tainted​: $& from /(\w)/
ok 34 verify that is tainted​: $`
ok 35 verify that is tainted​: $'
ok 36 verify that is tainted​: $+
ok 37 verify that is tainted​: $1
ok 38 verify that isn't tainted​: $2
ok 39 verify that isn't tainted​: $& from /(.)/
ok 40 verify that isn't tainted​: $`
ok 41 verify that isn't tainted​: $'
ok 42 verify that isn't tainted​: $+
ok 43 verify that isn't tainted​: $1
ok 44 verify that isn't tainted​: $2
ok 45 verify that is tainted​: $& from /(\W)/
ok 46 verify that is tainted​: $`
ok 47 verify that is tainted​: $'
ok 48 verify that is tainted​: $+
ok 49 verify that is tainted​: $1
ok 50 verify that isn't tainted​: $2
ok 51 verify that isn't tainted​: $& from /(.)/
ok 52 verify that isn't tainted​: $`
ok 53 verify that isn't tainted​: $'
ok 54 verify that isn't tainted​: $+
ok 55 verify that isn't tainted​: $1
ok 56 verify that isn't tainted​: $2
ok 57 verify that is tainted​: $& from /(\s)/
ok 58 verify that is tainted​: $`
ok 59 verify that is tainted​: $'
ok 60 verify that is tainted​: $+
ok 61 verify that is tainted​: $1
ok 62 verify that isn't tainted​: $2
ok 63 verify that isn't tainted​: $& from /(.)/
ok 64 verify that is tainted​: $& from /(\S)/
ok 65 verify that is tainted​: $`
ok 66 verify that is tainted​: $'
ok 67 verify that is tainted​: $+
ok 68 verify that is tainted​: $1
ok 69 verify that isn't tainted​: $2
ok 70 verify that isn't tainted​: $& from /(.)/
ok 71 verify that is tainted​: $& from /(\d)/
ok 72 verify that is tainted​: $`
ok 73 verify that is tainted​: $'
ok 74 verify that is tainted​: $+
ok 75 verify that is tainted​: $1
ok 76 verify that isn't tainted​: $2
ok 77 verify that isn't tainted​: $& from /(.)/
ok 78 verify that is tainted​: $& from /(\D)/
ok 79 verify that is tainted​: $`
ok 80 verify that is tainted​: $'
ok 81 verify that is tainted​: $+
ok 82 verify that is tainted​: $1
ok 83 verify that isn't tainted​: $2
ok 84 verify that isn't tainted​: $& from /(.)/
ok 85 verify that is tainted​: $& from /([[​:alnum​:]])/
ok 86 verify that is tainted​: $`
ok 87 verify that is tainted​: $'
ok 88 verify that is tainted​: $+
ok 89 verify that is tainted​: $1
ok 90 verify that isn't tainted​: $2
ok 91 verify that isn't tainted​: $& from /(.)/
ok 92 verify that is tainted​: $& from /([[​:^alnum​:]])/
ok 93 verify that is tainted​: $`
ok 94 verify that is tainted​: $'
ok 95 verify that is tainted​: $+
ok 96 verify that is tainted​: $1
ok 97 verify that isn't tainted​: $2
ok 98 verify that is tainted​: $& from /(a)|(\w)/
ok 99 verify that is tainted​: $`
ok 100 verify that is tainted​: $'
ok 101 verify that is tainted​: $+
ok 102 verify that is tainted​: $1
ok 103 $1 is 'a'
ok 104 $2 is undefined
ok 105 verify that isn't tainted​: $2
ok 106 verify that isn't tainted​: $3
ok 107 verify that isn't tainted​: $& from /(.)/
ok 108 verify that isn't tainted​: $& from /(\N{CYRILLIC CAPITAL LETTER A})/i
ok 109 verify that isn't tainted​: $`
ok 110 verify that isn't tainted​: $'
ok 111 verify that isn't tainted​: $+
ok 112 verify that isn't tainted​: $1
ok 113 $1 is 'small cyrillic a'
ok 114 verify that isn't tainted​: $2
ok 115 verify that isn't tainted​: $& from /./
ok 116 verify that is tainted​: $& from /(\N{KELVIN SIGN})/i
ok 117 verify that is tainted​: $`
ok 118 verify that is tainted​: $'
ok 119 verify that is tainted​: $+
ok 120 verify that is tainted​: $1
ok 121 verify that isn't tainted​: $2
ok 122 verify that isn't tainted​: $& from /(.)/
ok 123 verify that is tainted​: $& from /(.)\b(.)/
ok 124 verify that is tainted​: $`
ok 125 verify that is tainted​: $'
ok 126 verify that is tainted​: $+
ok 127 verify that is tainted​: $1
ok 128 verify that is tainted​: $2
ok 129 verify that isn't tainted​: $3
ok 130 verify that isn't tainted​: $& from /./
ok 131 verify that is tainted​: $& from /(.)\B(.)/
ok 132 verify that is tainted​: $`
ok 133 verify that is tainted​: $'
ok 134 verify that is tainted​: $+
ok 135 verify that is tainted​: $1
ok 136 verify that is tainted​: $2
ok 137 verify that isn't tainted​: $3
ok 138 verify that isn't tainted​: $& from /./
ok 139 verify that isn't tainted​: $ & from /(.).(\1)/
ok 140 verify that isn't tainted​: $`
ok 141 verify that isn't tainted​: $'
ok 142 verify that isn't tainted​: $+
ok 143 verify that isn't tainted​: $1
ok 144 verify that isn't tainted​: $2
ok 145 verify that isn't tainted​: $3
ok 146 verify that isn't tainted​: $ & from /./
ok 147 verify that isn't tainted​: untainting $_ works
ok 148 verify that isn't tainted​: $ & from /(b)/
ok 149 verify that isn't tainted​: $`
ok 150 verify that isn't tainted​: $'
ok 151 verify that isn't tainted​: $+
ok 152 verify that isn't tainted​: $1
ok 153 verify that isn't tainted​: $2
ok 154 verify that isn't tainted​: untainting $_ works
ok 155 verify that is tainted​: $_ (wasn't tainted) from s/(.+)/$b/ where $b is tainted
ok 156 verify that isn't tainted​: $&
ok 157 verify that isn't tainted​: $`
ok 158 verify that isn't tainted​: $'
ok 159 verify that isn't tainted​: $+
ok 160 verify that isn't tainted​: $1
ok 161 verify that isn't tainted​: $2
ok 162 verify that isn't tainted​: $_ (wasn't tainted) from s/(.+)/b/
ok 163 verify that isn't tainted​: $&
ok 164 verify that isn't tainted​: $`
ok 165 verify that isn't tainted​: $'
ok 166 verify that isn't tainted​: $+
ok 167 verify that isn't tainted​: $1
ok 168 verify that isn't tainted​: $2
ok 169 verify that is tainted​: $b from ($b = $a) =~ s/\w/$&amp;/
ok 170 verify that isn't tainted​: $a from ($b = $a) =~ s/\w/$&amp;/
ok 171 verify that is tainted​: $_ (wasn't tainted) from s/(\w)/\l$1/,
ok 172 verify that is tainted​: $&
ok 173 verify that is tainted​: $`
ok 174 verify that is tainted​: $'
ok 175 verify that is tainted​: $+
ok 176 verify that is tainted​: $1
ok 177 verify that isn't tainted​: $2
ok 178 verify that is tainted​: $_ (wasn't tainted) from s/(\w)/\L$1/,
ok 179 verify that is tainted​: $&
ok 180 verify that is tainted​: $`
ok 181 verify that is tainted​: $'
ok 182 verify that is tainted​: $+
ok 183 verify that is tainted​: $1
ok 184 verify that isn't tainted​: $2
ok 185 verify that is tainted​: $_ (wasn't tainted) from s/(\w)/\u$1/
ok 186 verify that is tainted​: $&
ok 187 verify that is tainted​: $`
ok 188 verify that is tainted​: $'
ok 189 verify that is tainted​: $+
ok 190 verify that is tainted​: $1
ok 191 verify that isn't tainted​: $2
ok 192 verify that is tainted​: $_ (wasn't tainted) from s/(\w)/\U$1/
ok 193 verify that is tainted​: $&
ok 194 verify that is tainted​: $`
ok 195 verify that is tainted​: $'
ok 196 verify that is tainted​: $+
ok 197 verify that is tainted​: $1
ok 198 verify that isn't tainted​: $2
ok 199 verify that isn't tainted​: $a still not tainted
ok 200 verify that isn't tainted​: "a" =~ /([a-z])/
ok 201 verify that isn't tainted​: "foo.bar_baz" =~ /^(.*)[._](.*?)$/
ok 202 verify that isn't tainted​: $a
ok 203 verify that isn't tainted​: uc($a)
ok 204 verify that isn't tainted​: "\U$a"
ok 205 verify that isn't tainted​: ucfirst($a)
ok 206 verify that isn't tainted​: "\u$a"
ok 207 verify that isn't tainted​: lc($a)
ok 208 verify that isn't tainted​: fc($a)
ok 209 verify that isn't tainted​: "\L$a"
ok 210 verify that isn't tainted​: "\F$a"
ok 211 verify that isn't tainted​: lcfirst($a)
ok 212 verify that isn't tainted​: "\l$a"
ok 213 verify that isn't tainted​: sprintf('%e', 123.456)
ok 214 verify that isn't tainted​: sprintf('%f', 123.456)
ok 215 verify that isn't tainted​: sprintf('%g', 123.456)
ok 216 verify that isn't tainted​: sprintf('%d', 123.456)
ok 217 verify that isn't tainted​: sprintf('%x', 123.456)
ok 218 verify that isn't tainted​: $_ = uc($a)
ok 219 verify that isn't tainted​: $& from /(\w)/
ok 220 verify that isn't tainted​: $`
ok 221 verify that isn't tainted​: $'
ok 222 verify that isn't tainted​: $+
ok 223 verify that isn't tainted​: $1
ok 224 verify that isn't tainted​: $2
ok 225 verify that isn't tainted​: $& from /(.)/
ok 226 verify that isn't tainted​: $`
ok 227 verify that isn't tainted​: $'
ok 228 verify that isn't tainted​: $+
ok 229 verify that isn't tainted​: $1
ok 230 verify that isn't tainted​: $2
ok 231 verify that isn't tainted​: $& from /(\W)/
ok 232 verify that isn't tainted​: $`
ok 233 verify that isn't tainted​: $'
ok 234 verify that isn't tainted​: $+
ok 235 verify that isn't tainted​: $1
ok 236 verify that isn't tainted​: $2
ok 237 verify that isn't tainted​: $& from /(.)/
ok 238 verify that isn't tainted​: $`
ok 239 verify that isn't tainted​: $'
ok 240 verify that isn't tainted​: $+
ok 241 verify that isn't tainted​: $1
ok 242 verify that isn't tainted​: $2
ok 243 verify that isn't tainted​: $& from /(\s)/
ok 244 verify that isn't tainted​: $`
ok 245 verify that isn't tainted​: $'
ok 246 verify that isn't tainted​: $+
ok 247 verify that isn't tainted​: $1
ok 248 verify that isn't tainted​: $2
ok 249 verify that isn't tainted​: $& from /(.)/
ok 250 verify that isn't tainted​: $& from /(\S)/
ok 251 verify that isn't tainted​: $`
ok 252 verify that isn't tainted​: $'
ok 253 verify that isn't tainted​: $+
ok 254 verify that isn't tainted​: $1
ok 255 verify that isn't tainted​: $2
ok 256 verify that isn't tainted​: $& from /(.)/
ok 257 verify that isn't tainted​: $& from /(\d)/
ok 258 verify that isn't tainted​: $`
ok 259 verify that isn't tainted​: $'
ok 260 verify that isn't tainted​: $+
ok 261 verify that isn't tainted​: $1
ok 262 verify that isn't tainted​: $2
ok 263 verify that isn't tainted​: $& from /(.)/
ok 264 verify that isn't tainted​: $& from /(\D)/
ok 265 verify that isn't tainted​: $`
ok 266 verify that isn't tainted​: $'
ok 267 verify that isn't tainted​: $+
ok 268 verify that isn't tainted​: $1
ok 269 verify that isn't tainted​: $2
ok 270 verify that isn't tainted​: $& from /(.)/
ok 271 verify that isn't tainted​: $& from /([[​:alnum​:]])/
ok 272 verify that isn't tainted​: $`
ok 273 verify that isn't tainted​: $'
ok 274 verify that isn't tainted​: $+
ok 275 verify that isn't tainted​: $1
ok 276 verify that isn't tainted​: $2
ok 277 verify that isn't tainted​: $& from /(.)/
ok 278 verify that isn't tainted​: $& from /([[​:^alnum​:]])/
ok 279 verify that isn't tainted​: $`
ok 280 verify that isn't tainted​: $'
ok 281 verify that isn't tainted​: $+
ok 282 verify that isn't tainted​: $1
ok 283 verify that isn't tainted​: $2
ok 284 verify that isn't tainted​: $& from /(a)|(\w)/
ok 285 verify that isn't tainted​: $`
ok 286 verify that isn't tainted​: $'
ok 287 verify that isn't tainted​: $+
ok 288 verify that isn't tainted​: $1
ok 289 $1 is 'a'
ok 290 $2 is undefined
ok 291 verify that isn't tainted​: $2
ok 292 verify that isn't tainted​: $3
ok 293 verify that isn't tainted​: $& from /(.)/
ok 294 verify that isn't tainted​: $& from /(\N{CYRILLIC CAPITAL LETTER A})/i
ok 295 verify that isn't tainted​: $`
ok 296 verify that isn't tainted​: $'
ok 297 verify that isn't tainted​: $+
ok 298 verify that isn't tainted​: $1
ok 299 $1 is 'small cyrillic a'
ok 300 verify that isn't tainted​: $2
ok 301 verify that isn't tainted​: $& from /./
ok 302 verify that isn't tainted​: $& from /(\N{KELVIN SIGN})/i
ok 303 verify that isn't tainted​: $`
ok 304 verify that isn't tainted​: $'
ok 305 verify that isn't tainted​: $+
ok 306 verify that isn't tainted​: $1
ok 307 verify that isn't tainted​: $2
ok 308 verify that isn't tainted​: $& from /(.)/
ok 309 verify that isn't tainted​: $& from /(.)\b(.)/
ok 310 verify that isn't tainted​: $`
ok 311 verify that isn't tainted​: $'
ok 312 verify that isn't tainted​: $+
ok 313 verify that isn't tainted​: $1
ok 314 verify that isn't tainted​: $2
ok 315 verify that isn't tainted​: $3
ok 316 verify that isn't tainted​: $& from /./
ok 317 verify that isn't tainted​: $& from /(.)\B(.)/
ok 318 verify that isn't tainted​: $`
ok 319 verify that isn't tainted​: $'
ok 320 verify that isn't tainted​: $+
ok 321 verify that isn't tainted​: $1
ok 322 verify that isn't tainted​: $2
ok 323 verify that isn't tainted​: $3
ok 324 verify that isn't tainted​: $& from /./
ok 325 verify that isn't tainted​: $ & from /(.).(\1)/
ok 326 verify that isn't tainted​: $`
ok 327 verify that isn't tainted​: $'
ok 328 verify that isn't tainted​: $+
ok 329 verify that isn't tainted​: $1
ok 330 verify that isn't tainted​: $2
ok 331 verify that isn't tainted​: $3
ok 332 verify that isn't tainted​: $ & from /./
ok 333 verify that isn't tainted​: untainting $_ works
ok 334 verify that isn't tainted​: $ & from /(b)/
ok 335 verify that isn't tainted​: $`
ok 336 verify that isn't tainted​: $'
ok 337 verify that isn't tainted​: $+
ok 338 verify that isn't tainted​: $1
ok 339 verify that isn't tainted​: $2
ok 340 verify that isn't tainted​: untainting $_ works
ok 341 verify that isn't tainted​: $_ (wasn't tainted) from s/(.+)/b/
ok 342 verify that isn't tainted​: $&
ok 343 verify that isn't tainted​: $`
ok 344 verify that isn't tainted​: $'
ok 345 verify that isn't tainted​: $+
ok 346 verify that isn't tainted​: $1
ok 347 verify that isn't tainted​: $2
ok 348 verify that isn't tainted​: $b from ($b = $a) =~ s/\w/$&amp;/
ok 349 verify that isn't tainted​: $a from ($b = $a) =~ s/\w/$&amp;/
ok 350 verify that isn't tainted​: $_ (wasn't tainted) from s/(\w)/\l$1/,
ok 351 verify that isn't tainted​: $&
ok 352 verify that isn't tainted​: $`
ok 353 verify that isn't tainted​: $'
ok 354 verify that isn't tainted​: $+
ok 355 verify that isn't tainted​: $1
ok 356 verify that isn't tainted​: $2
ok 357 verify that isn't tainted​: $_ (wasn't tainted) from s/(\w)/\L$1/,
ok 358 verify that isn't tainted​: $&
ok 359 verify that isn't tainted​: $`
ok 360 verify that isn't tainted​: $'
ok 361 verify that isn't tainted​: $+
ok 362 verify that isn't tainted​: $1
ok 363 verify that isn't tainted​: $2
ok 364 verify that isn't tainted​: $_ (wasn't tainted) from s/(\w)/\u$1/
ok 365 verify that isn't tainted​: $&
ok 366 verify that isn't tainted​: $`
ok 367 verify that isn't tainted​: $'
ok 368 verify that isn't tainted​: $+
ok 369 verify that isn't tainted​: $1
ok 370 verify that isn't tainted​: $2
ok 371 verify that isn't tainted​: $_ (wasn't tainted) from s/(\w)/\U$1/
ok 372 verify that isn't tainted​: $&
ok 373 verify that isn't tainted​: $`
ok 374 verify that isn't tainted​: $'
ok 375 verify that isn't tainted​: $+
ok 376 verify that isn't tainted​: $1
ok 377 verify that isn't tainted​: $2
ok 378 verify that isn't tainted​: $a still not tainted
ok 379 verify that isn't tainted​: "a" =~ /([a-z])/
ok 380 verify that isn't tainted​: "foo.bar_baz" =~ /^(.*)[._](.*?)$/

==44464==ERROR​: AddressSanitizer​: global-buffer-overflow on address 0x0000014a523b at pc 0x00000048476c bp 0x7fffffffb820 sp 0x7fffffffafe0
READ of size 4 at 0x0000014a523b thread T0
  #0 0x48476b in memcpy /wrkdirs/usr/ports/devel/llvm39/work/compiler-rt-3.9.0.src/lib/asan/asan_interceptors.cc​:458​:3
  #1 0x8022c5912 (/lib/libc.so.7+0x146912)
  #2 0x8022c7882 (/lib/libc.so.7+0x148882)
  #3 0x802269c48 in mbstowcs_l (/lib/libc.so.7+0xeac48)
  #4 0x8021bbb5c in strxfrm_l (/lib/libc.so.7+0x3cb5c)
  #5 0x129013e in Perl__mem_collxfrm /usr/home/dcollins/perl/locale.c​:1967​:17
  #6 0x1288ca2 in Perl_new_collate /usr/home/dcollins/perl/locale.c​:803​:24
  #7 0x1284f19 in Perl_setlocale /usr/home/dcollins/perl/locale.c​:273​:13
  #8 0x805460698 in XS_POSIX_setlocale /usr/home/dcollins/perl/ext/POSIX/POSIX.xs​:2195​:11
  #9 0xc20fa3 in Perl_pp_entersub /usr/home/dcollins/perl/pp_hot.c​:3988​:2
  #10 0xa492f3 in Perl_runops_debug /usr/home/dcollins/perl/dump.c​:2246​:23
  #11 0x5fcbe6 in S_run_body /usr/home/dcollins/perl/perl.c​:2527​:2
  #12 0x5f97dd in perl_run /usr/home/dcollins/perl/perl.c​:2455​:2
  #13 0x4b8b70 in main /usr/home/dcollins/perl/perlmain.c​:123​:9
  #14 0x42cb7e in _start (/usr/home/dcollins/perl/perl+0x42cb7e)

0x0000014a523b is located 37 bytes to the left of global variable '<string literal>' defined in 'locale.c​:876​:21' (0x14a5260) of size 103
  '<string literal>' is ascii string '%s​:%d​: ?UTF-8 locale=%d; x_len_shorter=%zu, x_len_longer=%zu, collate multipler=%zu, collate base=%zu
'
0x0000014a523b is located 0 bytes to the right of global variable 'longer' defined in 'locale.c​:783​:24' (0x14a5220) of size 27
  'longer' is ascii string 'ABCDEFGHIJKLMnopqrstuvwxyz'
SUMMARY​: AddressSanitizer​: global-buffer-overflow /wrkdirs/usr/ports/devel/llvm39/work/compiler-rt-3.9.0.src/lib/asan/asan_interceptors.cc​:458​:3 in memcpy
Shadow bytes around the buggy address​:
  0x4000002949f0​: f9 f9 f9 f9 00 02 f9 f9 f9 f9 f9 f9 00 00 00 00
  0x400000294a00​: 06 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 04 f9
  0x400000294a10​: f9 f9 f9 f9 01 f9 f9 f9 f9 f9 f9 f9 00 00 00 00
  0x400000294a20​: 00 00 00 00 00 00 00 00 00 01 f9 f9 f9 f9 f9 f9
  0x400000294a30​: 00 00 00 00 00 02 f9 f9 f9 f9 f9 f9 00 00 00 06
=>0x400000294a40​: f9 f9 f9 f9 00 00 00[03]f9 f9 f9 f9 00 00 00 00
  0x400000294a50​: 00 00 00 00 00 00 00 00 07 f9 f9 f9 f9 f9 f9 f9
  0x400000294a60​: 00 00 06 f9 f9 f9 f9 f9 07 f9 f9 f9 f9 f9 f9 f9
  0x400000294a70​: 05 f9 f9 f9 f9 f9 f9 f9 00 05 f9 f9 f9 f9 f9 f9
  0x400000294a80​: 00 00 07 f9 f9 f9 f9 f9 00 00 03 f9 f9 f9 f9 f9
  0x400000294a90​: 00 00 00 00 00 00 07 f9 f9 f9 f9 f9 00 00 04 f9
Shadow byte legend (one shadow byte represents 8 application bytes)​:
  Addressable​: 00
  Partially addressable​: 01 02 03 04 05 06 07
  Heap left redzone​: fa
  Heap right redzone​: fb
  Freed heap region​: fd
  Stack left redzone​: f1
  Stack mid redzone​: f2
  Stack right redzone​: f3
  Stack partial redzone​: f4
  Stack after return​: f5
  Stack use after scope​: f8
  Global redzone​: f9
  Global init order​: f6
  Poisoned by user​: f7
  Container overflow​: fc
  Array cookie​: ac
  Intra object redzone​: bb
  ASan internal​: fe
  Left alloca redzone​: ca
  Right alloca redzone​: cb
==44464==ABORTING

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2016

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2016

From [Unknown Contact. See original ticket]

Attached are the results of running this test against smoke-me/khw-locale under ASAN, first using a "normal" config, and then disabling HAS_STRXFRM in config.h and building again.

Also attached is a diff of some instrumentation that I added to see when strxfrm() is being called, and the results of that. It is the first call with locale zh_CN.GB18030, but otherwise is unremarkable.

--
Respectfully,
Dan Collins

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2016

From @dcollinsn

And the attached is a successful attempt to reproduce the failure in pure C code. If someone can confirm that the attached code should /not/ be crashing, we can submit the bug report to upstream.

Note that the attached does not actually segfault - but ASAN sees the bug anyway. I'm not sure if this is the access that is actually segfaulting - I'd have to rebuild perl without ASAN to find out - but I bet it's related. The segfault was originally with the locale 'ja_JP.eucJP', which I think is being skipped now?

--
Respectfully,
Dan Collins

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2016

From @dcollinsn

[dcollins@​nightshade-freebsd12 /usr/home/dcollins/perl]$ cat localetest.c
#include <locale.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

int main() {
  char* locale;
  char* buffer;

  buffer = (char*) malloc(1024*sizeof(char));
  printf("Allocated a buffer at %p\n", buffer);

  strxfrm(buffer, "ABCDEFGHIJLKMnopqrstuvwxyz", 255);
  printf("Returned from strxfrm\n");

  locale = setlocale(LC_ALL, "zh_CN.GB18030");
  printf("Called setlocale, returned %s\n", locale);

  strxfrm(buffer, "ABCDEFGHIJLKMnopqrstuvwxyz", 255);
  printf("Returned from strxfrm\n");
}
[dcollins@​nightshade-freebsd12 /usr/home/dcollins/perl]$ clang39 -fsanitize=address -I/usr/local/include localetest.c -o localetest.out
[dcollins@​nightshade-freebsd12 /usr/home/dcollins/perl]$ ./localetest.out
Allocated a buffer at 0x61900000fa80
Returned from strxfrm
Called setlocale, returned zh_CN.GB18030

==94700==ERROR​: AddressSanitizer​: global-buffer-overflow on address 0x0000004a821b at pc 0x0000004647ac bp 0x7fffffffe910 sp 0x7fffffffe0d0
READ of size 4 at 0x0000004a821b thread T0
  #0 0x4647ab in memcpy /wrkdirs/usr/ports/devel/llvm39/work/compiler-rt-3.9.0.src/lib/asan/asan_interceptors.cc​:458​:3
  #1 0x801285912 (/lib/libc.so.7+0x146912)
  #2 0x801287882 (/lib/libc.so.7+0x148882)
  #3 0x801229c48 in mbstowcs_l (/lib/libc.so.7+0xeac48)
  #4 0x80117bb5c in strxfrm_l (/lib/libc.so.7+0x3cb5c)
  #5 0x498818 in main (/usr/home/dcollins/perl/localetest.out+0x498818)
  #6 0x40cbbe in _start (/usr/home/dcollins/perl/localetest.out+0x40cbbe)

0x0000004a821b is located 37 bytes to the left of global variable '<string literal>' defined in 'localetest.c​:14​:9' (0x4a8240) of size 23
  '<string literal>' is ascii string 'Returned from strxfrm
'
0x0000004a821b is located 0 bytes to the right of global variable '<string literal>' defined in 'localetest.c​:13​:18' (0x4a8200) of size 27
  '<string literal>' is ascii string 'ABCDEFGHIJLKMnopqrstuvwxyz'
SUMMARY​: AddressSanitizer​: global-buffer-overflow /wrkdirs/usr/ports/devel/llvm39/work/compiler-rt-3.9.0.src/lib/asan/asan_interceptors.cc​:458​:3 in memcpy
Shadow bytes around the buggy address​:
  0x400000094ff0​: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x400000095000​: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x400000095010​: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x400000095020​: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x400000095030​: 00 00 00 00 00 00 00 00 00 00 00 02 f9 f9 f9 f9
=>0x400000095040​: 00 00 00[03]f9 f9 f9 f9 00 00 07 f9 f9 f9 f9 f9
  0x400000095050​: 00 06 f9 f9 f9 f9 f9 f9 00 00 00 07 f9 f9 f9 f9
  0x400000095060​: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x400000095070​: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x400000095080​: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x400000095090​: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes)​:
  Addressable​: 00
  Partially addressable​: 01 02 03 04 05 06 07
  Heap left redzone​: fa
  Heap right redzone​: fb
  Freed heap region​: fd
  Stack left redzone​: f1
  Stack mid redzone​: f2
  Stack right redzone​: f3
  Stack partial redzone​: f4
  Stack after return​: f5
  Stack use after scope​: f8
  Global redzone​: f9
  Global init order​: f6
  Poisoned by user​: f7
  Container overflow​: fc
  Array cookie​: ac
  Intra object redzone​: bb
  ASan internal​: fe
  Left alloca redzone​: ca
  Right alloca redzone​: cb
==94700==ABORTING

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2016

From [Unknown Contact. See original ticket]

And the attached is a successful attempt to reproduce the failure in pure C code. If someone can confirm that the attached code should /not/ be crashing, we can submit the bug report to upstream.

Note that the attached does not actually segfault - but ASAN sees the bug anyway. I'm not sure if this is the access that is actually segfaulting - I'd have to rebuild perl without ASAN to find out - but I bet it's related. The segfault was originally with the locale 'ja_JP.eucJP', which I think is being skipped now?

--
Respectfully,
Dan Collins

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2016

@jkeenan - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Oct 25, 2016

From @khwilliamson

On 10/24/2016 01​:37 PM, Dan Collins via RT wrote​:

And the attached is a successful attempt to reproduce the failure in pure C code. If someone can confirm that the attached code should /not/ be crashing, we can submit the bug report to upstream.

Note that the attached does not actually segfault - but ASAN sees the bug anyway. I'm not sure if this is the access that is actually segfaulting - I'd have to rebuild perl without ASAN to find out - but I bet it's related. The segfault was originally with the locale 'ja_JP.eucJP', which I think is being skipped now?

My reading of Wikipedia on locale zh_CN.GB18030 is that it should not
crash. That locale is listed there as a superset of ASCII, and the
calls here to it are only ASCII, so it should not crash.

It also turns out that the strlcpy() on these systems is broken. This
is ironic, because I changed to use strlcpy as a result of our tests
warning that strcpy is unsafe.

I'll go into some background. lib/locale.t is dual-purposed. It checks
that the perl interpreter is working ok, but it also tests for problems
in the locales on the system. If it fails, it may not be a Perl
problem. That appears to be the case here.

Perl only supports single byte locales, except for UTF-8 ones. It is
never going to support other multi-byte ones. That would require way
too much special code, using wide character libc calls, for example.
But it was easy to support UTF-8 locales--just ignore the locale and use
the Unicode UTF-8 handling already built in. (It's not actually quite
that easy for collation.) And those multi-byte locales are on the way
out, replaced by Unicode.

The locales that are crashing on freebsd are multi-byte ones, which are
incompatible with Perl anyway, and a warning is raised if one is
actually used. Therefore, we shouldn't be testing them in locale.t.
They just aren't going to work right. They shouldn't be crashing, and
that is a bug in the libc. Some of them have state, which perl knows
nothing about. In effect, perl is acting like a fuzzer for these, just
like Brian and Dan are for perl, finding things that show invalid
assumptions in libc. My smoke-me branch avoids using most multi-byte
locales, and I have patches that Dan has tried that avoid all of them.

locale.t runs a bunch of taint tests. Then there is a pause if you're
watching it run. This is for it to run through all the locales on the
machine and see if they are suitable for testing. This requires
searching the machine, and briefly switching into each locale found.
dromedary is approaching 1000 locales, so this can take a while. After
this is done, the found locales are more individually tested, though
most output is done via summaries, after all are complete, so it may
look like the pause is continuing.

So, where are we?

strlcpy is broken. Our Configure could test for that. I have no
opinion if it's worth it. A hints file change could get around this, as
perl has it's own implementation when the libc one is absent.

strxfrm is broken at least on some multi-byte locales. There is no
substitute perl implementation, and it is needed for locale collation.
Turning that off in hints turns off such collation for all locales,
which we don't want to do. My changes to locale.t will cause these
multi-byte locales to be skipped. If someone tries to actually use such
a locale, they will get a warning and/or a segfault, depending on the
details of how they are using it. The documentation already says to not
use such locales.

There are still some collation issues in UTF-8 locales on these systems,
which I have to look at still.

@p5pRT
Copy link
Author

p5pRT commented Oct 26, 2016

From @jkeenan

On Mon Oct 24 05​:16​:14 2016, jkeen@​verizon.net wrote​:

This is a bug report for perl from jkeenan@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.24.0.

lib/locale.t​: Test failures and segfaulting on FreeBSD-11 and -12

Status of lib/locale.t on FreeBSD-11 Oct 26 2016

Branch​: smoke-me/khw-locale

Commit​: 79dfed8

lib/locale.t no longer crashes. When run individually via​:

  cd t; ./perl harness -v ../lib/locale.t; cd -

... the first time there was a visible pause of multiple seconds after test 380. There was another, shorter, visible pause after test 389. But the test resumes and completes with 4 failures in tests 426 through 429.

In a 'script' session, I then reconfigured and rebuilt for debugging​:

  sh ./Configure -des -Dusedevel -Duseithreads -DDEBUGGING

I re-ran the test​:

  PERL_DEBUG_FULL_TEST=2 ./perl -Ilib -DLv -T lib/locale.t 2>&1

This time I did not see visible pauses. As before, the test completed without crashing. Typescript is large; available on request; will be sent to Karl and Dan directly.

I then manually ran the file from the command-line with both​:

  cd t; ./perl harness -v ../lib/locale.t; cd - # 4.88 real 4.76 user 0.11 sys

  ./perl -Ilib -T lib/locale.t # 4.82 real 4.74 user 0.07 sys

Running with 'harness', I observed a visible pause at test 389, though shorter than previously. I did not observe a pause at test 389.

I then got curious and grepped the typescript for locale.c. On the basis of the debugging output I saw there, I went into hints/freebsd.sh and added​:

  d_strlcpy='undef'

I reconfigured and rebuilt and reran the test. However, I got all the same debugging warnings.

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Oct 26, 2016

From @khwilliamson

On Wed Oct 26 04​:27​:27 2016, jkeenan wrote​:

On Mon Oct 24 05​:16​:14 2016, jkeen@​verizon.net wrote​:

This is a bug report for perl from jkeenan@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.24.0.

lib/locale.t​: Test failures and segfaulting on FreeBSD-11 and -12

Status of lib/locale.t on FreeBSD-11 Oct 26 2016

Branch​: smoke-me/khw-locale

Commit​: 79dfed8

lib/locale.t no longer crashes. When run individually via​:

cd t; ./perl harness -v ../lib/locale.t; cd -

... the first time there was a visible pause of multiple seconds after
test 380. There was another, shorter, visible pause after test 389.
But the test resumes and completes with 4 failures in tests 426
through 429.

In a 'script' session, I then reconfigured and rebuilt for debugging​:

sh ./Configure -des -Dusedevel -Duseithreads -DDEBUGGING

I re-ran the test​:

PERL_DEBUG_FULL_TEST=2 ./perl -Ilib -DLv -T lib/locale.t 2>&1

This time I did not see visible pauses. As before, the test completed
without crashing. Typescript is large; available on request; will be
sent to Karl and Dan directly.

I then manually ran the file from the command-line with both​:

cd t; ./perl harness -v ../lib/locale.t; cd - # 4.88 real 4.76 user
0.11 sys

./perl -Ilib -T lib/locale.t # 4.82 real 4.74 user
0.07 sys

Running with 'harness', I observed a visible pause at test 389, though
shorter than previously. I did not observe a pause at test 389.

I then got curious and grepped the typescript for locale.c. On the
basis of the debugging output I saw there, I went into
hints/freebsd.sh and added​:

d_strlcpy='undef'

I reconfigured and rebuilt and reran the test. However, I got all the
same debugging warnings.

Thank you very much.

I have pushed to blead fixes that prevent the segfaults, particularly 0d94136. The segfaults are a bug in these OS versions. What the commits do is to not test locales that can be determined to be incompatible with Perl. Otherwise, every locale on the machine is tested. Someone may try to switch into one of these locales in a Perl program, and they could get segfaults. One solution would be for perl to refuse to switch to a locale it can determine is incompatible, but I'd rather not do that because some cases are complicated to handle, and this is clearly an OS bug that we haven't found elsewhere, and the docs say that these locales are problematic. The bug should be reported upstream to the vendor. Dan already may have done that.

The remaining failures in the test are from the same underlying function that segfaults. We can report these upstream as well.

I now have access to a failing system, and the strlcpy() problem is no longer manifesting. I don't understand why, and would rather not spend the tuits to figure it out. I think we should drop that from consideration unless it shows up again.

As I explained in an earlier post, the pause after test 380 is while the test file is scanning the system to find and do sanity validation on all the locales on it. The second pause is because it tests each sane locale for problems, but doesn't print anything until it has created a consolidated report.
--
Karl Williamson

@p5pRT
Copy link
Author

p5pRT commented Oct 26, 2016

From @jkeenan

On Wed Oct 26 12​:00​:09 2016, khw wrote​:

On Wed Oct 26 04​:27​:27 2016, jkeenan wrote​:

On Mon Oct 24 05​:16​:14 2016, jkeen@​verizon.net wrote​:

This is a bug report for perl from jkeenan@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.24.0.

lib/locale.t​: Test failures and segfaulting on FreeBSD-11 and -12

Status of lib/locale.t on FreeBSD-11 Oct 26 2016

Branch​: smoke-me/khw-locale

Commit​: 79dfed8

lib/locale.t no longer crashes. When run individually via​:

cd t; ./perl harness -v ../lib/locale.t; cd -

... the first time there was a visible pause of multiple seconds
after
test 380. There was another, shorter, visible pause after test 389.
But the test resumes and completes with 4 failures in tests 426
through 429.

In a 'script' session, I then reconfigured and rebuilt for debugging​:

sh ./Configure -des -Dusedevel -Duseithreads -DDEBUGGING

I re-ran the test​:

PERL_DEBUG_FULL_TEST=2 ./perl -Ilib -DLv -T lib/locale.t 2>&1

This time I did not see visible pauses. As before, the test
completed
without crashing. Typescript is large; available on request; will be
sent to Karl and Dan directly.

I then manually ran the file from the command-line with both​:

cd t; ./perl harness -v ../lib/locale.t; cd - # 4.88 real 4.76
user
0.11 sys

./perl -Ilib -T lib/locale.t # 4.82 real 4.74
user
0.07 sys

Running with 'harness', I observed a visible pause at test 389,
though
shorter than previously. I did not observe a pause at test 389.

I then got curious and grepped the typescript for locale.c. On the
basis of the debugging output I saw there, I went into
hints/freebsd.sh and added​:

d_strlcpy='undef'

I reconfigured and rebuilt and reran the test. However, I got all
the
same debugging warnings.

Thank you very much.

I have pushed to blead fixes that prevent the segfaults, particularly
0d94136. The segfaults are a bug in
these OS versions. What the commits do is to not test locales that
can be determined to be incompatible with Perl. Otherwise, every
locale on the machine is tested. Someone may try to switch into one
of these locales in a Perl program, and they could get segfaults. One
solution would be for perl to refuse to switch to a locale it can
determine is incompatible, but I'd rather not do that because some
cases are complicated to handle, and this is clearly an OS bug that we
haven't found elsewhere, and the docs say that these locales are
problematic. The bug should be reported upstream to the vendor. Dan
already may have done that.

The remaining failures in the test are from the same underlying
function that segfaults. We can report these upstream as well.

I now have access to a failing system, and the strlcpy() problem is no
longer manifesting. I don't understand why, and would rather not
spend the tuits to figure it out. I think we should drop that from
consideration unless it shows up again.

As I explained in an earlier post, the pause after test 380 is while
the test file is scanning the system to find and do sanity validation
on all the locales on it. The second pause is because it tests each
sane locale for problems, but doesn't print anything until it has
created a consolidated report.

Karl, thanks for all the time you've been putting in on this.

The good news is that blead is now completing all its tests on FreeBSD-11.0 without segfaulting. There are failures in lib/locale.t, as you anticipated. I am generating smoke-tests now which should be available at perl5.test-smoke.org in a couple of hours.

The bad news is that we have regressions (or, at least, test failures) in lib/locale.t on FreeBSD-10.3. I have run that program in debugging mode and, since the output is large, will email you and Dan that output.

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Oct 27, 2016

From @jkeenan

On Wed Oct 26 13​:46​:24 2016, jkeenan wrote​:

On Wed Oct 26 12​:00​:09 2016, khw wrote​:

On Wed Oct 26 04​:27​:27 2016, jkeenan wrote​:

Karl, thanks for all the time you've been putting in on this.

The good news is that blead is now completing all its tests on
FreeBSD-11.0 without segfaulting. There are failures in lib/locale.t,
as you anticipated. I am generating smoke-tests now which should be
available at perl5.test-smoke.org in a couple of hours.

http​://perl5.test-smoke.org/report/50912

The bad news is that we have regressions (or, at least, test failures)
in lib/locale.t on FreeBSD-10.3. I have run that program in debugging
mode and, since the output is large, will email you and Dan that
output.

http​://perl5.test-smoke.org/report/50927

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Oct 27, 2016

From @jkeenan

On Wed Oct 26 18​:23​:46 2016, jkeenan wrote​:

On Wed Oct 26 13​:46​:24 2016, jkeenan wrote​:

On Wed Oct 26 12​:00​:09 2016, khw wrote​:

On Wed Oct 26 04​:27​:27 2016, jkeenan wrote​:

Karl, thanks for all the time you've been putting in on this.

The good news is that blead is now completing all its tests on
FreeBSD-11.0 without segfaulting. There are failures in lib/locale.t,
as you anticipated. I am generating smoke-tests now which should be
available at perl5.test-smoke.org in a couple of hours.

http​://perl5.test-smoke.org/report/50912

The bad news is that we have regressions (or, at least, test failures)
in lib/locale.t on FreeBSD-10.3. I have run that program in debugging
mode and, since the output is large, will email you and Dan that
output.

http​://perl5.test-smoke.org/report/50927

Thank you very much.

It appears that we are now getting similar failures in lib/locale.t on OpenBSD - 6.0. See​:

http​://perl5.test-smoke.org/report/50945

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Oct 29, 2016

From @jhi

I am also getting a failure from locale.t in my private OpenBSD build. My NetBSD is a bit hosed at the moment, but I am guessing if I could get a build going, it would fail similarly.

Furthermore, also both my Solaris builds (sparc and x86) fail on that test.

Here's an idea​: given that the locale.t does a task that is somewhat different than any other test in our test suite, that is, extensively test a system-provided database for validity -- should Perl really be doing that? Is it our job? Perl's responsibility?

I do understand the original intent (I was the one who started cross-testing whether the system locales work with Perl, especially when we started doing UTF-8), but I am starting to think that this is not our problem. Yes, Perl may work wrong, or even crash, sometimes not even in Perl. But again, is this our problem? It is nice to be able to find these problems, and possibly report that upstream, but... as Karl points out, especially problematic are non-UTF8-locales, since they may require using system interfaces Perl doesn't know about and never will want to.

Maybe the locale.t should be converted into a stand-alone utility that people may run to test their locales, after the fact. This would make more sense also because people may install (or upgrade, or uninstall) locales outside of their Perl build.

@p5pRT
Copy link
Author

p5pRT commented Nov 20, 2016

From andrew@cpan.org

The locale.t tests fail on OpenBSD because there is currently no support for LC_COLLATE.

http​://marc.info/?l=openbsd-misc&m=144698615023532&w=2

http​://man.openbsd.org/setlocale

Somewhat related, OpenBSD now has /usr/bin/locale, although that just means the logic here doesn't get used.

https://perl5.git.perl.org/perl.git/blob/HEAD:/t/loc_tools.pl#l325

@p5pRT
Copy link
Author

p5pRT commented Nov 27, 2016

From @khwilliamson

On Sun, 20 Nov 2016 14​:34​:15 -0800, andrew@​cpan.org wrote​:

The locale.t tests fail on OpenBSD because there is currently no
support for LC_COLLATE.

http​://marc.info/?l=openbsd-misc&m=144698615023532&w=2

http​://man.openbsd.org/setlocale

It would be helpful if you, or anyone who has access to an OpenBSD could run the following test on a DEBUGGING build​:

cd t
PERL_DEBUG_FULL_OPTS=2 ./perl -T -I../lib -DLv ../lib/locale.t

and capture the output and send it to me.

Somewhat related, OpenBSD now has /usr/bin/locale, although that just
means the logic here doesn't get used.

https://perl5.git.perl.org/perl.git/blob/HEAD:/t/loc_tools.pl#l325

Right, so it isn't something that needs to be changed. The current code DTRT for old and new OPENBSD

--
Karl Williamson

@p5pRT
Copy link
Author

p5pRT commented Nov 27, 2016

From @khwilliamson

On 11/27/2016 08​:18 AM, Karl Williamson via RT wrote​:

On Sun, 20 Nov 2016 14​:34​:15 -0800, andrew@​cpan.org wrote​:

The locale.t tests fail on OpenBSD because there is currently no
support for LC_COLLATE.

http​://marc.info/?l=openbsd-misc&m=144698615023532&w=2

http​://man.openbsd.org/setlocale

It would be helpful if you, or anyone who has access to an OpenBSD could run the following test on a DEBUGGING build​:

cd t
PERL_DEBUG_FULL_OPTS=2 ./perl -T -I../lib -DLv ../lib/locale.t

and capture the output and send it to me.

But do it on the branch smoke-me/khw-locale, which has a fix in it.
https://perl5.git.perl.org/perl.git/shortlog/refs/heads/smoke-me/khw-locale

Somewhat related, OpenBSD now has /usr/bin/locale, although that just
means the logic here doesn't get used.

https://perl5.git.perl.org/perl.git/blob/HEAD:/t/loc_tools.pl#l325

Right, so it isn't something that needs to be changed. The current code DTRT for old and new OPENBSD

@p5pRT
Copy link
Author

p5pRT commented Nov 27, 2016

@p5pRT
Copy link
Author

p5pRT commented Dec 1, 2016

From @jkeenan

On Thu, 27 Oct 2016 01​:23​:46 GMT, jkeenan wrote​:

On Wed Oct 26 13​:46​:24 2016, jkeenan wrote​:

On Wed Oct 26 12​:00​:09 2016, khw wrote​:

On Wed Oct 26 04​:27​:27 2016, jkeenan wrote​:

Karl, thanks for all the time you've been putting in on this.

The good news is that blead is now completing all its tests on
FreeBSD-11.0 without segfaulting. There are failures in lib/locale.t,
as you anticipated. I am generating smoke-tests now which should be
available at perl5.test-smoke.org in a couple of hours.

http​://perl5.test-smoke.org/report/50912

The bad news is that we have regressions (or, at least, test failures)
in lib/locale.t on FreeBSD-10.3. I have run that program in debugging
mode and, since the output is large, will email you and Dan that
output.

http​://perl5.test-smoke.org/report/50927

Thank you very much.

Successful smoke test reports​:

freebsd 10.3-RELEASE​: http​://perl5.test-smoke.org/report/52031
freebsd 11.0-RELEASE-p1​: http​://perl5.test-smoke.org/report/52048

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Dec 2, 2016

From @khwilliamson

On Sat, 29 Oct 2016 10​:39​:41 -0700, jhi wrote​:

I am also getting a failure from locale.t in my private OpenBSD build.
My NetBSD is a bit hosed at the moment, but I am guessing if I could
get a build going, it would fail similarly.

Furthermore, also both my Solaris builds (sparc and x86) fail on that
test.

Here's an idea​: given that the locale.t does a task that is somewhat
different than any other test in our test suite, that is, extensively
test a system-provided database for validity -- should Perl really be
doing that? Is it our job? Perl's responsibility?

I do understand the original intent (I was the one who started cross-
testing whether the system locales work with Perl, especially when we
started doing UTF-8), but I am starting to think that this is not our
problem. Yes, Perl may work wrong, or even crash, sometimes not even
in Perl. But again, is this our problem? It is nice to be able to
find these problems, and possibly report that upstream, but... as
Karl points out, especially problematic are non-UTF8-locales, since
they may require using system interfaces Perl doesn't know about and
never will want to.

Maybe the locale.t should be converted into a stand-alone utility that
people may run to test their locales, after the fact. This would make
more sense also because people may install (or upgrade, or uninstall)
locales outside of their Perl build.

I'm not ready to throw in the towel on this yet. It turns out that, contrary to my expectations, there was an additional bug in perl that showed up only on UTF-8 locales on ASCII platforms where a control above the ASCII range collated earlier than all ASCII-range locales. This was happening on *BSD platforms, but not Linux or most others. So these oddball locale definitions serve a useful purpose in finding edge-case bugs.

perllocale has instructions for using lib/locale.t stand-alone to discover problems with locales.

Debugging this also showed me a defect in a Hindi ISCII locale on FREEBSD, which was reported to the vendor, and I'm told is being fixed.

--
Karl Williamson

@p5pRT
Copy link
Author

p5pRT commented Dec 2, 2016

From @khwilliamson

I'm resolving this ticket, as commit afc4976 appears to have fixed all issues mentioned in it. This was a bug introduced in the 5.25 series, so I'm resolving the ticket rather than marking it as pending release. The changes that added this bug did fix long-standing issues with collating embedded NULs, so that is still pending release of 5.26
--
Karl Williamson

@p5pRT
Copy link
Author

p5pRT commented Dec 2, 2016

@khwilliamson - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant