The XS version is most likely calling into the kernel/system, particularly, the local Time Zone database, hence the reason you're getting a segfault from passing bad parameters.
Given the recent legal debacle with the default time zone database used on most systems, if you have any kind of "auto update" running on your system, the culprit may not be your perl code. The Linux folks may have reacted to the copyright infringement lawsuit by modifying their TZ database in some strange, and incompatible way.
I noticed your perl version is ancient, v5.8.8, so if you're using a newer module with an old perl, this might be the cause.
Personally, I see no reason for you to be running the code inside an eval? Do you have some specific reason for doing this? --Note: I can't see much of the code, so there may be some hidden reason.
If you want to remove your 'self' from harms way, validate the input. It would also be wise to validate the inputs you send to Params::Validate, specifically, make sure @_ is non-empty, and make sure $NewValidate is a HASHREF and is non-empty.
sub new { if ($_[0] =~ m/^$PROGRAM=HASH\(0x/) { my $class = shift(); print "Got Self\n"; } else { print "Selfless\n"; } if ( ((defined @_) && (@_ > -1)) && ((defined $NewValidate) && (ref($NewValidate) eq 'HASH') && (keys %$NewValidate)) ) { my %p = validate( @_, $NewValidate ); unless ((defined %p) && (keys %p)) { die("failed to validate!"); } } else { die("a horrible death!"); } ...
Hope this helps
In reply to Re: Tracking down a segfault
by Anonymous Monk
in thread Tracking down a segfault
by davee123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |