[rrd-developers] [PATCH] fix for an endless loop

Peter Stamfest peter at stamfest.at
Fri Oct 29 08:45:54 CEST 2010


Hello, 

Here is a patch that fixes a serious endless loop problem on 32 bit 
architectures near the timestamp 2^31 (oh yes - y2k038 is showing its ugly 
face) when using the graph command(s). Once the endtime of a graph is 
above the mentioned timestamp, mktime always returns -1 (and correctly 
so), causing some loops to loop forever. The patch fixes this, causing 
some strange output, but there is no other sane way to handle this (expect 
by switching to a 64 bit platform).

The patch has seen only light testing, but because it merely handles an 
error case that usually triggers rarely, its impact should not be too 
high. That said: I did not test it for daylight saving time switchovers.

Sorry for not inlining the patch - the mailer I use these days has its 
problems with formatting.

peter


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-developers/attachments/20101029/5c091d84/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-endless-loop.patch
Type: application/octet-stream
Size: 2737 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-developers/attachments/20101029/5c091d84/attachment.obj 


More information about the rrd-developers mailing list