1. 4.1 Beta Binary Release

Since this is my first go at packaging Eu, I thought it would be best to temporarily make them available here before uploading to SourceForge. I've only worked on 4.1 thus far, and I appreciate any comments or let me know if something is missing/wrong.

Windows (32bit only thus far)
https://dl.dropboxusercontent.com/u/5805068/Euphoria/euphoria-4.1.0.exe

Linux
https://dl.dropboxusercontent.com/u/5805068/Euphoria/euphoria-4.1.0-Linux-ix86.tar.gz

https://dl.dropboxusercontent.com/u/5805068/Euphoria/euphoria-4.1.0-Linux-ix86-64.tar.gz

OSX
https://dl.dropboxusercontent.com/u/5805068/Euphoria/euphoria-4.1.0-OSX-ix86.tar.gz

https://dl.dropboxusercontent.com/u/5805068/Euphoria/euphoria-4.1.0-OSX-ix86-64.tar.gz

Thanks,
Ira

new topic     » topic index » view message » categorize

2. Re: 4.1 Beta Binary Release

I did a test with Puppy Linux installed on a USB pendrive.

The version of Puppy I used was Puppex-32bit-lxde, which has gcc installed; euc compiles ok.

Puppy has a unique directory /root/my-applications making it easy do experiments.

  • extract the file euphoria-4.1.0-Linux-ix86.tar.gz
    • into a folder named euphoria-4.1.0-Linux-ix86
    • copy that folder to /root/my-applications
  • copy the contents of OE /bin to
    • /root/my-applications/bin
  • edit eu.cfg (found in /root/my-applications/bin )

[all] 
-d E32 
-eudir /root/my-applications/euphoria-4.1.0-Linux-ix86 
-i /root/my-applications/euphoria-4.1.0-Linux-ix86/include 
[translate] 
-arch ix86 
-gcc  
-con  
-com /root/my-applications/euphoria-4.1.0-Linux-ix86/euphoria 
-lib-pic /root/my-applications/euphoria-4.1.0-Linux-ix86/bin/euso.a 
-lib /root/my-applications/euphoria-4.1.0-Linux-ix86/bin/eu.a 
[bind] 
-eub /root/my-applications/euphoria-4.1.0-Linux-ix86/bin/eub 

  • Now, from a terminal you can execute eui. The test program sanity.ex executed; I ran a few demos and they also executed.

Thanks form making 4.1 available.

_tom

new topic     » goto parent     » topic index » view message » categorize

3. Re: 4.1 Beta Binary Release

_tom said...
  • Now, from a terminal you can execute eui. The test program sanity.ex executed; I ran a few demos and they also executed.

Thanks for the feedback! I also have 4.1 for Windows 64bit here: https://dl.dropboxusercontent.com/u/5805068/Euphoria/euphoria-4.1.0_ix86_64.exe.

Assuming no one finds any major problems\issues in the next few days, I'll upload to sourceForge.

Thanks,
Ira

new topic     » goto parent     » topic index » view message » categorize

4. Re: 4.1 Beta Binary Release

Still testing with puppy...

It looks like syncolor is broken.

  • If I launch eui ed.ex foo.ex and type function (as the first text entered in the file) and press return the editor crashes.
  • If I launch eui ed.ex foo.txt and type function and press return the editor behaves normally.

_tom

new topic     » goto parent     » topic index » view message » categorize

5. Re: 4.1 Beta Binary Release

_tom said...
  • If I launch eui ed.ex foo.ex and type function (as the first text entered in the file) and press return the editor crashes.
  • If I launch eui ed.ex foo.txt and type function and press return the editor behaves normally.

I get the same error. Can you edit ed.ex (line 2035) and see if this helps?

if sequence(buffer[b_line]) and sequence(buffer_multi[b_line]) then         -- Insert this line 
         buffer[b_line] = splice( buffer[b_line], text[i], b_col ) 
         buffer_multi[b_line] = splice( buffer_multi[b_line], -1, b_col ) 
         b_col += 1 
         if i = length(text) then 
                DisplayLine(b_line, s_line, FALSE) 
         end if 
end if                  -- Insert this line   

Thanks,
Ira

new topic     » goto parent     » topic index » view message » categorize

6. Re: 4.1 Beta Binary Release

Jerome said...

I get the same error. Can you edit ed.ex (line 2035) and see if this helps?

After the edit I still get a crash:

/root/euphoria/bin/edx.ex:2035 in procedure insert_string()                      
subscript value 1 is out of bounds, reading from a sequence of length 0 - in sub 
                                                                                 
... called from /root/euphoria/bin/edx.ex:2086 in procedure try_auto_complete()  
                                                                                 
... called from /root/euphoria/bin/edx.ex:2366 in procedure edit_file()          
                                                                                 
... called from /root/euphoria/bin/edx.ex:2496 in procedure ed()                 
                                                                                 
... called from /root/euphoria/bin/edx.ex:2523 in procedure ed_main()            
                                                                                 
... called from /root/euphoria/bin/edx.ex:2539                                   
                                                                                 
--> See ex.err  
 

new topic     » goto parent     » topic index » view message » categorize

7. Re: 4.1 Beta Binary Release

_tom said...

After the edit I still get a crash:

/root/euphoria/bin/edx.ex:2035 in procedure insert_string()                      
subscript value 1 is out of bounds, reading from a sequence of length 0 - in sub 
                                                                                 
... called from /root/euphoria/bin/edx.ex:2086 in procedure try_auto_complete()  
                                                                                 
... called from /root/euphoria/bin/edx.ex:2366 in procedure edit_file()          
                                                                                 
... called from /root/euphoria/bin/edx.ex:2496 in procedure ed()                 
                                                                                 
... called from /root/euphoria/bin/edx.ex:2523 in procedure ed_main()            
                                                                                 
... called from /root/euphoria/bin/edx.ex:2539                                   
                                                                                 
--> See ex.err  
 

Sorry about that; that helps with a different problem but not yours. I've uploaded a new ed.ex for you to try: https://dl.dropboxusercontent.com/u/5805068/Euphoria/ed.ex. I just confirmed on my system that typing 'function','procedure','while',etc... produces the correct completions and doesn't crash.

Thanks,
Ira

new topic     » goto parent     » topic index » view message » categorize

8. Re: 4.1 Beta Binary Release

Jerome said...

I've uploaded a new ed.ex for you to try: https://dl.dropboxusercontent.com/u/5805068/Euphoria/ed.ex.

Typing "function" now does not crash the editor.

But, I compiled ed.ex to " edx ".

Just got this error after typing a few lines:

*** glibc detected *** edx: malloc(): memory corruption (fast): 0x080f4720 ***  

I can't reproduce this error, but something is going on.

_tom

new topic     » goto parent     » topic index » view message » categorize

9. Re: 4.1 Beta Binary Release

Doing some more typing and getting these results:

 foo1.ex <new file>                                            Esc for commands  
function copyFile( sequence inFile, sequence outFile)                            
atom in = open(inFile, "r" )                                                     
atom out = open( outFile, "w" )                                                  
integer count = 0                                                                
                                                                                 
while 1 do                                                                       
    object line = gets(in)                                                       
    if1atedx: malloc.c:3790: _int_malloc: Assertion `(unsigned long)(size) >= (unsigned long)(nb)' failed.                                                       

Aborted if                                                                       
# m while                                                                        
                                                                                 
    return                                                                       
end function  

and again

foo.ex <new file>                                            Esc for commands  
function copyFile( sequence inFile, sequnce outFile)                             
atom in = open( inFile, "r" )                                                    
atom out = open( outFile, "w" )                                                  
integer count = 0                                                                
                                                                                 
while 1  do                                                                      
    object line = gets(in)                                                       
*** glibc detected *** edx: free(): invalid next size (fast): 0x080f5b70 ***     
*** glibc detected *** edx: malloc(): smallbin double linked list corrupted: 0x080f5ba8 ***                                                                      
end while                                                                        
                                                                                 
    return                                                                       
end function    

The error messages are popping up over the text I was editing using the compiled ed.ex

_tom

new topic     » goto parent     » topic index » view message » categorize

10. Re: 4.1 Beta Binary Release

_tom said...

Just got this error after typing a few lines:

*** glibc detected *** edx: malloc(): memory corruption (fast): 0x080f4720 ***  

Well, I'm not sure if this is because of my changes or indicative of a larger problem. Typing your example on my system does not reliably crash for the compiled ed. I got the same error message but it seems to work more often than not on my system (Ubuntu 12.04). I'll see if compiling with debug symbols and running gdb can shed some light on the problem.

Thanks,
Ira

new topic     » goto parent     » topic index » view message » categorize

11. Re: 4.1 Beta Binary Release

Jerome said...

... I've uploaded a new ed.ex for you to try: https://dl.dropboxusercontent.com/u/5805068/Euphoria/ed.ex. I just confirmed on my system that typing 'function','procedure','while',etc... produces the correct completions and doesn't crash.

Thanks,
Ira

Your new ed.ex works fine for me on Ubuntu 13.1. Your work is deeply appreciated.

However; there is a minor bug in the ed.ex clean function which was introduced in 4.0, I think. If only lines with a length greater than 2 are evaluated, then the CR will not be removed from "empty" lines consisting of just a CR & LF:

-- function clean(sequence line) 
ifdef UNIX  then                                                                                 
        --      error introduced in 4.0:                                                             
        --      if length(line) > 2 and line[$-1] = '\r' then                                        
        if length(line) > 1 and line[$-1] = '\r' then                                                
            -- DOS file: remove CR                                                                   
            cr_removed = TRUE                                                                        
            line = line[1..$-2] & '\n'                                                               
        end if                                                                                       
end ifdef                  
new topic     » goto parent     » topic index » view message » categorize

12. Re: 4.1 Beta Binary Release

Jerome said...

Well, I'm not sure if this is because of my changes or indicative of a larger problem. Typing your example on my system does not reliably crash for the compiled ed. I got the same error message but it seems to work more often than not on my system (Ubuntu 12.04). I'll see if compiling with debug symbols and running gdb can shed some light on the problem.

The problem here is that buffer_multi is an empty sequence. After making your change and running interpreted, I get:

 foo1.ex <new file> 
function 
/home/matt/eu/oe/hg/bin/ed.ex:2035 in procedure insert_string() 
subscript value 1 is out of bounds, reading from a sequence of length 0 - in subscript #1 of 'buffer_multi'  

I don't know enough about the guts of ed.ex to know what this means, but an error like that would slip through translated code to give you the sort of malloc error that Tom is reporting.

Matt

NB: Note the line in question:

if sequence(buffer[b_line]) and sequence(buffer_multi[b_line]) then 

...and the improved error message that tells you exactly where the error is. smile

new topic     » goto parent     » topic index » view message » categorize

13. Re: 4.1 Beta Binary Release

mattlewis said...

The problem here is that buffer_multi is an empty sequence. After making your change and running interpreted, I get:

 foo1.ex <new file> 
function 
/home/matt/eu/oe/hg/bin/ed.ex:2035 in procedure insert_string() 
subscript value 1 is out of bounds, reading from a sequence of length 0 - in subscript #1 of 'buffer_multi'  

I don't know enough about the guts of ed.ex to know what this means, but an error like that would slip through translated code to give you the sort of malloc error that Tom is reporting.

...and of course, looking at it again, I see that I introduced buffer_multi to track multi-line tokens (strings and comments). I must have missed something in there... getlost

Matt

new topic     » goto parent     » topic index » view message » categorize

14. Re: 4.1 Beta Binary Release

mattlewis said...
mattlewis said...

The problem here is that buffer_multi is an empty sequence. After making your change and running interpreted, I get:

 foo1.ex <new file> 
function 
/home/matt/eu/oe/hg/bin/ed.ex:2035 in procedure insert_string() 
subscript value 1 is out of bounds, reading from a sequence of length 0 - in subscript #1 of 'buffer_multi'  

I don't know enough about the guts of ed.ex to know what this means, but an error like that would slip through translated code to give you the sort of malloc error that Tom is reporting.

...and of course, looking at it again, I see that I introduced buffer_multi to track multi-line tokens (strings and comments). I must have missed something in there... getlost

We don't need splice anything into buffer_multi[b], which will always be an integer. I pushed up a fix, which was to remove that line.

Matt

new topic     » goto parent     » topic index » view message » categorize

15. Re: 4.1 Beta Binary Release

mattlewis said...

NB: Note the line in question:

if sequence(buffer[b_line]) and sequence(buffer_multi[b_line]) then 

...and the improved error message that tells you exactly where the error is. smile

Matt thanks for looking into this but I think there is some confusion! The above was my first suggestion as a fix before I realized what you did:

mattlewis said...

We don't need splice anything into buffer_multi[b], which will always be an integer. I pushed up a fix, which was to remove that line.

I did something similar to you with my second suggested fix:

Jerome said...

... I've uploaded a new ed.ex for you to try: https://dl.dropboxusercontent.com/u/5805068/Euphoria/ed.ex. I just confirmed on my system that typing 'function','procedure','while',etc... produces the correct completions and doesn't crash.

But Tom is running into an issue that when ed.ex is compiled with euc, it crashes. This still seems to be happening with your published fix (the issue seems to be intermittent). I also am not familiar enough with ed.ex to understand where the exact problem is coming from and the backtrace from gdb didn't lead me to an immediate solution.

K_D_R said...

Your new ed.ex works fine for me on Ubuntu 13.1. Your work is deeply appreciated. However; there is a minor bug in the ed.ex clean function which was introduced in 4.0, I think. If only lines with a length greater than 2 are evaluated, then the CR will not be removed from "empty" lines consisting of just a CR & LF:

This certainly may be another issue but doesn't seem to resolve Tom's issue.

Thanks,
Ira

new topic     » goto parent     » topic index » view message » categorize

16. Re: 4.1 Beta Binary Release

Jerome said...

But Tom is running into an issue that when ed.ex is compiled with euc, it crashes. This still seems to be happening with your published fix (the issue seems to be intermittent). I also am not familiar enough with ed.ex to understand where the exact problem is coming from and the backtrace from gdb didn't lead me to an immediate solution.

I just got this with valgrind:

==4349== Invalid read of size 4  
==4349==    at 0x4223A5: _1try_auto_complete (ed.c:9530) 
==4349==    by 0x4245AE: _1edit_file (ed.c:10863) 
==4349==    by 0x424CD1: _1ed (ed.c:11607) 
==4349==    by 0x42522D: _1ed_main (ed.c:11713) 
==4349==    by 0x411492: main (main-.c:2024) 
==4349==  Address 0x5968080 is 16 bytes inside a block of size 120 free'd 
==4349==    at 0x4C2B60C: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) 
==4349==    by 0x44C8E8: de_reference (in /home/matt/eu/test/ed) 
==4349==    by 0x421EB4: _1insert_string (ed.c:9153) 
==4349==    by 0x42293E: _1try_auto_complete (ed.c:9432) 
==4349==    by 0x4245AE: _1edit_file (ed.c:10863) 
==4349==    by 0x424CD1: _1ed (ed.c:11607) 
==4349==    by 0x42522D: _1ed_main (ed.c:11713) 
==4349==    by 0x411492: main (main-.c:2024) 

That seems repeatable. 9530 is the end of try_auto_complete and 9153 is part of:

/** ed.ex:2035				buffer[b_line] = splice( buffer[b_line], text[i], b_col )*/ 

Matt

new topic     » goto parent     » topic index » view message » categorize

17. Re: 4.1 Beta Binary Release

Another issue is that the 4.1 binary will not work on a "retro linux."

Using Puppy Linux Slacko 5.3.3 I get:

# ./eui 
./eui: /lib/libm.so.6: version `GLIBC_2.15' not found (required by ./eui) 
./eui: /lib/libc.so.6: version `GLIBC_2.15' not found (required by ./eui) 

_tom

new topic     » goto parent     » topic index » view message » categorize

18. Re: 4.1 Beta Binary Release

Jerome said...

But Tom is running into an issue that when ed.ex is compiled with euc, it crashes. This still seems to be happening with your published fix (the issue seems to be intermittent). I also am not familiar enough with ed.ex to understand where the exact problem is coming from and the backtrace from gdb didn't lead me to an immediate solution.

I found a problem with translated splice(). Fixed now in 4.0 and 4.1. I think that should solve the issue Tom was seeing with the translated crashes.

Matt

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu