20141111 perl bug causes segfaults with xmltwig - plembo/onemoretech GitHub Wiki

title: Perl bug causes segfaults with XML::Twig link: https://onemoretech.wordpress.com/2014/11/11/perl-bug-causes-segfaults-with-xmltwig/ author: phil2nc description: post_id: 8818 created: 2014/11/11 16:45:12 created_gmt: 2014/11/11 21:45:12 comment_status: closed post_name: perl-bug-causes-segfaults-with-xmltwig status: publish post_type: post

Perl bug causes segfaults with XML::Twig

I've been using XML::Twig to parse some massive amounts of XML text for a project at work. My script worked just fine on my Fedora 20 workstation, but threw a segfault when run on the target Red Hat Enterprise 6 server. Turns out there's a bug in versions of perl earlier that 5.15 that leads to the result I saw. The technical details are described under BUGS in the perldoc for the module. A good discussion of the issue appears in the comments to Bug # 83059 from last January, but it seems to have been stumbled upon as early as 2011 (see this post on PerlMonks, for example). The solution for now is for me to do an additional installation of perl using the latest version (5.18.x) on my server. Back in my Solaris 7/8 days I used to use either sunfreeware (which ironically is no longer free, mostly due to Oracle's failure to continue the generous support that Sun once provided) or just compile from source. On Linux I've also got a few choices. The easiest, installing ActiveState's ActivePerl isn't an option because this is a production server process and their license prohibits using the free Community Edition in production (I did try this out on a test system, and the script performed perfectly under the latest AS perl for Linux). There's also Perlbrew, which installs a utility that's supposed to facilitate installing and running multiple versions of perl in a user's home directory. Unfortunately this didn't install for me, although I tried both the installer-via-curl and cpan methods. My final choice was to download and compile from source, which is how I'm now proceeding (fortunately my production machines are almost identical at the binary level, so I'll be able to reuse what I build on other systems).

Copyright 2004-2019 Phil Lembo