Click here to get back home

Time::HiRes < 1.91 and glibc 2.4 incompatibility

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Time::HiRes < 1.91 and glibc 2.4 incompatibility Mark Seger 04-12-2008
Posted by Mark Seger on April 15, 2008, 12:07 pm
Please log in for more thread options

> The useconds_t type is only defined to support values up to 1,000,000.
> Depending on undefined behavior is a mistake on the caller's part.
> The AIX C library also returns an error if values >1M are passed in;
> it's not a glibc bug.
> ualarm is replaced by setitimer, which has seconds and microseconds.
> --S

I've been thinking about this some more, and I guess the question in my
mind is how did this ever work? pre HiRes .91, ularm of 10 seconds
works with glibc 2.3 and doesn't work with glibc 2.4.

Has nobody else tripped over this?

-mark

Posted by Martijn Lievaart on April 15, 2008, 2:58 pm
Please log in for more thread options
On Tue, 15 Apr 2008 12:07:33 -0400, Mark Seger wrote:

>> The useconds_t type is only defined to support values up to 1,000,000.
>> Depending on undefined behavior is a mistake on the caller's part. The
>> AIX C library also returns an error if values >1M are passed in; it's
>> not a glibc bug.
>> ualarm is replaced by setitimer, which has seconds and microseconds.
>> --S
>
> I've been thinking about this some more, and I guess the question in my
> mind is how did this ever work? pre HiRes .91, ularm of 10 seconds
> works with glibc 2.3 and doesn't work with glibc 2.4.

If something is defined only when <condition> holds it is not defined
that it will not work <condition> doesn't hold. It might even work in
case condition is not satisfied! But depending on that undefined
behaviour might break in the next release, as was most probably the case
here.

M4

Similar ThreadsPosted
accuracy of Time::HiRes June 27, 2008, 4:38 pm
Time::HiRes hell... July 1, 2008, 12:36 pm
Time::HiRes module and timing a command... November 16, 2004, 10:54 am
problems with Time::HiRes on some SLES systems September 28, 2006, 1:08 am
Time::HiRes usleep on windows strange behaviour...please please help!! November 29, 2005, 11:37 pm
Inline::C and binary incompatibility May 17, 2005, 1:01 am
GMT time to local time, according to timezone and summer/winter time. May 15, 2005, 10:45 pm
Calculating time of employee session from the log date/time stampusing perl May 24, 2005, 5:55 pm
How do I convert TIME into Cookie and last-modified-time format? October 1, 2004, 3:05 pm
Compare UNIX file time with time in a variable November 23, 2006, 2:39 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap