1. machine-level exception r3490
- Posted by g3ve4AaAerFu Oct 10, 2010
- 1141 views
I got this result when running the attached code with r3490 on both XP and debian 5. include/std/memory.e:66 in type machine_addr() A machine-level exception occurred during execution of this statement ... called from d:/eu40/include\std\machine.e:78 in function allocate() ... called from d:/eu40/include\std\io.e:450 --> See ex.err
#!/usr/local/bin/eui -batch include std/datetime.e puts(1, "Content-Type: text/plain; charset=ISO-8859-1\n\n") puts(1, format(now(), "%Y-%m-%d %H:%M:%S LOCAL\n")) puts(1, format(now_gmt(), "%Y-%m-%d %H:%M:%S GMT\n"))
2. Re: machine-level exception r3490
- Posted by jimcbrown (admin) Oct 10, 2010
- 1113 views
I got this result when running the attached code with r3490 on both XP and debian 5. include/std/memory.e:66 in type machine_addr() A machine-level exception occurred during execution of this statement ... called from d:/eu40/include\std\machine.e:78 in function allocate() ... called from d:/eu40/include\std\io.e:450 --> See ex.err
#!/usr/local/bin/eui -batch include std/datetime.e puts(1, "Content-Type: text/plain; charset=ISO-8859-1\n\n") puts(1, format(now(), "%Y-%m-%d %H:%M:%S LOCAL\n")) puts(1, format(now_gmt(), "%Y-%m-%d %H:%M:%S GMT\n"))
The following patch fixes this.
Index: console.e =================================================================== --- console.e (revision 3490) +++ console.e (working copy) @@ -338,8 +338,8 @@ and p[1] <= 200 and p[2] <= 500 -- rough sanity check end type -public type positive_int(integer x) - return x >= 1 +public type positive_int(atom x) + return x >= 1 and (floor(x) = x) end type --** Index: memory.e =================================================================== --- memory.e (revision 3490) +++ memory.e (working copy) @@ -63,7 +63,9 @@ public type machine_addr(object a) -- a 32-bit non-null machine address - return a > 0 and a <= MAX_ADDR and floor(a) = a + --return a > 0 and a <= MAX_ADDR and floor(a) = a + --return a > 0 and floor(a) = a + return floor(a) = a end type -- Internal use of the library only. free() calls this. It works with @@ -798,7 +800,8 @@ public procedure check_all_blocks() end procedure -export function prepare_block( atom addr, integer a, integer protection ) +--export function prepare_block( atom addr, integer a, integer protection ) +export function prepare_block( atom addr, integer a, atom protection ) return addr end function
3. Re: machine-level exception r3490
- Posted by DerekParnell (admin) Oct 10, 2010
- 1118 views
I got this result when running the attached code with r3490 on both XP and debian 5. include/std/memory.e:66 in type machine_addr() A machine-level exception occurred during execution of this statement
It looks like that the underlying problem is that top-level code is not being executed (for assignments) before the first routine is being run. This must be a recent breaking change.
4. Re: machine-level exception r3490
- Posted by jimcbrown (admin) Oct 10, 2010
- 1107 views
I see two problems exposed by this.
Firstly, we crash with a machine-level exception instead of correctly reporting the type-check failure.
Second, the reason for the type check failures is that we get a negative address returned. The types themselves were defined correctly, but something in the conversion of values in the backend is not working correctly.
I got this result when running the attached code with r3490 on both XP and debian 5. include/std/memory.e:66 in type machine_addr() A machine-level exception occurred during execution of this statement ... called from d:/eu40/include\std\machine.e:78 in function allocate() ... called from d:/eu40/include\std\io.e:450 --> See ex.err
#!/usr/local/bin/eui -batch include std/datetime.e puts(1, "Content-Type: text/plain; charset=ISO-8859-1\n\n") puts(1, format(now(), "%Y-%m-%d %H:%M:%S LOCAL\n")) puts(1, format(now_gmt(), "%Y-%m-%d %H:%M:%S GMT\n"))
5. Re: machine-level exception r3490
- Posted by mattlewis (admin) Oct 10, 2010
- 1135 views
I got this result when running the attached code with r3490 on both XP and debian 5. include/std/memory.e:66 in type machine_addr() A machine-level exception occurred during execution of this statement
It looks like that the underlying problem is that top-level code is not being executed (for assignments) before the first routine is being run. This must be a recent breaking change.
Yes, it looks like svn:3486 changed the order in which the libraries are loaded. I think we need to throw in GLOBAL_INIT_CHECKS for constants whose values can't be determined at compile time.
Matt
6. Re: machine-level exception r3490
- Posted by mattlewis (admin) Oct 10, 2010
- 1125 views
I got this result when running the attached code with r3490 on both XP and debian 5.
include/std/memory.e:66 in type machine_addr() A machine-level exception occurred during execution of this statement ... called from d:/eu40/include\std\machine.e:78 in function allocate() ... called from d:/eu40/include\std\io.e:450 --> See ex.err</eucode>
Try svn:3491. This should be fixed via ticket:227.
Matt
7. Re: machine-level exception r3490
- Posted by g3ve4AaAerFu Oct 10, 2010
- 1141 views
Try svn:3491. This should be fixed via ticket:227.
Matt
Yes it's working now, thank you to all. But eutest still fails a lot of tests.
8. Re: machine-level exception r3490
- Posted by mattlewis (admin) Oct 10, 2010
- 1113 views
Yes it's working now, thank you to all.
But eutest still fails a lot of tests.
There are still some issues to be worked out with the binder. The tests named "t_c_*", I believe are due to some recent changes to error messages. The tests actually look for the correct error messages, and haven't been updated to match the new messages yet.
Matt