PR# 19922 Unexpected exception from {ARRAYED_SET} set operations

Problem Report Summary
Submitter: rosivaldo
Category: EiffelBase
Priority: Low
Date: 2024/05/23
Class: Bug
Severity: Non-critical
Number: 19922
Release: 23.09 (23.09.10.7341 - win64)
Confidential: No
Status: Open
Responsible:
Environment: win64
Synopsis: Unexpected exception from {ARRAYED_SET} set operations

Description
A sequence of supposedly legal operations are applied upon an instance of {ANNOTATED_ARRAYED_SET} (descendant of {ARRAYED_SET}). Sometimes, I don't know why, the last operation fails with the exception below.

index_small_enough: CHECK_VIOLATION raised (CHECK_VIOLATION)
******************************** Thread exception *****************************
In thread           Root thread            0x0 (thread id)
*******************************************************************************
-------------------------------------------------------------------------------
Class / Object      Routine                Nature of exception           Effect
-------------------------------------------------------------------------------
ANNOTATED_ARRAYED_SET
                    item @4                index_small_enough:
<00000000046F2688>  (From ARRAYED_LIST)    Runtime check violated.       Fail
-------------------------------------------------------------------------------
ANNOTATED_ARRAYED_SET
                    item @4                
<00000000046F2688>  (From ARRAYED_LIST)    Routine failure.              Fail
-------------------------------------------------------------------------------
SUBSET_STRATEGY_GENERIC
                    disjoint @17           
<000000000474A598>                         Routine failure.              Fail
-------------------------------------------------------------------------------
ANNOTATED_ARRAYED_SET
                    disjoint @4            
<00000000046C5808>  (From TRAVERSABLE_SUBSET)
                                           Routine failure.              Fail
-------------------------------------------------------------------------------
ANNOTATED_ARRAYED_SET
                    disjoint @3            
<00000000046C5808>                         Routine failure.              Fail
-------------------------------------------------------------------------------
ANNOTATED_ARRAYED_SET
                    subtract @10           is_disjoint:
<00000000046C5808>  (From TRAVERSABLE_SUBSET)
                                           Postcondition violated.       Fail
-------------------------------------------------------------------------------
ANNOTATED_ARRAYED_SET
                    subtract @10           
<00000000046C5808>  (From TRAVERSABLE_SUBSET)
                                           Routine failure.              Fail
-------------------------------------------------------------------------------
ANNOTATED_ARRAYED_SET
                    subtract @3            
<00000000046C5808>                         Routine failure.              Fail
-------------------------------------------------------------------------------
ANNOTATED_ARRAYED_SET
                    symdif @6              
<00000000046C5808>                         Routine failure.              Fail
-------------------------------------------------------------------------------
ANNOTATED_ARRAYED_SET_TESTS_DSCR
                    inline-agent#1 of test_symdif @20
<000000000448EB68>  (From ANNOTATED_ARRAYED_SET_TESTS)
                                           Routine failure.              Fail
-------------------------------------------------------------------------------
PREDICATE           fast_item                                           
<00000000046C5778>  (From FUNCTION)        Routine failure.              Fail
-------------------------------------------------------------------------------
PREDICATE           item @3                                             
<00000000046C5778>  (From FUNCTION)        Routine failure.              Fail
-------------------------------------------------------------------------------
ANNOTATED_ARRAYED_SET_TESTS_DSCR
                    test_symdif @1         
<000000000448EB68>  (From ANNOTATED_ARRAYED_SET_TESTS)
                                           Routine failure.              Fail
-------------------------------------------------------------------------------
ANNOTATED_ARRAYED_SET_TESTS_DSCR
                    test_symdif @3         
<000000000448EB68>                         Routine failure.              Fail
-------------------------------------------------------------------------------
EQA_EVALUATOR       invoke_routine                                      
<000000000448A588>  (From EQA_EXTERNALS)   Routine failure.              Fail
-------------------------------------------------------------------------------
PROCEDURE           fast_call                                           
<000000000448E298>                         Routine failure.              Fail
-------------------------------------------------------------------------------
PROCEDURE           call @3                                             
<000000000448E298>                         Routine failure.              Fail
-------------------------------------------------------------------------------
PROCEDURE           fast_call                                           
<000000000448F828>                         Routine failure.              Fail
-------------------------------------------------------------------------------
PROCEDURE           call @3                                             
<000000000448F828>                         Routine failure.              Fail
-------------------------------------------------------------------------------
EQA_TEST_EVALUATOR  execute_test_stage @4                               
<000000000448E1C8>                         Routine failure.              Fail
-------------------------------------------------------------------------------
EQA_TEST_EVALUATOR  execute @10                                         
<000000000448E1C8>                         Routine failure.              Fail
-------------------------------------------------------------------------------
EQA_EVALUATOR       execute_test @3                                     
<000000000448A588>                         Routine failure.              Fail
-------------------------------------------------------------------------------
EQA_EVALUATOR       main_loop @9                                        
<000000000448A588>                         Routine failure.              Fail
-------------------------------------------------------------------------------
EQA_EVALUATOR       make @12                                            
<000000000448A588>                         Routine failure.              Fail
-------------------------------------------------------------------------------
EQA_EVALUATOR       root's creation                                     
<000000000448A588>                         Routine failure.              Exit
-------------------------------------------------------------------------------
To Reproduce
- Extract the files within main.7z attachment.
- With EiffelStudio, open the project st_examples.ecf and compile its target named st_examples_test.
- Target AutoTest  tool to class:ANNOTATED_ARRAYED_SET_TESTS_DSCR/.*test_symdif.
- Click the button "Debug filtered tests".
- Press Ctrl+F5 (Run ignoring breakpoints).
- Eventually the test will stop due to index_small_enough: CHECK_VIOLATION raised (CHECK_VIOLATION)
Problem Report Interactions
From:rosivaldo    Date:2024/05/23    Download   
Attachments for problem report #19922

Attachment: main.7z     Size:54263