Data::UUID problem
Chris Grau
chris at chrisgrau.com
Thu Sep 8 00:19:49 UTC 2005
On Fri, Sep 02, 2005 at 12:24:05PM -0500, Steven Pritchard wrote:
> I'm trying to build a package for Data::UUID. Something, possibly the
> from_string() function, apparently isn't 64-bit clean. ("make test"
> fails on x86_64 but works fine on i386.) Unfortunately, I can't see
> an obvious problem. Well, I can't figure out what's going on in the
> code really either... :-)
>
> Anyway, if there's anyone on this list that might be able to help me
> figure this out, I'd really appreciate it. The author doesn't seem to
> be terribly responsive.
Not very responsive at all. This same bug looks to have been reported
at rt.cpan.org on Jan 4, 2005 without response.
I took a quick look at the code. These lines in UUID.h appear to be the
problem:
typedef unsigned long unsigned32;
typedef unsigned short unsigned16;
typedef unsigned char unsigned8;
typedef unsigned char byte;
typedef unsigned long long unsigned64_t;
typedef unsigned64_t uuid_time_t;
I can't readily verify this right now, since I don't have access to an
x86_64 box, but I suspect that sizeof(long) is 4 on x86 and 8 on x86_64.
This would change the size of uuid_t and throw off the pointer
arithmetic done in from_string().
The program could probably be patched fairly easily with some #ifdefs to
handle the different architectures, but that's a pretty fundamental
change to be making in a distribution patch.
--
Chris Grau <chris at chrisgrau.com>
More information about the Fedora-perl-devel-list
mailing list