bugLiberty Eiffel - Bugs: bug #48245, BIG SEMANTIC SHIFT: in is_equal...

 
 

bug #48245: BIG SEMANTIC SHIFT: in is_equal causes recursion

Submitter:  None
Submitted:  Thu 16 Jun 2016 02:22:00 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  * 5 - Normal Status:  None
Assigned to:  None Open/Closed:  Open
Release:  adler Fixed Release:  None
Planned Release:  curtiss
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 06 Aug 2016 08:17:30 PM UTC, comment #1: 

I accidentally deleted THING.e ....

I'm writing to savannah to see if it's possible to restore it.

Meanwhile someone who have saved it may re-upload ....

Sorry for the clumsy move..

Paolo Redaelli <Tybor>
Group administrator
Thu 16 Jun 2016 02:22:00 PM UTC, original submission:  

I imagine this problem would have arisen using the old ARRAY.is_equal_map, but neither I nor the compiler ever used it.
Now that feature is called is_equal, it gets used and this is what happens.

THING contains an ARRAY[THING] and redefines is_equal to compare these arrays using is_equal. This is fine when two THINGs that are is_equal are compared, but when two not is_equal things are compared it gets into an endless recursive loop in which Current and other swap places in each alternate call.

Attached are the source-code files and a cut-down version of the traceback from the debugger after the crash.


Here's what happens when it runs:

ceres/2nd-try: compile -no_gc -g -no_strip test2_thing test -o test2
ceres/2nd-try: ./test2
thing_c fast_is_equal to thing_b
thing_c is_equal to thing_b
NOT thing_a fast_is_equal to thing_b
Segmentation fault
ceres/2nd-try:


In the gdb backtrace the symbols are:

r76  THING
r201 ARRAY[THING]
r202 NATIVE_ARRAY[THING]



Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #37501:  back-trace.txt added by None (3KiB - text/plain)
file #37502:  test2_thing.e added by None (1KiB - text/x-eiffel)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by Tybor (Posted a comment)
  • -email is unavailable- added by ramack (Updated the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-05-17 Tybor SummaryBIG SEMANTIC SHIFT: in is_equai causes recursion BIG SEMANTIC SHIFT: in is_equal causes recursion
    2016-08-06 Tybor Attached File#37500 Removed
    2016-06-16 ramack ReleaseNone adler
        Planned ReleaseNone curtiss
    2016-06-16 None Attached File- Added thing.e, #37500
        Attached File- Added back-trace.txt, #37501
        Attached File- Added test2_thing.e, #37502

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code