1. 4.1 Beta Binary Release
- Posted by Jerome Jan 15, 2014
- 4293 views
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
2. Re: 4.1 Beta Binary Release
- Posted by _tom (admin) Jan 16, 2014
- 4182 views
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
3. Re: 4.1 Beta Binary Release
- Posted by Jerome Jan 17, 2014
- 4124 views
- 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
4. Re: 4.1 Beta Binary Release
- Posted by _tom (admin) Jan 18, 2014
- 4044 views
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
5. Re: 4.1 Beta Binary Release
- Posted by Jerome Jan 18, 2014
- 4052 views
- 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
6. Re: 4.1 Beta Binary Release
- Posted by _tom (admin) Jan 18, 2014
- 4022 views
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
7. Re: 4.1 Beta Binary Release
- Posted by Jerome Jan 19, 2014
- 3927 views
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
8. Re: 4.1 Beta Binary Release
- Posted by _tom (admin) Jan 20, 2014
- 3968 views
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
9. Re: 4.1 Beta Binary Release
- Posted by _tom (admin) Jan 20, 2014
- 3902 views
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
10. Re: 4.1 Beta Binary Release
- Posted by Jerome Jan 20, 2014
- 3831 views
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
11. Re: 4.1 Beta Binary Release
- Posted by K_D_R Jan 20, 2014
- 3848 views
... 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
12. Re: 4.1 Beta Binary Release
- Posted by mattlewis (admin) Jan 20, 2014
- 3818 views
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.
13. Re: 4.1 Beta Binary Release
- Posted by mattlewis (admin) Jan 20, 2014
- 3776 views
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...
Matt
14. Re: 4.1 Beta Binary Release
- Posted by mattlewis (admin) Jan 20, 2014
- 3797 views
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...
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
15. Re: 4.1 Beta Binary Release
- Posted by Jerome Jan 20, 2014
- 3799 views
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.
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:
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:
... 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.
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
16. Re: 4.1 Beta Binary Release
- Posted by mattlewis (admin) Jan 20, 2014
- 3784 views
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
17. Re: 4.1 Beta Binary Release
- Posted by _tom (admin) Jan 21, 2014
- 3722 views
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
18. Re: 4.1 Beta Binary Release
- Posted by mattlewis (admin) Jan 21, 2014
- 3678 views
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