[cpp-threads] infinite loops

Doug Lea dl at cs.oswego.edu
Mon Aug 7 20:28:58 BST 2006


Boehm, Hans wrote:
> I agree with Bill's concerns.  And I would really like to see the
> guarantee about sequential consistency for data-race-free programs
> stand.
> 
> On the other hand, I've been convinced that giving undefined semantics
> to some infinite loops is probably tolerable.
> 
> Our conclusion the last time we thought about this was that the
> offending class of nonterminating loops is essentially nonexistent in
> real code.  Even Bill's example of a loop searching forever for a
> counterexample is realistically going to write out check-points now and
> then.  And some compilers have already concluded that such code is
> usually erroneous, and thus flag blatantly infinite loops with a
> warning.
> 


I still think there is something wrong with how this problem
is being posed and discussed. Maybe with SC itself.
Consider saying that a program is SC if for all k >= 0,
k steps of the program obey Lamport SC relations. In that case,
this problem seems to go away.

-Doug



More information about the cpp-threads mailing list