1. Attn Robert Craig: Potential Eu2C translator bug

Vincent wrote:
> 
> Thomas Jansen wrote:
> > 
> > 
> > When i compile this program with Watcom the program open a console window
> > with no output.
> > Using Borland it produce the usual window error message. 
> > Is it a bug in ecw?
> > 
> > exw test-mydll.exw -- ok
> > bind test-mydll.exw -- ok
> > ecw -wat test-mydll.exw -- console no output
> > ecw -bor test-mydll.exw -- crash with windows error.
> > 
> > --------- test-mydll.exw
> > without warning
> > include dll.e
> > 
> > atom dll, up
> > 
> > dll = open_dll("mydll")
> > up = define_c_func(dll, "upper", {E_OBJECT}, E_OBJECT)
> > 
> > -- puts(1, c_func(up, {"aBcDEfg"}))
> > for n=1  to  1000  do
> >     puts(1, c_func(up, {rand("abcdefghijklmnopqrstuv") + ' '}) & '\n')
> > end for
> > 
> > while get_key() = -1 do
> >     
> > end while
> > 
> > --------- mydll.ew
> > 
> > function to_upper(sequence s)
> >     integer i
> >     for c=1  to length(s)  do
> > 	i = s[c]
> > 	if i >= 'a' then
> > 	    if i <= 'z' then
> > 		s[c] -= ' '
> > 	    end if
> > 	end if
> >     end for
> >     return s
> > end function
> > 
> > global function upper(object x)
> > 
> >     return to_upper(x)
> > end function
> > 
> > -------------------------
> > tj
> > 
> Output of test-mydll.exe executed within DOS shell (compiled with "-con" flag,
> and
> Open Watcom v1.3):
> 
> The instruction at 0x00401e95 referenced memory at 0x00000054.
> The memory could not be read.
> Exception fielded by 0x0040e300
> EAX=0x00000016 EBX=0x00000050 ECX=0x800103b8 EDX=0x00081dc0
> ESI=0x00081dc0 EDI=0x993e09a4 EBP=0x0006fe78 ESP=0x0006fe5c
> EIP=0x00401e95 EFL=0x00010206 CS =0x0000001b SS =0x00000023
> DS =0x00000023 ES =0x00000023 FS =0x0000003b GS =0x00000000
> Stack dump (SS:ESP)
> 0x0006fe78 0x800103b8 0x00000001 0x993e09a4 0x00000001 0x800103b4
> 0x00401118 0x800103b8 0x00000001 0x0006ffb4 0x993e09a4 0x01c56a12
> 0x00000108 0x0040af3d 0x00400000 0x00000000 0x003600a6 0x0000000a
> 0x00033000 0x00000000 0x00000000 0x00000001 0x00000000 0x00000001
> 0x00000008 0x0000000e 0x00000005 0x00000005 0x00000069 0x00000000
> 0x0000009b 0x00000001 0x00000000 0x00000000 0x00000000 0x00000000
> 0x00000000 0x00000000 0x00000000 0x0006ffac 0x00000000 0x00000000
> 0x00000002 0xffffffff 0x00000001 0xffffffff 0x00000002 0xc000001d
> 0x00000002 0xc000013a 0x00000002 0xc0000005 0x00000002 0xc000013a
> 0x00000002 0xc000013a 0x00000001 0xffffffff 0x00000001 0xffffffff
> 0x00000001 0xffffffff 0x00000002 0xc0000094 0x00000001 0xc0000095
> 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
> 
> That is a memory exception. This could be a bug with the Eu2C translator, when
> producing
> ANSI C code, or maybe a problem with the Watcom & Borland compilers when
> compiling?
> 

Please look into this issue, the program works interpreted/bound, but
translated/compiled it gets this error (both supported Windows compilers fail to
produce a working EXE in this case).

Regards,
Vincent

--
Without walls and fences, there is no need for Windows and Gates.

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu