It looks like it was the optimizer. If turning it off it works OK.<br>Added some other printf and fond that the steps was wrong calculated.<br><br>The Diff is src->end - src->start (not calculated corrct)<br><br>Diff=4294880656
<br>Step=240<br>DEBUG: start == 1182873600, end == 1182960240, 17895336 steps<br><br>I tested with some other expression to get it correct.<br><br>steps = ((long)src->end - (long)src->start) / src->step; Same result.
<br><br>steps = src->end;<br>steps -= src->start;<br>steps /= src->step;<br>Also same result.<br><br>I was not able to find any expression that gives the correct result with optimition.<br>
<br><br>Thanks for the help.<br><br>/Dag<br><br><div><span class="gmail_quote">2007/6/27, Alex van den Bogaerdt <<a href="mailto:alex@ergens.op.het.net">alex@ergens.op.het.net</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, Jun 26, 2007 at 11:53:43PM +0200, Dag Erlandsson wrote:<br>> It hangs with AVERAGE, MINIMUM and LAST also.<br><br>Ack.<br><br>> The strange thing is that if I enable the debug printf in the beginning of<br>> vcalc_def() function, it prints out AND returns OK.
<br>> Then I tested to remove the debug printf again and now it hangs again.<br><br>:-)<br><br>Maybe a faulty optimizer? Try different optimizer settings when compiling.<br><br>> So just now I'm in the situation when I add printfs to see what happens it
<br>> works, removes the dosn't work. It looks like I have to learn how to use<br>> gdb. Can it be run on an ARM7 platform?<br><br>Sorry, can't help here.<br><br>--<br>Alex van den Bogaerdt<br><a href="http://www.vandenbogaerdt.nl/rrdtool/">
http://www.vandenbogaerdt.nl/rrdtool/</a><br><br>_______________________________________________<br>rrd-users mailing list<br><a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a><br><a href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users">
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</a><br></blockquote></div><br>