https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6983

--- Comment #2 from Mark Martinec <[email protected]> ---
A perl Unicode case-folding bug, present in at least perl-5.8.[678],
fixed in perl-5.8.9, where the utf8_heavy.pl has been substantially
rewritten.

A Carp traceback from the point where the problem occurs:

at perl-5.8.6/lib/5.8.6/utf8_heavy.pl line 124
        utf8::SWASHNEW('utf8', 'ToFold', 'undef', 4, 0) called at
t/dnsbl_subtests.t line 213
        main::reply_handler('130.11.211.140.sa2-dbl-test.spamassassin.org',
'IN', 'A', 127.0.0.1, 'Net::DNS::Packet=HASH(0x8033da890)', 'HAS
(0x8033dadf0)') c
alled at perl-5.8.6/lib/site_perl/5.8.6/amd64-freebsd/Net/DNS/Nameserver.pm
line 228
       
Net::DNS::Nameserver::make_reply('Net::DNS::Nameserver=HASH(0x8022e4430)',
'Net::DNS::Packet=HASH(0x8033da890)', 127.0.0.1, 'HASH(0x8033dadf0)') calle
d at perl-5.8.6/lib/site_perl/5.8.6/amd64-freebsd/Net/DNS/Nameserver.pm line
412
       
Net::DNS::Nameserver::udp_connection('Net::DNS::Nameserver=HASH(0x8022e4430)',
'IO::Socket::INET6=GLOB(0x805416440)') called at
perl-5.8.6/lib/site_perl/5.8.6/amd64-freebsd/Net/DNS/Nameserver.pm line 477
       
Net::DNS::Nameserver::loop_once('Net::DNS::Nameserver=HASH(0x8022e4430)', 10)
called at perl-5.8.6/lib/site_perl/5.8.6
/amd64-freebsd/Net/DNS/Nameserver.pm line 554
       
Net::DNS::Nameserver::main_loop('Net::DNS::Nameserver=HASH(0x8022e4430)')
called at t/dnsbl_subtests.t line 233
        main::dns_server(127.0.0.1, 29598) called at t/dnsbl_subtests.t line
324

The "problem" is that the "ToFold" doesn't have an alias, so
the utf8_heavy.pl barfs at line 124:

  if (my $base = ($utf8::Canonical{$canonical} ||
      $utf8::Canonical{ lc $utf8::PropertyAlias{$canonical} })) {

See also casefold() in Unicode::UCD man page.


perl589delta: 
  Improved internal UTF-8 caching code
  The code that caches calculated UTF-8 byte offsets for character
  offsets for a string has been re-written. Several bugs have been
  located and eliminated, and the code now makes better use of the
  information it has, so should be faster. [...]
[...]
o The Unicode swatch cache inside the regexp engine is now used. (the
  lookup had a key mismatch, present since the initial
  implementation). [RT #42839]


A workaround for this innocent bug is to avoid case-insensitive
matching (m//i) where this occurs in t/dnsbl_subtests.t:


trunk:
  Bug 6983: Uninitialized value in lc in t/dnsbl_subtests.t
  a perl bug, fixed in 5.8.9
Sending t/dnsbl_subtests.t
Committed revision 1537189.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to