On Tue 24 Jan 2006 at 09:33AM, Bart Smaalders wrote:
> >On NetBSD sparc64, compiled with gcc and -O2 optimisations, the benchmark
> >goes into infinite loop, because of the way automatic variables are
> >handled after calling longjmp(), i.e. their value is indeterminate, which
> >is affected by compiler optimisations. In this case, I observed that
> >variable i was incremented to some large number, but then reset to 0.
> >
> >To fix this, you'd need to declare i as 'volatile'
> >Richard Stevens explains this very well in his "Advanced Programming in
> >the Unix Environment" on page 178
>
> Thanks... I need to patch this; we've hit this before.
We've debugged this on the alias 3 or 4 times now... I hope for a new
version to come out soon!
-dp
--
Daniel Price - Solaris Kernel Engineering - [EMAIL PROTECTED] - blogs.sun.com/dp
_______________________________________________
perf-discuss mailing list
[email protected]