bugLiberty Eiffel - Bugs: bug #43631, program, used to compile under...

 
 

bug #43631: program, used to compile under SmallEiffel, crashes compile_to_c

Submitter:  Laurie Moye <lauriemoye>
Submitted:  Tue 18 Nov 2014 05:40:36 PM UTC
   
 
Category:  SmartEiffel Severity:  4 - Important
Priority:  * 5 - Normal Status:  Fixed
Assigned to:  cadrian Open/Closed:  Closed
Release:  adler Fixed Release:  bell
Planned Release:  bell
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 18 Nov 2014 10:05:44 PM UTC, comment #3: 
Cyril Adrian <cadrian>
Group administrator
Tue 18 Nov 2014 09:26:25 PM UTC, comment #2: 

`like Current` creation does work indeed; the core library itself uses it (e.g. MUTABLE_BIG_INTEGER line 2721, LINKED_LIST line 380, UNUSED_EXPRESSION line 55…)

The only constraint is on the heirs of Current to have a `make` creation feature.

--

Now, about this bug: the problem is in EFFECTIVE_ARG_LIST_N.collect (line 643): `cf.item(j)` is Void.

What's left now is to understand why :-)

Cyril Adrian <cadrian>
Group administrator
Tue 18 Nov 2014 06:28:41 PM UTC, comment #1: 

For me it looks like the construct
local
    next_item : like Current
do
    create next_item.make(successors.lower, successors.upper)
end

I. e. a create instruction with an anchored "like Current" type. I'm not yet convinced, that I like this construct and am not sure whether we should allow it. (what does ECMA say here?)

Raphael Mack <ramack>
Group administrator
Tue 18 Nov 2014 05:40:36 PM UTC, original submission:  

I have a little program that I wrote some years ago and compiled with SmallEiffel (probably 0.75 as I never bothered to follow the later syntax changes). When I try to compile this program with Adler, it crashes compile_to_c. I've packaged up various tarballs which I hope will help you work out what's going wrong. Each tarball expands into a directory with the same name as the tarball.

Original.tgz is the original code, but with all the syntax changes I think are necessary to make it compile under Adler. It includes the traceback from the crash of adler compile_to_c conpiled -no_check-no_gc -no_strip (I've also included the command file that compiles compile_to_c).

Compiles.tgz is the same code slightly modified, which Adler compile_to_c compiles correctly. It has been changed in the following way.

The program computes anagrams from a lexicon and a string of letters. It compiles the lexicon internally into a word-tree composed of LEXICAL_TREE_ITEMs, but in the original program I wrote all the nescessary code for LEXICAL_TREE_ITEM as a generalised MULTI_WAY_TREE_ITEM. LEXICAL_TREE_ITEM inherits this and redefines the make feature to have fixed limits of 'a' to 'z'. All I've done in compiles.tgz is eliminate MULTI_WAY_TREE_ITEM and put its code into LEXICAL_TREE_ITEM.

These two examples are only really interesting because they show that it is the inheritance of MULTI_WAY_TREE_ITEM that causes the problem. So, I have reduced the code to the minimum number of lines that I can get which crashes compile_to_c in the same way (with the same end to the traceback). This is in minimum-crash.tgz.

On the way to deriving minimum-crash.tgz I was suprised to find that it was the climb feature, not just the make feature that has to be called to make compile_to_c crash, so I've also included minimum-compiles.tgz as an example of stripped down code which I expected to crash compile_to_c, but which doesn't.

Laurie Moye <lauriemoye>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #32462:  compiles.tgz added by lauriemoye (122KiB - application/x-gzip)
file #32463:  minimum-compiles.tgz added by lauriemoye (30KiB - application/x-gzip)
file #32460:  original.tgz added by lauriemoye (8KiB - application/x-gzip)
file #32461:  minimum-crash.tgz added by lauriemoye (4KiB - application/x-gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ramack (Updated the item)
  • -email is unavailable- added by lauriemoye (Submitted 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 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-12-02 cadrian Open/ClosedOpen Closed
    2014-11-18 cadrian Fixed ReleaseNone bell
    2014-11-18 cadrian StatusConfirmed Fixed
    2014-11-18 cadrian Assigned toNone cadrian
    2014-11-18 cadrian CategoryNone SmartEiffel
        StatusNone Confirmed
    2014-11-18 ramack Severity3 - Normal 4 - Important
        ReleaseNone adler
        Planned ReleaseNone bell
    2014-11-18 lauriemoye Attached File- Added original.tgz, #32460
        Attached File- Added minimum-crash.tgz, #32461
        Attached File- Added compiles.tgz, #32462
        Attached File- Added minimum-compiles.tgz, #32463

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code