Many thanks to
eas-lab@absamail.co.za (Chris Glur)
and
hebisch@math.uni.wroc.pl (Waldek Hebisch)
for pin-pointing the problem in $popsrc/aarith.s
Recapitulation: Luc Beaudoin pointed out that on PC linux Poplog array
out of bounds errors caused poplog to crash. (It turns out that I had
reported the same problem in March 1991!)
This should produce a mishap (INVALID ARRAY SUBSCRIPT) and then continue
newarray([1 10])(11) =>
It worked on Solaris and Alpha Unix poplog, but crashed poplog on
PC+linux poplog and also on PC+Windows poplog
In an earlier message I traced the problem to
$popsrc/aarith.s
but did not know what exactly to look for.
Chris located the suspect code and Waldek's answer told me exactly what
to do to fix that file:
> Date: 7 Jan 2003 16:19:42 GMT
> Organization: Politechnika Wroclawska
>
Chris Glur wrote
> : My redHat 6.2 on slow 486 only writes the first 2 lines if the mishap.
That's what happens if you have the pop11 variable popsyscall set false
(the default). In my test I gave it the value 1, which causes sytem
procedures and anonymous procedures to be printed out also.
> : when there are no subscript errors, _array_sub exits via the
> : jmp *_PD_EXECUTE(%eax)
> : ELSE it gets to:
> : subl $4, %USP ;;; reveal the last index again
> : call XC_LAB(weakref Sys$-Array$-Sub_error)
> ^^^^
Waldek wrote:
> jmp works OK
> <snip>
>
> I have checked that in most cases assembler jumps to poplog routines
> (instead of using call). So I changed (using gdb) the offending
> call to a jump (fortunately jump and call are of equal length and only
> opcode differs, so I just had to change single byte). After change
> poplog printed rest of error message and continued with no problem.
> So, my conclusion is that machine stack got corrupted -- call puts
> return adress on the machine stack and appearently error handling routine
> has to examine the machine stack ...
>
> --
> Waldek Hebisch
> hebisch@math.uni.wroc.pl or hebisch@hera.math.uni.wroc.pl
I have checked this and he is correct.
To rebuild your PC+Linux poplog system, do the following (for which you
may need root privileges if your system was installed as root):
cd $popsrc
edit aarith.s
Change
call XC_LAB(weakref Sys$-Array$-Sub_error)
to
jmp XC_LAB(weakref Sys$-Array$-Sub_error)
Or copy the fixed version from
http://www.cs.bham.ac.uk/research/poplog/src/master/S.pcunix/src/aarith.s
Then in the same directory do the following (as instructed in
http://www.cs.bham.ac.uk/research/poplog/sysdoc/rebuilding
pgcomp aarith.s
That will produce two new files
aarith.o
aarith.w
Then rebuild the object archive in
$usepop/pop/obj/src.olb
$usepop/pop/obj/src.wlb
as follows
pglibr -r ./ *.w
You can then delete the .o file and the .w file.
Then relink poplog (See HELP NEWPOP)
$popsrc/newpop -link -x=-xm -norsv
(At this stage your pop11 command may not work if you have redefined it
to use a local saved image. But you can always run basepop11).
Then rebuild any local saved images, and you are done.
E.g. if you have the Birmingham setup this is how to rebuild the local
saved images:
cd $poplocal/local/com
# run a script to build the saved images in $usepop/templocalbin
./mkall.local
This may take some time and will print out a lot of stuff, including
some warning messages while compiling common lisp. You may prefer to
redirect the output to a log file.
Then, to install the new saved images do
cd $usepop
# get rid of local saved images
rm -rf poplocalbin
# install the new ones
mv templocalbin poplocalbin
If you have changed the locations of your saved images ($poplocalbin)
you'll know enough to vary the above.
In due course I shall rebuild the linux pc poplog systems with the
fix installed.
Thanks again for the help. I could not have sorted this out myself.
Now, all we need is for an expert user of windows poplog to edit the
aarith.s file recompile it and fix the problem in windows poplog and
give me back re-built versions of windows poplog (versions 15.5 and
15.53 if possible) to replace the versions here
http://www.cs.bham.ac.uk/research/poplog/winpop/pop15-53.zip
http://www.cs.bham.ac.uk/research/poplog/new/pcwin15.5.zip
Thanks.
Aaron
====
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk (ReadATas@please !)
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/ (And free book on Philosophy of AI)
FREE TOOLS: http://www.cs.bham.ac.uk/research/poplog/freepoplog.html
|