1. Phix segfault

Hi Pete,

I've just downloaded and installed phix for 32 bit Linux (0.7.9). Everything installed fine and the tests were passed ok but when I tried to run a simple "hello world" program with a trace, I got this:

with trace 
trace(1) 
puts(1, "hello world\n") 
 
Result : 
 
SIGSEGV at #08190E71 
eax: 40000000 
ebx: 00000000 
ecx: 00000000 
edx: 000000E0 
esi: 09406BB0 
edi: 4201E50C 
 
pDiagN.e line 3300: symtab[224] bad S_NTyp[1] 
"sleep(5)..." 
pDiagN.e line 3041: oops, rtn[=8334] out of range[1..865] 
pDiagN.e line 3041: oops, rtn[=8427] out of range[1..865] 
/home/joe/phix/hello.exw:-1 (era=#08192AD7, from_addr=#0, ret_addr=#0) 
variable ???(varno=8138) has not been assigned a value 

It ran ok without the trace statements (and no, I didn't compile it in case you were wondering. I used the interpreter).

Thanks for all your hard work on Phix, it's awesome.

new topic     » topic index » view message » categorize

2. Re: Phix segfault

I get an identical result on my netbook (32-bit Phix7.9 Linux)

But, it compiles ok

_tom

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

3. Re: Phix segfault

Ahem. Now let's not be shy here, Pete, deep breath...

trace has never worked on Linux, and, given my other commitments, getting it to work will require a concerted effort, over possibly quite some time.

Install Evan's debugger. Note that as I did that quite some time ago, I have version 0.9.18 - two later versions now exist but I remember that I could not get 0.9.20 to compile.

Run ./p -d p to create a list.asm for reference, then run edb --run ./p test

That led me to pTrace.e line 924: blankScreen = save_text_image({1,1},consoleSize).

First, see if you can do the same - search list.asm for the failure address shown in edb, and ask questions if/when you get stuck.

Then, realising the problem was that consoleSize was unassigned, I changed line 1436 in builtins\VM\pTrace.e from

        --DEV more... 
        screenLines = 25 
        blankScreen = {} 

to

        --DEV more... 
        screenLines = 25 
        screenCols = 80 
        blankScreen = {} 
        consoleSize = {screenLines,screenCols} 

then recompiled (./p -c p) and it got a wee bit further but crashed a little more cryptically (sorry).

With three (or more?) people trying similar small steps, we may (no promises) make slow and painful progress.

Leaving it to me all by my lonesome, the only thing I can guarantee is it will take much longer....

Pete

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

4. Re: Phix segfault

petelomax said...

trace has never worked on Linux,

Pete,

I don't have a Windows licence but I downloaded the Windows version of Phix and successfully installed and ran it under Wine. Sadly, I got the same error message when trying to use trace. Maybe it's a Wine issue, but has anyone else got trace working in Windows?

I've taken on board your comments regarding fixing the issue. Not sure how much use I'll be though because my knowledge of low level stuff is minimal, as is my inclination to learn more about it. I know it's a cop out, but just trying to be honest...

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

5. Re: Phix segfault

i tried it on win 10/64

pDiagN.e line 3041: oops, rtn[=9134] out of range[1..1234] 
H:\Euphoriaprog\Microexp\tester.ew:-1 (era=#007399B7, from_addr=#0, ret_addr=#0) 
subscript is not an atom 
 
Global & Local Variables 
 
--> see H:\Euphoriaprog\Microexp\ex.err 
Press Enter... 

ex.err

H:\Euphoriaprog\Microexp\tester.ew:-1 (era=#007399B7, from_addr=#0, ret_addr=#0) 
subscript is not an atom 
 
Global & Local Variables 

bummer, i would really like to have trace

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

Search



Quick Links

User menu

Not signed in.

Misc Menu