Skip Menu |

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 49462
Status: resolved
Priority: 0/
Queue: Encode

People
Owner: Nobody in particular
Requestors: tom.lpsd [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: 'find_encoding("utf8")->decode(undef)' causes segmentation fault
The below code causes segmentation fault in my environment. perl -MEncode=find_encoding -e "find_encoding('utf8')->encode(undef)" Is this a bug ? Distribution name: Encode-2.35 Perl Version: v5.10.1 (*) built for darwin-thread-multi-2level OS: Darwin local.local 10.0.0 Darwin Kernel Version 10.0.0: Fri Jul 31 22:47:34 PDT 2009; root:xnu-1456.1.25~1/RELEASE_I386 i386
On Sun Sep 06 04:21:45 2009, https://id.mixi.jp/tom wrote: Show quoted text
> The below code causes segmentation fault in my environment. > > perl -MEncode=find_encoding -e "find_encoding('utf8')->encode(undef)" > > Is this a bug ?
Yes it is :( Fortunately that happens when and only when undef is explicitly fed to (de|en)code. $a = undef; ->decode($a) works as expected. so does ->decode(''); Fixed in 2.36. If you can't wait, check CodeRepos/github. Dan the Encode Maintainer Show quoted text
> > Distribution name: Encode-2.35 > Perl Version: v5.10.1 (*) built for darwin-thread-multi-2level > OS: Darwin local.local 10.0.0 Darwin Kernel Version 10.0.0: Fri Jul 31 > 22:47:34 PDT 2009; > root:xnu-1456.1.25~1/RELEASE_I386 i386