Dave Howorth has asked for the wisdom of the Perl Monks concerning the following question:
Om mani padme hum ...
I'm debugging a program and am seeing this message:
panic: malloc at /usr/lib/perl5/5.8.6/Carp/Heavy.pm line 61. Debugged program terminated.
The code at line 61 of Carp::Heavy is:
$arg =~ s/([[:cntrl:]]|[[:^ascii:]])/sprintf("\\x{%x}",ord($1))/eg;
and it is preceded by a comment:
# The following handling of "control chars" is direct from # the original code - I think it is broken on Unicode though. # Suggestions?
The whole module of course starts with the legendary words:
heavy machinery, no user serviceable parts inside
I've searched around a bit without finding anything about my problem. Neither my code nor data does anything with Unicode; it's all ASCII AFAIK. I'm running perl v5.8.6. Can anybody suggest an approach to this problem?
Thanks, Dave
PS I see that the latest version of Carp::Heavy on CPAN has slightly different code that mentions utf8, but it still has the same comment!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Carp::Heavy panic: malloc Unicode?
by Steve_p (Priest) on Feb 07, 2007 at 20:25 UTC | |
by graff (Chancellor) on Feb 08, 2007 at 06:21 UTC | |
|
Re: Carp::Heavy panic: malloc Unicode?
by shmem (Chancellor) on Feb 07, 2007 at 16:29 UTC | |
|
Re: Carp::Heavy panic: malloc Unicode?
by jmcnamara (Monsignor) on Feb 07, 2007 at 13:08 UTC |