Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Data-UUID CPAN distribution.

Report information
The Basics
Id: 2481
Status: resolved
Priority: 0/
Queue: Data-UUID

People
Owner: Nobody in particular
Requestors: martin [...] friebe.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.09
Fixed in: (no value)



Subject: counter for multible uuid within one tick is broken
1) static void get_current_time in does not initialize time_last. Therefore it will always default to set uuids_this_ticks to zero and return. (Even twice in the same tick) 2)get_system time returns tv_usec (ticks) * 10, increasing the time by 10 for each tick, but then it will add up to 1000 (uuid_this_tick) to id. This overlaps with the next tick.
From: martin
[guest - Fri May 2 13:25:32 2003]: Show quoted text
> 1) > static void get_current_time in does not initialize time_last. > Therefore it will always default to set uuids_this_ticks to zero and > return. (Even twice in the same tick) > > 2)get_system time returns tv_usec (ticks) * 10, increasing the time by > 10 for each tick, but then it will add up to 1000 (uuid_this_tick) to > id. This overlaps with the next tick.
It also doesnt support multi process. The only protection here is that the clock_seq counter get random values at startup, but if you fork after this initialization, you get the same uuids. Well you need an ultra fast box to experience it...
The code to initialize time_last was there, but was initializing the wrong thing. Fixed! -- rjbs