Well, the oddity to me is that we're not passing bad parameters. Or, at least, that's what everything seems to say. The Perl error expressly tells us that we're providing the necessary params correctly, and printing them out immediately before the call shows the same thing.
The error is caused by the fact that DateTime.pm somehow loses the parameters that we passed it. We pass them, and I hacked a print line into DateTime.pm to prove that it was indeed receiving the params correctly in @_. However, DateTime.pm then processes the arguments using Params::Validate. So, when Params::Validate returns the object, it's empty, with no error!
As for why it's in an eval? I think that's because it's important that the code doesn't die (I didn't actually write it, so I'm guessing here). The library is used in a few places, one of them processing human input, which occasionally is input with crap. So I believe without the eval, junk input can result in an exit from DateTime, which shouldn't cause the program to fail.
We're suspicious about the fact that it's time zone code thanks to the fact that there was the recent problem with the Olson DB, which might have causing this, but it... doesn't seem like the problem. At least not offhand. We re-processed the Olson data a few times (using different versions), but nothing seems to solve the error.
Our guess for the time being is that the error is further upstream somewhere, and perhaps something in the stack is being screwed up, and it's only getting to the breaking point when it gets down to the TimeZone level.
The whole environment is ... interesting. As noted, it's a very old Perl version (we've been denied in trying to have them upgrade it, and some libraries we maintain ourselves, not maintained by the sysadmins). But I'm still at a loss, since, well, you're not supposed to get actual segfaults!
DaveEIn reply to Re^2: Tracking down a segfault
by davee123
in thread Tracking down a segfault
by davee123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |