PR# 19324 ARRAYED_CIRCULAR implementation of `do_all' is an infinite loop

Problem Report Summary
Submitter: finnianr
Category: EiffelBase
Priority: Medium
Date: 2017/02/05
Class: Bug
Severity: Non-critical
Number: 19324
Release: 16.05.9.8969
Confidential: No
Status: Analyzed
Responsible:
Environment: linux
Synopsis: ARRAYED_CIRCULAR implementation of `do_all' is an infinite loop

Description
Calling routine {ARRAYED_CIRCULAR}.do_all  never returns
To Reproduce
   circular_list_iteration
      local
         list: ARRAYED_CIRCULAR [INTEGER]
      do
         create list.make (3)
         across 1 |..| 3 as n loop
            list.extend (n.item)
         end
         list.do_all (agent (n: INTEGER)
            do
               io.put_integer (n)
               io.put_new_line
            end
         )
      end
Problem Report Interactions
From:manus_eiffel    Date:2017/02/09    Status: Analyzed    Download   
This is by design and has nothing to do with do_all. The same occurs with:

         from
         	list.start
         until
         	list.after
         loop
         	io.put_integer (list.item)
         	io.put_new_line
         	list.forth
         end

However using `across` instead which is more efficient does not suffer from this.

I personally agree with you that traditional iteration should not infinitely iterate through the circular list. We will have a look at why this was done in the first place.